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

Enable CPI Release golang #290

Merged
merged 8 commits into from
Oct 31, 2024
Merged

Conversation

OBoehrer
Copy link
Contributor

@OBoehrer OBoehrer commented Oct 18, 2024

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.

Copy link

linux-foundation-easycla bot commented Oct 18, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@fmoehler
Copy link
Contributor

fmoehler commented Oct 21, 2024

Co-authored by @a-hassanin, @anshrupani, @mvach, @ShilpaChandrashekara, @fmoehler

Copy link
Contributor

@a-hassanin a-hassanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@a-hassanin a-hassanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rkoster rkoster requested review from a team, selzoc and rajathagasthya and removed request for a team October 24, 2024 14:48
@aramprice
Copy link
Member

aramprice commented Oct 24, 2024

I'd recommend adding a .golangci.yml, specifically having a longer timeout: can help with windows linting as well as updating the go.yml workflow to something like cloudfoundry/bosh-warden-cpi-release's go.yml

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 dependabot.yml will keep these Github Actions (rather than hard-coded uses of golangci-lint) up to date.

@jpalermo jpalermo merged commit e723996 into cloudfoundry:master Oct 31, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

5 participants