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

Add support for OpenShift 4.0 #139

Closed
cben opened this issue May 19, 2019 · 5 comments · Fixed by #164
Closed

Add support for OpenShift 4.0 #139

cben opened this issue May 19, 2019 · 5 comments · Fixed by #164
Assignees
Milestone

Comments

@cben
Copy link
Contributor

cben commented May 19, 2019

ManageIQ uses /oapi/Foo endpoints for all openshift-specific resources.
This was an openshift-specific path, probably predating api groups in k8s; all these have long been mirrored as various "normal" api groups e.g. /apis/template.openshift.io/Template.

IIUC, openshift/origin#21782 completely dropped /oapi from Openshift 4.0.
Good riddance, but that means ManageIQ will not work against Openshift 4.0.

cc @oourfali @jhernand @agrare for visibility.

@cben
Copy link
Contributor Author

cben commented May 19, 2019

Not sure yet how much "will not work". Ideally k8s parts should still work, but I don't remember how tolerant the inventory code is to partial failures. Will update when I get around to testing this.

@agrare
Copy link
Member

agrare commented May 20, 2019

Hey @cben thanks a lot for the ping!

It it as simple as switching from /oapi to /apis/user.openshift.io? Is that newer api available on older openshift versions as well, or is it a hard if >= 4.0; /apis/user.openshift.io; else /oapi; end

@cben cben removed the blocker label May 24, 2019
@cben
Copy link
Contributor Author

cben commented May 24, 2019

@ourfali tells me we don't intend to support openshift 4.x at all.

It it as simple as switching from /oapi to /apis/user.openshift.io?

A little bit harder, as there are multiple api groups under /apis, and we'll need a separate Kubeclient::Client for each group.

Is that newer api available on older openshift versions as well

Yes, starting 3.6. Do we support anything older?

if >= 4.0

Due to openshift/origin#22901, version-sniffing 4.x is problematic.
But presence of old / new endpoints is not hard to test.

@chessbyte chessbyte changed the title /oapi is gone in openshift 4.0 Add support for OpenShift 4.0 Mar 30, 2020
@chessbyte chessbyte added this to the Jansa milestone Apr 7, 2020
@chessbyte chessbyte linked a pull request Apr 7, 2020 that will close this issue
4 tasks
@cben
Copy link
Contributor Author

cben commented Apr 10, 2020

@agrare Does https://github.com/ManageIQ/manageiq-providers-openshift/blob/master/app/models/manageiq/providers/openshift/container_manager/container_template.rb also need adaptation?
It already does api_group => "template.openshift.io" to process the template itself, but not sure about create_object... I think it takes apiVersion and kind from the template itself, so maybe it does work? (assuming the template is openshift 4 compatible)

Also create_project

def create_project(project)
connect.create_project_request(project)

I no longer remember what user-visible functionalities these supports :-|

It might make sense to lift some of the #164 changes into container_manager_mixin.rb, your call.


As you notice, I'm increasingly losing touch with manageiq, had near zero work time for it last few months... The time I do have I prefer to focus on kubeclient.

@agrare
Copy link
Member

agrare commented Apr 13, 2020

Thanks @cben I missed create_project (I was searching for \.connect)

I thought that connect_client handled that by doing api, version = api_version.split('/', 2) and :path => '/apis/' + api but I'll double check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Jansa
Development

Successfully merging a pull request may close this issue.

4 participants