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

fix(dex): change to clusterrole for crd creation #1203

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Synehan
Copy link

@Synehan Synehan commented Dec 18, 2020

Q A
Bug fix? yes
New feature? no
API breaks? no
Deprecations? no
Related tickets none
License Apache 2.0

What's in this PR?

Allows Dex to create CRD through a clusterrole

Why?

Dex creates its own CRD when deployed, and as CRD are ClusterScoped resources, you need a clusterrole / clusterrolebinding.
Else, dex log the following message:

 time="2020-12-18T08:40:24Z" level=error msg="creating custom resource devicetokens.dex.coreos.com: POST https://[]:443/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions Forbidden: response from server \"{\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"customresourcedefinitions.apiextensions.k8s.io is forbidden: User \\\"system:serviceaccount:infra-dex:dex\\\" cannot create resource \\\"customresourcedefinitions\\\" in API group \\\"apiextensions.k8s.io\\\" at the cluster scope\",\"reason\":\"Forbidden\",\"details\":{\"group\":\"apiextensions.k8s.io\",\"kind\":\"customresourcedefinitions\"},\"code\":403}\""

Checklist

  • Code meets the Developer Guide
  • User guide and development docs updated (if needed)
  • Related Helm chart(s) updated (if needed)

@Synehan Synehan marked this pull request as ready for review December 18, 2020 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant