Skip to content

Commit

Permalink
fix: serviceaccounts access is needed for v2.9.0 (#283)
Browse files Browse the repository at this point in the history
After the support for serviceaccounts replication feature is added (#249), the deployment will fail with error `kubernetes-replicator:kubernetes-replicator" cannot list resource "serviceaccounts" in API group "" at the cluster scope`
This should be the default RBAC for new installs
  • Loading branch information
budimanjojo authored Jun 20, 2023
1 parent 25b3f78 commit 9a34565
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions deploy/helm-chart/kubernetes-replicator/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rules:
resources: [ "namespaces" ]
verbs: [ "get", "watch", "list" ]
- apiGroups: [""]
resources: ["secrets", "configmaps"]
resources: ["secrets", "configmaps", "serviceaccounts"]
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["roles", "rolebindings"]
Expand All @@ -47,4 +47,4 @@ subjects:
- kind: ServiceAccount
name: {{ include "kubernetes-replicator.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion deploy/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rules:
resources: [ "namespaces" ]
verbs: [ "get", "watch", "list" ]
- apiGroups: [""] # "" indicates the core API group
resources: ["secrets", "configmaps"]
resources: ["secrets", "configmaps", "serviceaccounts"]
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["roles", "rolebindings"]
Expand Down

0 comments on commit 9a34565

Please sign in to comment.