-
Notifications
You must be signed in to change notification settings - Fork 59
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
Enable CPI Release golang #290
Conversation
9ed0509
to
c54a6b4
Compare
Co-authored by @a-hassanin, @anshrupani, @mvach, @ShilpaChandrashekara, @fmoehler |
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.
These calls seem to be incompatible with Windows:
See Go / Run tests and Lint on windows-2019
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.
LGTM
d810be1
to
826769a
Compare
I'd recommend adding a name: go
on:
push:
paths:
- 'src/openstack_cpi_golang/**'
pull_request:
paths:
- 'src/openstack_cpi_golang/**'
jobs:
lint_and_test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
name: lint and test
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: src/openstack_cpi_golang/go.mod
- uses: golangci/golangci-lint-action@v6
with:
working-directory: src/openstack_cpi_golang/
- run: run-unit-tests
working-directory: src/openstack_cpi_golang/
- run: run-integration-tests
working-directory: src/openstack_cpi_golang/ And adding a |
Outcome of this PR
This PR is a follow up on #278, here we provide the complete implementation of the Golang-implemented job 'openstack_cpi_golang'. This job is completely independent, and can be used as an alternative to the job 'openstack_cpi'.
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)
Difference
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.
Note
This golang implementation is based on the Ruby version as of Mar 22, 2024.