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

Unable to create a Template on OCP3 #373

Closed
istraka opened this issue Jul 17, 2020 · 1 comment · Fixed by #374
Closed

Unable to create a Template on OCP3 #373

istraka opened this issue Jul 17, 2020 · 1 comment · Fixed by #374

Comments

@istraka
Copy link
Contributor

istraka commented Jul 17, 2020

I am getting

io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://api.multinode-nfs-022.dynamic.xpaas:8443/apis/template.openshift.io/v1/namespaces/istraka-namespace-2/templates. Message: the API version in the data (v1) does not match the expected API version (template.openshift.io/v1). Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=the API version in the data (v1) does not match the expected API version (template.openshift.io/v1), metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).

With 4.9.2 it was OK.

After some debugging, the difference is in URL:
4.9.2:

https://api.multinode-nfs-022.dynamic.xpaas:8443/oapi/v1/namespaces/istraka-namespace/templates

4.10.2

https://api.multinode-nfs-022.dynamic.xpaas:8443/apis/template.openshift.io/v1/namespaces/istraka-namespace-2/templates

Workaround:

template.setApiVersion("template.openshift.io/v1");
@mchoma
Copy link
Contributor

mchoma commented Jul 28, 2020

Thinking about this I believe kubernetes client should keep backward compatibility and therefore I have created fabric8io/kubernetes-client#2373.

And believe workaround introduced by this MR should be temporary, until they will fix it.

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 a pull request may close this issue.

2 participants