Skip to content

Installing ACK charts in namespaced mode prevents multiple installs #2430

Closed
@ericlarssen

Description

@ericlarssen

Describe the bug
When you install a helm chart in namespaced mode a cluster role is created with a name not unique to the helm install.

Error: Unable to continue with install: ClusterRole "ack-namespaces-cache-acm-controller" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-namespace" must equal "test-b": current value is "test-a"

https://github.com/aws-controllers-k8s/acm-controller/blob/v1.0.7/helm/templates/caches-role.yaml#L4

I noticed this file exists in a number of charts but did not identify them all. This would not be a problem however when helm installs the files, it adds annotations unique to the the helm install, preventing multiple helm releases from owning the same resource.

meta.helm.sh/release-name: ack-chart
meta.helm.sh/release-namespace: my-namespace

Steps to reproduce

  1. Helm install acm chart into a namespace (test-a), with the installScope set to namespace
  2. Attempt to Helm install acm chart into another namespace (test-b), with the installScope set to namespce

Expected outcome
Both installs should work but will fail with a like error.

Error: Unable to continue with install: ClusterRole "ack-namespaces-cache-acm-controller" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-namespace" must equal "test-b": current value is "test-a"

Environment

  • All k8s versions
  • Not EKS related
  • Afaict all helm chart

Metadata

Metadata

Assignees

Labels

area/helmIssues or PRs related to Helm chartskind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions