-
Notifications
You must be signed in to change notification settings - Fork 145
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
Mismatch between OpenShift API spec and client APIs breaks SecurityContextConstraints #170
Comments
I thought that it would be possible to avoid the problems with the CoreV1Api and SecurityContextConstraints by using the security.openshift.io/v1 group, but I was wrong:
The last part is one of the deserialization problems from #52, but this one is at least in the OpenShift client so theoretically you can fix it. It's unclear to me if the failed lookups on |
Yeah. This, unfortunately, is not unique. If you have a look at the script we use to generate the openshift client (https://github.com/openshift/openshift-restclient-python/blob/master/scripts/update-client.sh#L97) you'll see a couple of the others that we have come across. This is a class of issue where the generated client is actually too strict when compared to the k8s/openshift api server. I would encourage you to use the dynamic client, mentioned here (https://github.com/openshift/openshift-restclient-python/#dynamic-client-usage) and see if that solves your problem. Since the dynamic client talks directly to the api server, I expect it will. |
When you query the OpenShift API server, it claims that the SecurityContextConstraints resource is available on the
CoreV1Api
object.This is true for the OpenShift API server itself, since you can post a REST request against
/api/v1/securitycontextconstraints
and get something back. It is not true, of course, for this client, becauseCoreV1API
is a Kubernetes client class that doesn't know about OpenShift resources. I've been discovering APIs by looking at the return values ofget_api_resources()
and other methods that ultimately depend on the API server but don't reflect what methods are available on the clients or where they're available.Similarly, the documentation shows the security_context_constraints methods on the
CoreV1Api
object, but the links are dead.The text was updated successfully, but these errors were encountered: