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

BUG: "system:serviceaccount:openunison:openunison-orchestra" cannot get resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster #59

Open
droslean opened this issue Nov 24, 2022 · 4 comments

Comments

@droslean
Copy link

Caused by: java.io.IOException: Unexpected result calling 'https://10.245.0.1:443/apis/apiextensions.k8s.io/v1/customresourcedefinitions/targets.openunison.tremolo.io' - 403 / {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"customresourcedefinitions.apiextensions.k8s.io \"targets.openunison.tremolo.io\" is forbidden: User \"system:serviceaccount:openunison:openunison-orchestra\" cannot get resource \"customresourcedefinitions\" in API group \"apiextensions.k8s.io\" at the cluster scope","reason":"Forbidden","details":{"name":"targets.openunison.tremolo.io","group":"apiextensions.k8s.io","kind":"customresourcedefinitions"},"code":403}

Why?

@droslean
Copy link
Author

The solution is to create a cluster role that allows to get customresourcedefinitions and bind it to the orchestra service account.

The question remains, why does Openunison need this kind of permission?

@mlbiam
Copy link
Contributor

mlbiam commented Nov 24, 2022

How did you deploy openunison? Using the helm charts manually or using the ouctl command? Also, what is the output of helm list -n openunison?

@droslean
Copy link
Author

Everything worked fine, but when I upgrade my cluster the openunison crashed because of this. When I first installed openusinon I used helm.

@mlbiam
Copy link
Contributor

mlbiam commented Nov 25, 2022

Thanks @droslean, this is a known issue. run:

helm repo update
helm upgrade tremolo/openunison-operator -n openunison -f /path/to/values.yaml
helm upgrade tremolo/orchestra -n openunison -f /path/to/values.yaml
helm upgrade tremolo/orchestra-login-portal -n openunison -f /path/to/values.yaml

that will update your manifests and include the missing ClusterRoleBinding and ClusterRole. You can also download the ouctl command:

helm repo update
./ouctl install-auth-portal /path/to/values.yaml

instead of running helm manually

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

No branches or pull requests

2 participants