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

feat(provisioner): provisioner server implementation #18

Merged
merged 9 commits into from
Jan 13, 2024

Conversation

shanduur
Copy link
Contributor

@shanduur shanduur commented Dec 27, 2023

What this PR does / why we need it:

This pull request addresses several aspects related to the Linode COSI driver for object storage provisioning. The key changes are outlined below:

  1. Tests:

    • Added base unit tests for the provisioner.
    • Fixed and extended existing unit tests for improved coverage.
    • Added happy-path integration tests to cover various operations, such as creating a bucket, granting and revoking bucket access, and deleting a bucket.
  2. Feature Addition:

    • Added server-side calls to add the complete functionality of the provisioner.
  3. Documentation Update:

    • Updated the README to include basic usage information.
  4. Example Fixes:

    • Set the correct cluster in the examples for improved clarity.

Which issue(s) this PR resolves:

N/A

Special notes for your reviewer:

The integration tests have prerequisites that need to be met before execution. Ensure the Linode account, API token, and other environment variables are correctly set. Additionally, focus on the newly added server-side calls and verify the correctness of the example fixes.

Additional documentation e.g., enhancement proposals, usage docs, etc.:

Added basic usage documentation located in README.md.

@shanduur shanduur changed the title Feat/provisioner feat(provisioner): provisioner server implementation Dec 27, 2023
@shanduur shanduur force-pushed the feat/provisioner branch 3 times, most recently from e1f9924 to 4cadaf0 Compare December 27, 2023 17:49
@shanduur shanduur self-assigned this Dec 27, 2023
@shanduur shanduur added area/api Indicates an issue on api area. area/example kind/feature Categorizes issue or PR as related to a new feature. labels Dec 27, 2023
@shanduur shanduur marked this pull request as ready for review December 27, 2023 20:18
avestuk
avestuk previously approved these changes Jan 2, 2024
pkg/servers/provisioner/provisioner.go Outdated Show resolved Hide resolved
avestuk
avestuk previously approved these changes Jan 10, 2024
pkg/observability/tracing/tracing.go Outdated Show resolved Hide resolved
pkg/servers/provisioner/provisioner.go Outdated Show resolved Hide resolved
avestuk
avestuk previously approved these changes Jan 10, 2024
Copy link

@lgarber-akamai lgarber-akamai left a comment

Choose a reason for hiding this comment

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

Tested locally using the following steps and all OBJ resources seem to have provisioned as expected:

# Build and push the Linode COSI image
docker build -t lgarberakamai/linode-cosi-driver:v0.0.0 --build-arg=VERSION=v0.0.0 --push .

# Install COSI CRDS & controller
kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface-api
kubectl create -k github.com/kubernetes-sigs/container-object-storage-interface-controller

# Install Linode COSI driver
helm upgrade --install linode-cosi ./helm/linode-cosi-driver \
  --set "apiToken=$LINODE_TOKEN" \
  --set "driver.image.repository=docker.io/lgarberakamai/linode-cosi-driver" \
  --set "driver.image.tag=v0.0.0" \
  --namespace linode-cosi-driver --create-namespace

# Apply example manifests
kubectl create -f ./examples
sleep 5

# Validate an OBJ bucket and access keys have been created
linode-cli obj ls
linode-cli object-storage keys-list

# Destroy the example manifests
kubectl destroy -f ./examples
sleep 5

# Validate an OBJ bucket and access keys have been deleted
linode-cli obj ls
linode-cli object-storage keys-list

Great work!

@shanduur shanduur merged commit de570f7 into linode:main Jan 13, 2024
7 checks passed
@shanduur shanduur deleted the feat/provisioner branch January 13, 2024 18:39
@shanduur shanduur mentioned this pull request Mar 27, 2024
shanduur pushed a commit that referenced this pull request Mar 27, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>0.1.0</summary>

##
[0.1.0](v0.1.0...v0.1.0)
(2024-03-27)


### Features

* added base repo scaffolding
([#2](#2))
([905538a](905538a))
* automatically adjust GOMAXPROCS based on the CPU quota
([#36](#36))
([ebbb0f0](ebbb0f0))
* **client:** added Linode client
([#9](#9))
([4e30bf2](4e30bf2))
* **docker:** added base dockerfile
([#3](#3))
([a2246f0](a2246f0))
* **helm:** added Helm chart to allow installation of the driver
([#12](#12))
([c9853f4](c9853f4))
* **o11y:** added observability with OpenTelemetry
([#15](#15))
([337b7ce](337b7ce))
* **provisioner:** provisioner server implementation
([#18](#18))
([de570f7](de570f7))


### Bug Fixes

* correct suffix in labels
([#8](#8))
([98c3c46](98c3c46))
* **deps:** bump actions/checkout from 3 to 4
([#7](#7))
([04a44ce](04a44ce))
* **deps:** bump actions/setup-go from 4 to 5
([#10](#10))
([65ddd5f](65ddd5f))
* **deps:** bump github.com/go-resty/resty/v2 from 2.11.0 to 2.12.0
([#41](#41))
([666dc45](666dc45))
* **deps:** bump github.com/go-resty/resty/v2 from 2.9.1 to 2.11.0
([#19](#19))
([7055a98](7055a98))
* **deps:** bump github.com/grpc-ecosystem/go-grpc-middleware/v2 from
2.0.1 to 2.1.0
([#42](#42))
([dfecaa2](dfecaa2))
* **deps:** bump github.com/linode/linodego from 1.25.1-* to 1.26.0
([#16](#16))
([78526d4](78526d4))
* **deps:** bump github.com/linode/linodego from 1.26.0 to 1.27.0
([#21](#21))
([0042442](0042442))
* **deps:** bump github.com/linode/linodego from 1.27.0 to 1.29.0
([#38](#38))
([9797a25](9797a25))
* **deps:** bump github.com/linode/linodego from 1.29.0 to 1.30.0
([#43](#43))
([fd5aebd](fd5aebd))
* **deps:** bump github.com/linode/linodego from 1.30.0 to 1.31.0
([#44](#44))
([e4b354f](e4b354f))
* **deps:** bump golangci/golangci-lint-action from 3 to 4
([#31](#31))
([2896353](2896353))
* **deps:** bump google.golang.org/grpc from 1.59.0 to 1.60.0
([#14](#14))
([3125f23](3125f23))
* **deps:** bump google.golang.org/grpc from 1.60.0 to 1.60.1
([#17](#17))
([13153c1](13153c1))
* **deps:** bump google.golang.org/grpc from 1.60.1 to 1.61.0
([#29](#29))
([1ad35ad](1ad35ad))
* **deps:** bump google.golang.org/grpc from 1.61.0 to 1.61.1
([#35](#35))
([b13493f](b13493f))
* **deps:** bump google.golang.org/grpc from 1.61.1 to 1.62.0
([#39](#39))
([10571c9](10571c9))
* **deps:** bump google.golang.org/grpc from 1.62.0 to 1.62.1
([#40](#40))
([183b58e](183b58e))
* **deps:** bump the otel-dependencies group with 10 updates
([#32](#32))
([7dd63f4](7dd63f4))
* **deps:** bump the otel-dependencies group with 10 updates
([#37](#37))
([a3f3a1d](a3f3a1d))
* **deps:** bump the otel-dependencies group with 5 updates
([#28](#28))
([3bf403d](3bf403d))
* **linters:** updated linter rules
([#33](#33))
([1a1af77](1a1af77))


### Continuous Integration

* added release automation
([#20](#20))
([2d0af79](2d0af79))
</details>

<details><summary>linode-cosi-driver: 0.1.0</summary>

##
[0.1.0](linode-cosi-driver-v0.1.0...linode-cosi-driver-v0.1.0)
(2024-03-27)


### Features

* automatically adjust GOMAXPROCS based on the CPU quota
([#36](#36))
([ebbb0f0](ebbb0f0))
* **docker:** added base dockerfile
([#3](#3))
([a2246f0](a2246f0))
* **helm:** added Helm chart to allow installation of the driver
([#12](#12))
([c9853f4](c9853f4))
* **o11y:** added observability with OpenTelemetry
([#15](#15))
([337b7ce](337b7ce))
* **provisioner:** provisioner server implementation
([#18](#18))
([de570f7](de570f7))


### Continuous Integration

* added release automation
([#20](#20))
([2d0af79](2d0af79))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Signed-off-by: Mateusz Urbanek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Indicates an issue on api area. area/example kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants