-
Notifications
You must be signed in to change notification settings - Fork 3
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
Token Refresher needs a ServiceAccount to list namespaces #3
Comments
Hi, Current error log:
Thanks. |
If you're familiar with creating service accounts and binding roles, I think there's enough information in the issue to resolve it... We should really put this fix into another new release. This could be v2.19.5. I didn't realize it was still open, I thought we'd already resolved all of the ServiceAccount issues, but evidently nobody is using external registry at Team Hephy so this one got skipped over. At a glance, I think you could
Let us know please if this helps! (Or if you get any more errors... I have a sneaking suspicion that registry-token-refresher is actually going to need more permissions than this.) |
Actually I think you may also need to add the service account to the deployment spec before deleting the pod, like this: ( ... skip to the deployment
The new pod will pick up this new spec after you delete the running pod (or honestly I think editing the deployment should trigger that to happen automatically... as long as you do this step last) |
@kingdonb , do we need a fix for this one? |
The registry-token-refresher deployment needs a service account to refresh tokens for ECR (and other externally provided registry services, I presume).
The SA should get bound (ClusterRoleBinding) to a role that has permission to list namespaces, like this:
and the ServiceAccount needs to be linked to the pod in the
registry-token-refresher
deployment's podtemplate.spec
, like:That ServiceAccount needs to be created as well, since registry-token-refresher evidently didn't need any SA until RBAC in k8s 1.9
@bit-herder found this
The text was updated successfully, but these errors were encountered: