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

Watch specific namespaces without using rbac.namespaced

Open cliedeman opened this issue 3 years ago • 1 comments

Allow using

  providers:
    kubernetesCRD:
      enabled: true
      namespaces:
        - default
    kubernetesIngress:
      enabled: true
      namespaces:
        - default

without making the traefik deployment namespaced with rbac.namespaced

Use case: Upgrading a cluster incrementally and migrating traefik configuration one namespace at a time

I believe this line should be changed https://github.com/traefik/traefik-helm-chart/blob/master/traefik/templates/_podtemplate.tpl#L124

to check if len(namespaces) >0

cliedeman avatar Mar 21 '21 10:03 cliedeman

I accomplished this by keeping rbac.namespaced=false and manually adding "--providers.kubernetescrd.namespaces=whatever,namespaces,you,want" to the arguments. It seems like that's the only place where it's being used...

AlexVanderbist avatar Jun 20 '22 12:06 AlexVanderbist