Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when ServiceAccount is on a different namespace then default, the ClusterRoleBinding still references the default namespace #201

Closed
shay-ul opened this issue Jul 3, 2022 · 4 comments
Labels

Comments

@shay-ul
Copy link

shay-ul commented Jul 3, 2022

Describe the bug
When installing the chart as a dependency for a different chart which is namespace scoped, the replicator ServiceAccount is created on the desired namespace, however the ClusterRoleBinding still references the ServiceAccount in a default namespace.

To Reproduce
Add Kubernetes-replicator as a subchart for a different, namespace-scoped helm chart.

Expected behavior
The ClusterRoleBinding should reference kubernetes-replicator ServiceAccount in the correct namespace. Alternately, force the creation of the ServiceAccount on the default namespace.

Environment:

  • Kubernetes version: 1.19
  • kubernetes-replicator version: 2.7.3

Logs from kubernetes-replicator pod (private information omitted between <>) :

E0703 07:49:34.929843 1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.22.4/tools/cache/reflector.go:167: Failed to watch *v1.Secret: failed to list *v1.Secret: secrets is forbidden: User "system:serviceaccount:<custom_namespace>:<release_name>-kubernetes-replicator" cannot list resource "secrets" in API group "" at the cluster scope

@shay-ul shay-ul added the bug label Jul 3, 2022
@shay-ul
Copy link
Author

shay-ul commented Jul 3, 2022

might be related to #13

@mittwald-machine
Copy link
Collaborator

There has not been any activity to this issue in the last 14 days. It will automatically be closed after 7 more days. Remove the stale label to prevent this.

@shay-ul
Copy link
Author

shay-ul commented Jul 23, 2022

@martin-helmich any chance to remove the stale label? :)

@shay-ul
Copy link
Author

shay-ul commented Aug 1, 2022

Closing as the problem relies with the fact that you cannot specify namespace for sub-charts in Chart.yaml, therefore helmfile should be used.
helm/helm#5358

@shay-ul shay-ul closed this as completed Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants