Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug] Gate inputFrom.configMapKeyRef fails with the default chart: the manager role has no ConfigMap permission

Chiusa
#649 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #650 di @wankhede04 — integrata

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go, helm, kubernetes

Direzione di ricerca

The read happens in internal/controller/genplan.go, which calls r.Client.Get on a ConfigMap, and the manager role lives in the chart's RBAC templates. Check whether the cache-backed client needs an informer for corev1.ConfigMap and whether the role needs get, or get;list;watch. Done when a user holding only get on ConfigMaps can resolve a configMapKeyRef gate input. PR #650 is already open against this, so discuss the approach there before starting.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

rbac

What happens

A TemporalWorkerDeployment whose rollout gate reads its input from a ConfigMap:

  rolloutStrategy:
    gate:
      workflowType: ...
      inputFrom:
        configMapKeyRef:
          name: gate-input
          key: payload.json

never gets its gate input on a cluster that enforces RBAC with the chart's default roles.

Why

internal/controller/genplan.go reads the ConfigMap with r.Client.Get. The manager's client is cache-backed, so the
first Get starts a ConfigMap informer, which needs list and watch on ConfigMaps. The generated manager role has no
configmaps rule at all. The only ConfigMap rule in the chart is the leader-election Role in the release namespace.

secretKeyRef works because the role grants get;list;watch on secrets.

The feature is documented (docs/configuration.md, "Gate workflow input details") and was added in #152.

How I checked

Against an API server with --authorization-mode=RBAC, as a user holding only get on ConfigMaps:

  • a cache-backed Get of the ConfigMap blocks until the informer-sync timeout and fails with
    Timeout: failed waiting for *v1.ConfigMap Informer to sync
  • a direct LIST is forbidden, as expected

I have not reproduced it on a full chart install. It is easy to miss on clusters where the controller's
ServiceAccount is broadly permissive.

Proposed fix

Add get on ConfigMaps to the manager role and read ConfigMaps directly (cache bypass for corev1.ConfigMap in
the manager's client options), so the controller needs no list or watch and does not cache every ConfigMap.

The alternative is get;list;watch, like secrets. That is one line, but it caches all ConfigMaps in the watched
namespaces. Which do you prefer? Happy to send the PR either way.

Lingua principale
Go
Stelle
197
Fork
82
Merge medio
3g 2h
PR unite (30g)
31

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di temporalio/temporal-worker-controller

Tutte le issue di temporalio/temporal-worker-controller

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.