Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Error on service account #381

Closed
mimmus opened this issue Oct 25, 2022 · 2 comments
Closed

Error on service account #381

mimmus opened this issue Oct 25, 2022 · 2 comments

Comments

@mimmus
Copy link

mimmus commented Oct 25, 2022

I'm seeing this message:
ERR error fetching referenced service account, continue without service account imagePullSecrets error="serviceaccounts \"myapp-services\" is forbidden: User \"system:serviceaccount:k8s-image-swapper:k8s-image-swapper\" cannot get resource \"serviceaccounts\" in API group \"\" in the namespace \"myns\""
at every access.

To give needed permissions to k8s-image-swapper, I'm using an EC2 Role.

@ghost
Copy link

ghost commented Dec 2, 2022

You need to create a ClusterRole with the appropriate permissions, for example in Terraform:

rule {
api_groups = [""]
resources = [
"serviceaccounts",
"secrets",
]
verbs = ["
"]
}
and bind it to the service account using a ClusterRoleBinding. That's what did it for me. :]

@mimmus
Copy link
Author

mimmus commented Dec 6, 2022

Thank you @mvchris ! I reduced verbs to ["get", "list"]

Edit
setting secretReader in values.yaml (if using Helm) automatically create ClusterRoles/ClusterRoleBinding:

secretReader:
  enabled: true

Repository owner locked and limited conversation to collaborators Dec 15, 2022
@estahn estahn converted this issue into discussion #413 Dec 15, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant