-
Notifications
You must be signed in to change notification settings - Fork 17
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
Check crds chart is aligned with the main operator chart version #787
Check crds chart is aligned with the main operator chart version #787
Conversation
646b00d
to
e8f17ca
Compare
e8f17ca
to
8f6f74c
Compare
8f6f74c
to
897af97
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worth a try 🤞🏻
Signed-off-by: David Cassany <[email protected]>
897af97
to
5b6ba75
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good here!
@@ -22,5 +22,9 @@ | |||
{{- if eq $crdrelease $.Release.Name -}} | |||
{{- required "Elemental CRDs should be moved to the new elemental-operator-crds chart before upgrading this operator." "" -}} | |||
{{- end -}} | |||
{{- $crdversion := index $crdobj.metadata.annotations "app.kubernetes.io/version" -}} | |||
{{- if or (not $crdversion) (ne $crdversion $.Chart.Version) -}} | |||
{{- required "Elemental Operator CRDs chart version must match the version of this chart. Please install the corresponding CRD chart before." "" -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Added some annotations and labels for the CRDs chart based on https://v2.helm.sh/docs/chart_best_practices/#standard-labels
With them we can add a validation to check CRDs chart and Elemental-Operator chart are aligned with the same version.