Score:0

How to HELM install multiple Traefik with rbac?

cn flag

I am trying to install two traefik. Each will be in its own namespace. Each traefik will use label selection. Below is the values override I use for each when I run helm install.

rbac:
  enabled: true

# Enable prometheus
additionalArguments:
  - "--metrics.prometheus=true"

# Options for the main traefik service, where the entrypoints traffic comes
# from.
service:
  enabled: true
  type: ClusterIP

kubernetes:
  namespaces: "{{NAMESPACE}}"

providers:
  kubernetesCRD:
    labelSelector: wsLabel={{NAMESPACE}}
  kubernetesIngress:
    labelSelector: wsLabel={{NAMESPACE}}

First traefik installs fine. When I attempt the second traefik, I get the following.

Error: rendered manifests contain a resource that already exists. Unable to continue with install: ClusterRole "traefik" 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 "namespace2": current value is "namespace1"

I am using:

chartVersion: 10.19.4
appVersion: 2.6.3

How can I use HELM to install multiple Traefik that use label selection?

matteo nunziati avatar
co flag
Use helm dry-run capabilities to insoect the output of the chart. It seems you are wrongly expanding the namesapce value here. As the passed namespace results in an empty string: ""
Score:0
my flag

error message is clear that there's a clusterrole named traefik already. just do a kubectl get clusterrole, it will list you an already installed traefik clusterrole.

All you have to do is update your helm to add the new custom clusterrole value in values.yaml and then run helm install with new clusterrole name. done

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.