chart: api-syncagent Role/RoleBinding leaked into 'default' namespace instead of release ns
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- helm, kubernetes
- Domain
- devops, infrastructure
Research direction
Start by locating the api-syncagent chart templates that emit the Role and RoleBinding, then render them with the reported helm template command using --namespace my-agent. Confirm both resources use the release namespace rather than default, and verify the rendered output shows namespace: my-agent for each.
Written by the indexing model from the issue text.
Description
Problem
When helm template (or install) the api-syncagent chart against a target --namespace X, most resources correctly land in X, but the Role and RoleBinding for the events leader-election lock emerge with namespace: default instead of namespace: X.
Reproducer:
helm template test api-syncagent/api-syncagent --version 0.4.2 --namespace my-agent | grep -B1 -A10 'kind: Role'
Impact
- On shared clusters, every sync-agent install quietly writes into
defaultns. - Multiple sync-agents collide on the same names in
default(leader-election lock, etc.). - Violates least-privilege posture — operators targeting a dedicated namespace don't expect cluster-wide or other-ns writes.
Suspected cause
Helm templates omit .metadata.namespace on Role/RoleBinding. Helm then defaults the namespace to the --namespace flag, unless a release-namespace override is applied somewhere (e.g., {{ .Release.Namespace }} missing from the template, --create-namespace not honored, or a namespace: default literal sneaking in).
Fix
Set namespace: {{ .Release.Namespace }} on the Role + RoleBinding in the templates, matching every other namespace-scoped resource the chart emits.
Noticed at
apeirora/showroom-msp-dati during cluster-infra bring-up for a new dati-syncagent. Same behavior observed for private-llm-sync-agent and cncf-postgres-sync-agent on the same shared MSP cluster (msp03 cc-d2).
- Dominant language
- Go
- Stars
- 25
- Forks
- 30
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from kcp-dev/api-syncagent
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
kcp-dev/api-syncagent#163 ·
-
kind/feature
Difficulty 4/5 3-5 days Newbie friendliness 48/100
kcp-dev/api-syncagent#186 · 1 reaction ·
-
kind/bug
kcp-dev/api-syncagent#182 · 1 comment · 1 assignee ·
-
bug: finalizer "syncagent.kcp.io/cleanup" on related resources block deletion of primary object Openkind/bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
kcp-dev/api-syncagent#172 · 1 comment · 1 reaction ·
-
kind/feature
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
kcp-dev/api-syncagent#157 ·
All issues in kcp-dev/api-syncagent
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100