You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ArgoCD trims the labels for tracking ids automatically. When using namespaces, particularly, this can lead to resources being trimmed and ending with _, . or -. This generates an invalid label and the resource can't be created in Kubernetes.
This issue is particularly more visible when using namespaces, as the resulting label, for example, argocd.argoproj.io/instance, is generated with ArgoCDNamespace_ArgoCDResourceName.
To Reproduce
Generate any resource with the 63rd character being an invalid one:
Add a validation in the trimming function to avoid generating invalid resources. Like trimming the name until we find the first to last valid character.
Checklist:
argocd version
.Describe the bug
ArgoCD trims the labels for tracking ids automatically. When using namespaces, particularly, this can lead to resources being trimmed and ending with
_
,.
or-
. This generates an invalid label and the resource can't be created in Kubernetes.This issue is particularly more visible when using namespaces, as the resulting label, for example,
argocd.argoproj.io/instance
, is generated withArgoCDNamespace_ArgoCDResourceName
.To Reproduce
Generate any resource with the 63rd character being an invalid one:
Resulting Kubernetes label:
argocd.argoproj.io/instance="custom-cluster-ap-northeast2-production_my-custom-resource-has-"
This generates an invalid Kuberentes manifest.
Expected behavior
Add a validation in the trimming function to avoid generating invalid resources. Like trimming the name until we find the first to last valid character.
Screenshots
Version
Logs
The text was updated successfully, but these errors were encountered: