-
Notifications
You must be signed in to change notification settings - Fork 61
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
Introduce a new job with a golang CPI skeleton #278
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on the team that is doing this work alongside @a-hassanin, so I approve this change as we use it internally.
This looks great, congratulations on starting the conversion to golang. You may want to add a linter, either as part of CI or using github actions. There are a few examples in CF including: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a viable first step.
Do you want us to cut a new release of the CPI with this in it? Or do you want to wait for more changes? |
Thanks for merging. We do not need a release right now, still a lot of subsequent PRs are following ;) |
As mentioned before in the community meeting, we are currently developing and started using a new Golang-based Openstack CPI. Over the course of the next weeks/months we will follow up with many small PRs that you can easily follow and review, hoping that we catch up with the our internal implementation and use/develop directly from this upstream code-base.
Outcome of this PR
With this PR, we are introducing a new independent job for the Bosh release which can be used instead to use the Golang version of the CPI. Instead of doing a big bang rollout, we are developing and improving the Go-based implementation one CPI method at a time. With the help of the cpi.erb template we navigate unimplemented/erroneous cpi method calls to the the ruby or go implementations.
In this PR, we introduce the skeleton of the src folder, and only an implementation of the 'info' CPI method call.
Background
Maintaining the existing Ruby CPI implies sustaining the used openstack-fog and fog core libraries. But that would be very problematic since the communities for these libraries do not seem to be active since some years now.
Fog isn't just a thin wrapper around the OpenStack API. On the contrary, Fog returns rich modules and classes that need to be refreshed, updated, ... . That means, replacing Fog calls by REST calls isn't a trivial task and will finally end up in a more or less complete re-implementation of the CPI.
A Golang based CPI reimplementation would profit from the existence of an actively maintained Golang SDK for OpenStack (see: https://github.com/gophercloud/gophercloud)
Worth to mention, this is not a 1:1 implementation of the Ruby CPI. We try to improve and change the structure as we best see fit. Deprecated APIs are not supported by this CPI, hence we only support the Octavia APIs, Compute APIs, Networking APIs ... and not the neutron/networking endpoints.