Describe the bug
When installing the Argo CD Helm Chart with a long release name (Helm allows release names up to 53 characters), the installations fails, as the Helm Chart templates produce Kubernetes objects with non-unique names, as names are truncated.
This is especially noticeable when enabling the metrics of the various components (i.e. <component>.metrics.enabled=true), as this creates services with -metrics suffixes leading to additional must be no more than 63 characters errors.
Related helm chart
argo-cd
Helm chart version
9.5.2
To Reproduce
- Run
helm install "$(printf '%.0sa' {1..53})" argo-cd --repo https://argoproj.github.io/argo-helm --version 9.5.2 --namespace argocd --create-namespace
- See the following errors:
Error: INSTALLATION FAILED: 5 errors occurred:
* serviceaccounts "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-re" already exists
* roles.rbac.authorization.k8s.io "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-re" already exists
* rolebindings.rbac.authorization.k8s.io "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-re" already exists
* services "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-re" already exists
* deployments.apps "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-re" already exists
When metrics are enabled then there are even more errors:
- Create a
values.yaml which enables the metrics services:
values.yaml content (minimal example)
redis:
metrics:
enabled: true
server:
metrics:
enabled: true
repoServer:
metrics:
enabled: true
applicationSet:
metrics:
enabled: true
notifications:
metrics:
enabled: true
- Run
helm install "$(printf '%.0sa' {1..53})" argo-cd --repo https://argoproj.github.io/argo-helm --version 9.5.2 --namespace argocd -f ./values.yaml --create-namespace
- See the following errors:
Error: INSTALLATION FAILED: 10 errors occurred:
* serviceaccounts "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-re" already exists
* roles.rbac.authorization.k8s.io "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-re" already exists
* rolebindings.rbac.authorization.k8s.io "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-re" already exists
* Service "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-re-metrics" is invalid: metadata.name: Invalid value: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-re-metrics": must be no more than 63 characters
* Service "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-se-metrics" is invalid: metadata.name: Invalid value: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-se-metrics": must be no more than 63 characters
* Service "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-ap-metrics" is invalid: metadata.name: Invalid value: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-ap-metrics": must be no more than 63 characters
* Service "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-re-metrics" is invalid: metadata.name: Invalid value: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-re-metrics": must be no more than 63 characters
* Service "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-no-metrics" is invalid: metadata.name: Invalid value: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-no-metrics": must be no more than 63 characters
* services "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-re" already exists
* deployments.apps "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-argocd-re" already exists
Expected behavior
No error is displayed and the Kubernetes objects are created successfully.
Screenshots
No response
Additional context
Similar to #1328
Describe the bug
When installing the Argo CD Helm Chart with a long release name (Helm allows release names up to 53 characters), the installations fails, as the Helm Chart templates produce Kubernetes objects with non-unique names, as names are truncated.
This is especially noticeable when enabling the metrics of the various components (i.e.
<component>.metrics.enabled=true), as this creates services with-metricssuffixes leading to additionalmust be no more than 63 characterserrors.Related helm chart
argo-cd
Helm chart version
9.5.2
To Reproduce
helm install "$(printf '%.0sa' {1..53})" argo-cd --repo https://argoproj.github.io/argo-helm --version 9.5.2 --namespace argocd --create-namespaceWhen metrics are enabled then there are even more errors:
values.yamlwhich enables the metrics services:values.yaml content (minimal example)
helm install "$(printf '%.0sa' {1..53})" argo-cd --repo https://argoproj.github.io/argo-helm --version 9.5.2 --namespace argocd -f ./values.yaml --create-namespaceExpected behavior
No error is displayed and the Kubernetes objects are created successfully.
Screenshots
No response
Additional context
Similar to #1328