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

chore(argo-cd): Add app.kubernetes.io/version label #2122

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

yu-croco
Copy link
Collaborator

@yu-croco yu-croco commented Jun 20, 2023

resolves #2118 🙋

Checklist:

  • I have bumped the chart version according to versioning
  • I have updated the documentation according to documentation
  • I have updated the chart changelog with all the changes that come with this pull request according to changelog.
  • Any new values are backwards compatible and/or have sensible default.
  • I have signed off all my commits as required by DCO.
  • My build is green (troubleshooting builds).

@@ -46,6 +46,7 @@ helm.sh/chart: {{ include "argo-cd.chart" .context }}
{{ include "argo-cd.selectorLabels" (dict "context" .context "component" .component "name" .name) }}
app.kubernetes.io/managed-by: {{ .context.Release.Service }}
app.kubernetes.io/part-of: argocd
app.kubernetes.io/version: {{ include "argo-cd.defaultTag" . }}
{{- with .context.Values.global.additionalLabels }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

https://helm.sh/docs/chart_best_practices/labels/#standard-labels
image

"argo-cd.labels" is used to all of resources, so I think it's ok to add this label here. 🙋

chore(argo-cd): Add `app.kubernetes.io/version` label

Signed-off-by: yu-croco <yu.croco@gmail.com>
@yu-croco yu-croco marked this pull request as ready for review June 20, 2023 10:38
@jmeridth jmeridth merged commit 7959fee into argoproj:main Jun 20, 2023
@sathieu
Copy link
Contributor

sathieu commented Jul 6, 2023

This fails when the tag includes the digest :

metadata.labels: Invalid value: "v2.7.6@sha256:7daba5f38b23f4f091951b727db6f87dc04ad396fd21044401502438d633836e": must be no more than 63 characters, metadata.labels: Invalid value: "v2.7.6@sha256:7daba5f38b23f4f091951b727db6f87dc04ad396fd21044401502438d633836e": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')

I'll propose a PR to fix this.

@sathieu
Copy link
Contributor

sathieu commented Jul 6, 2023

Actually, this was already discussed #1427 (comment).

And the conclusion was to drop the label. What should I do now?

@sathieu
Copy link
Contributor

sathieu commented Jul 6, 2023

Here is my proposed solution: #2148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add label app.kubernetes.io/version to all argocd deployments
6 participants