Skip to content
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

Regenerate crds with new controller-gen #274

Merged
merged 3 commits into from
Dec 4, 2024
Merged

Regenerate crds with new controller-gen #274

merged 3 commits into from
Dec 4, 2024

Conversation

Jorres
Copy link
Contributor

@Jorres Jorres commented Nov 29, 2024

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

  • CRDs are generated manually. If a new feature is developed and CRDs are not updated, helm chart will ship with old CRDs and new schema fields will fail on apply
  • current CRDs are generated with controller-gen 0.6.1. The build with controller-gen 0.6.1 failed on go 1.22 and has been upgraded to 0.16.5 by @sourcecd in a recent PR.

What is the new behavior?

  • CRDs are generated automatically by invoking make manifests in upload-artifacts pipeline to ensure the source of truth is the golang specification
  • CRDs have been regenerated, and upgrade from 0.6 to 0.15 brought a number of cosmetic changes (that's why the diff is so large)

Most of the diff is reformatted description fields (some lines are shorter, some are longer, just plain text changes of an openAPIV3Schema). Turns out, the diff is not +13000-13000, but rather +1-30 (see below, this diff is attached), if we filter the description field out. The only ESSENTIAL change is the following:

  • the name field of a remote database nodeset is a required attribute now

  • -30 lines are because of the status field being removed. This field shouldn't be persisted to a repository, probably someone took it from a living cluster way back in 2021? Anyway, it is safe to delete it.

I have tested installing Storage + Database from new CRDs as well as upgrading the CRDs while the Storage + Database are deployed already. No errors have occured, as expected.

diff --git a/deploy/ydb-operator/crds/database.yaml b/deploy/ydb-operator/crds/database.yaml
index 1bee889..a80c30d 100644
--- a/deploy/ydb-operator/crds/database.yaml
+++ b/deploy/ydb-operator/crds/database.yaml
@@ -3565,6 +3460,7 @@ spec:
                       - whenUnsatisfiable
                       x-kubernetes-list-type: map
                   required:
+                  - name
                   - nodes
                   type: object
                 type: array
@@ -6013,9 +5974,3 @@ spec:
     storage: true
     subresources:
       status: {}
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []
diff --git a/deploy/ydb-operator/crds/databasemonitoring.yaml b/deploy/ydb-operator/crds/databasemonitoring.yaml
index c3212b7..22545d8 100644
--- a/deploy/ydb-operator/crds/databasemonitoring.yaml
+++ b/deploy/ydb-operator/crds/databasemonitoring.yaml
@@ -151,9 +140,3 @@ spec:
     storage: true
     subresources:
       status: {}
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []
diff --git a/deploy/ydb-operator/crds/databasenodeset.yaml b/deploy/ydb-operator/crds/databasenodeset.yaml
index 74aebca..069ac66 100644
--- a/deploy/ydb-operator/crds/databasenodeset.yaml
+++ b/deploy/ydb-operator/crds/databasenodeset.yaml
@@ -4719,9 +4765,3 @@ spec:
     storage: true
     subresources:
       status: {}
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []
diff --git a/deploy/ydb-operator/crds/remotedatabasenodeset.yaml b/deploy/ydb-operator/crds/remotedatabasenodeset.yaml
index bc84fb0..f36e699 100644
--- a/deploy/ydb-operator/crds/remotedatabasenodeset.yaml
+++ b/deploy/ydb-operator/crds/remotedatabasenodeset.yaml
@@ -4815,9 +4844,3 @@ spec:
     storage: true
     subresources:
       status: {}
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []
diff --git a/deploy/ydb-operator/crds/remotestoragenodeset.yaml b/deploy/ydb-operator/crds/remotestoragenodeset.yaml
index f514a2a..bd01e43 100644
--- a/deploy/ydb-operator/crds/remotestoragenodeset.yaml
+++ b/deploy/ydb-operator/crds/remotestoragenodeset.yaml
@@ -4767,9 +4783,3 @@ spec:
     storage: true
     subresources:
       status: {}
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []
diff --git a/deploy/ydb-operator/crds/storage.yaml b/deploy/ydb-operator/crds/storage.yaml
index 9d0a180..4f0b265 100644
--- a/deploy/ydb-operator/crds/storage.yaml
+++ b/deploy/ydb-operator/crds/storage.yaml
@@ -7161,9 +7013,3 @@ spec:
     storage: true
     subresources:
       status: {}
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []
diff --git a/deploy/ydb-operator/crds/storagemonitoring.yaml b/deploy/ydb-operator/crds/storagemonitoring.yaml
index 4d37c63..2e39eb9 100644
--- a/deploy/ydb-operator/crds/storagemonitoring.yaml
+++ b/deploy/ydb-operator/crds/storagemonitoring.yaml
@@ -150,9 +139,3 @@ spec:
     storage: true
     subresources:
       status: {}
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []
diff --git a/deploy/ydb-operator/crds/storagenodeset.yaml b/deploy/ydb-operator/crds/storagenodeset.yaml
index 870a29d..ce572f1 100644
--- a/deploy/ydb-operator/crds/storagenodeset.yaml
+++ b/deploy/ydb-operator/crds/storagenodeset.yaml
@@ -4671,9 +4704,3 @@ spec:
     storage: true
     subresources:
       status: {}
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []

@Jorres Jorres merged commit fd95db4 into master Dec 4, 2024
3 checks passed
@Jorres Jorres deleted the regenerate-crds branch December 4, 2024 11:24
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.

3 participants