[Bug] Gate inputFrom.configMapKeyRef fails with the default chart: the manager role has no ConfigMap permission
Los mantenedores suelen responder en 1 día
Ya se ha fusionado un pull request relacionado.
- #650 de @wankhede04 — fusionado
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- go, helm, kubernetes
- Área
- authorization, infrastructure
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 198
- Forks
- 84
- Merge medio
- 2 d 18 h
- PR fusionados (30 d)
- 35
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de temporalio/temporal-worker-controller
-
enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
temporalio/temporal-worker-controller#692 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
documentation good first issue help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
temporalio/temporal-worker-controller#691 ·
Los mantenedores suelen responder en 1 día
-
[Feature Request] Configure temporal-worker-controller to use hostNetworkPosiblemente ocupada @josh-ferrell la tomó hace 10 días. Abiertohelm
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
temporalio/temporal-worker-controller#680 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Feature Request] Helm chart: support topologySpreadConstraints on the controller DeploymentPosiblemente ocupada @akolacz la tomó hace 17 días. Abiertohelm
temporalio/temporal-worker-controller#658 · 1 reacción · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
rbac
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
temporalio/temporal-worker-controller#654 ·
Los mantenedores suelen responder en 1 día
Todos los issues de temporalio/temporal-worker-controller
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
dragonflydb/dragonfly-operator#619 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
cloudfoundry/bosh-bootloader#701 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
baremetal: private network check rejects offer-specific options (Private Network 10Gbps / 25Gbps)Posiblemente ocupada @lbarrosby la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
scaleway/terraform-provider-scaleway#4587 ·
Los mantenedores suelen responder en 1 día
-
blocked-needs-validation bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
projectcapsule/capsule#2280 ·
Los mantenedores suelen responder en 1 día