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

Check crds chart is aligned with the main operator chart version #787

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

davidcassany
Copy link
Contributor

@davidcassany davidcassany commented Jun 27, 2024

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.

@davidcassany davidcassany requested a review from a team as a code owner June 27, 2024 10:14
@davidcassany davidcassany marked this pull request as draft June 27, 2024 10:14
@davidcassany davidcassany added the area/chart Chart related changes label Jun 27, 2024
@github-actions github-actions bot removed the area/chart Chart related changes label Jun 27, 2024
Copy link
Contributor

@kkaempf kkaempf left a comment

Choose a reason for hiding this comment

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

worth a try 🤞🏻

@davidcassany davidcassany marked this pull request as ready for review June 28, 2024 09:29
Copy link
Member

@fgiudici fgiudici left a 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." "" -}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

@davidcassany davidcassany merged commit 0f59b14 into rancher:main Jun 28, 2024
22 checks passed
@davidcassany davidcassany deleted the validate_crds_chart_version branch June 28, 2024 09:45
@davidcassany davidcassany mentioned this pull request Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants