mittwald / kubernetes-replicator

Kubernetes controller for synchronizing secrets & config maps across namespaces
Apache License 2.0
886 stars 101 forks source link

feat: add support for serviceaccount object #249

Closed rasta-rocket closed 1 year ago

rasta-rocket commented 1 year ago

Hi @martin-helmich

This is a little contribution to add the support of service account

It is quite useful to add service account with a standard name over the whole cluster

Don't hesitate if you need more details

Cheers

ADUDevEx commented 1 year ago

Hello @martin-helmich, I'd love this be merged, any chance you have time to review it ?

oberlon commented 1 year ago

ClusterRole has no permission to List serviceaccounts. E0619 15:46:36.632731 1 reflector.go:148] pkg/mod/k8s.io/client-go@v0.27.3/tools/cache/reflector.go:231: Failed to watch *v1.ServiceAccount: failed to list *v1.ServiceAccount: serviceaccounts is forbidden: User "system:serviceaccount:kubernetes-replicator:kubernetes-replicator" cannot list resource "serviceaccounts" in API group "" at the cluster scope

budimanjojo commented 1 year ago

I have the same error as @oberlon after updating to latest version.

Update: I have opened a PR for the fix https://github.com/mittwald/kubernetes-replicator/pull/283