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(client): added Linode client #9

Merged
merged 6 commits into from
Dec 6, 2023

Conversation

shanduur
Copy link
Member

@shanduur shanduur commented Nov 30, 2023

What this PR does / why we need it:

Added base code for the Linode client based on linodego.

Three major changes were made:

  1. First, to support adding the version to the user agent, new package (version) was added. This is approach partially inspired by the Podman, but relies purely on link-time injection of variable value (see: https://pkg.go.dev/cmd/link).
  2. Second, added linodeclient package and defined base for LinodeClient interface. It allowed easily plug limit the number of methods exposed to anyone using the client. It also allows for dependency injection.
  3. Thanks to the interface created previously, now we can define the stub client, that simplifies process of writing unit tests for the provisioner server.

Which issue(s) this PR resolves:

N/A

Special notes for your reviewer:

N/A

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

N/A

@shanduur shanduur force-pushed the feat-linode-client branch 8 times, most recently from c1994dd to 34a468a Compare December 5, 2023 21:06
pkg/envflag/envflag_test.go Outdated Show resolved Hide resolved
pkg/linodeclient/stubclient/stubclient.go Outdated Show resolved Hide resolved
pkg/linodeclient/stubclient/stubclient.go Outdated Show resolved Hide resolved
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.

LGTM!

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.

LGTM, thanks for applying my change

@shanduur shanduur merged commit 4e30bf2 into linode:main Dec 6, 2023
6 checks passed
@shanduur shanduur deleted the feat-linode-client branch December 6, 2023 19:47
@shanduur shanduur added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 13, 2023
@shanduur shanduur mentioned this pull request Mar 27, 2024
shanduur added 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
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