traefik-helm-chart icon indicating copy to clipboard operation
traefik-helm-chart copied to clipboard

Prefix cluster resources to allow multiple cluster level installs

Open mueschm opened this issue 3 years ago • 1 comments
trafficstars

What does this PR do?

Adds a new value under rbac called prefix. This allows multiple versions of traefik to be installed on each cluster without conflicts.

Motivation

As part of our deployment, we tend to need multiple instances of traefik running in our clusters. We could set rbac.namespaced=true but then we are limited to having 1 instance of traefik per namespace. What we are actually looking for is to allow N number of traefik instances to work with M namespaces. Essentially this adds a third option to the configuration.

  1. 1 traefik instance per cluster
  2. 1 traefik instance per namespace
  3. (New) N traefik instances per cluster

More

Additional Notes

Right now the main issue with deploying multiple instances of traefik with this configuration is because of the cluster role and cluster role binding templates. So we added rbac.prefix as a value. Though would like some feedback on if this should actually be a root value since the goal is to allow any cluster level resources to be prefixed.

mueschm avatar Jan 31 '22 18:01 mueschm

Hello, was wondering what a would a timeframe look like for getting this PR approved? Happy to make any additional changes and upgrade the Chart.yml file version again once I know the changes are good enough.

mueschm avatar Feb 14 '22 15:02 mueschm

Hello @mueschm ,

I was able to install two different Traefik on the same namespace with current version (v12) of this chart. With this values files:

rbac:
  enabled: true
  namespaced: true

One can install the chart twice, with different name, on the same namespace:

kubectl create namespace traefik
helm install -f rbac.yaml --namespace=traefik traefik1 traefik/traefik 
helm install -f rbac.yaml --namespace=traefik traefik2 traefik/traefik 

@mueschm Anything I missed ? Does this works for you ?

mloiseleur avatar Oct 10 '22 08:10 mloiseleur