Skip to content

Don't suggest that users delete CRDs when upgrading #402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2023

Conversation

nightkr
Copy link
Member

@nightkr nightkr commented May 11, 2023

@nightkr nightkr requested review from lfrancke, soenkeliebau, sbernauer and a team May 11, 2023 10:00
Copy link
Member

@sbernauer sbernauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nightkr
Copy link
Member Author

nightkr commented May 11, 2023

@fhennig did anything change lately regarding the Antora build? I don't think I touched any of the failing stuff...

@nightkr
Copy link
Member Author

nightkr commented May 11, 2023

So this is causing existing objects to become impossible to modify after the upgrade is complete. This is because the new field status.conditions is mandatory, but doesn't have a default value. This would have to be fixed in each operator, by adding a default. For example, in nifi-operator:

diff --git a/rust/crd/src/lib.rs b/rust/crd/src/lib.rs
index 402f8bc..0b8e6b7 100644
--- a/rust/crd/src/lib.rs
+++ b/rust/crd/src/lib.rs
@@ -205,6 +205,7 @@ pub enum NifiRole {
 #[derive(Clone, Debug, Default, Deserialize, JsonSchema, Serialize)]
 pub struct NifiStatus {
     pub deployed_version: Option<String>,
+    #[serde(default)]
     pub conditions: Vec<ClusterCondition>,
 }

@nightkr nightkr force-pushed the 23.4/u-no-delete-crds branch from ea441ac to f4c7bb1 Compare May 15, 2023 11:32
@nightkr nightkr requested a review from adwk67 May 15, 2023 11:32
@nightkr
Copy link
Member Author

nightkr commented May 15, 2023

Ok, this has now been updated from #405.

@nightkr nightkr merged commit 74e4a86 into release/23.4 May 15, 2023
@nightkr nightkr deleted the 23.4/u-no-delete-crds branch May 15, 2023 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants