linode / linode/linode-cosi-driver

[FEATURE]: Support dynamic API client configuration

Open
#69 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted kind/feature
Dominant language
Go
Stars
10
Forks
9
Avg merge
2d 22h
Merged PRs (30d)
9

Description

Are you interested in contributing to the development of this feature?

Yes

Is your feature request related to a problem? Please describe.

Currently, the driver uses a static API client configuration that doesn't allow for dynamic creation or customization of API clients based on user requirements. This limitation can be problematic for users who need to interact with different accounts, e.g. using different credentials or endpoints.

Describe the solution you'd like.

Add common parameter that can be added to both BucketClass and BucketAccessClass to dynamically create new client, e.g.:

# ...
parameters:
 # ...
 cosi.linode.com/v1/secretRef: namespace/name

The secret should have the following format:

# ...
stringData:
 LINODE_TOKEN: 'xxxx...'                  # REQUIRED
 LINODE_URL: 'https://api.linode.com/'    # optional, url without version
 LINODE_API_VERSION: 'v4'                 # optional
 LINODE_DEBUG: '0'                        # optional, 0 or 1
 LINODE_CA: |                             # optional
   ...

If no secretRef is provided, then it should fallback to default client.

Describe alternatives you've considered.

N/A

Additional Information

Any other relevant information about the feature request.

  • Ensure that the implementation includes proper validation of the provided secrets to ensure they contain the required fields.
  • Consider adding logging and error handling to help users troubleshoot any issues related to the dynamic client configuration.
  • Provide documentation and examples to guide users on how to create and use the secret references for dynamic API client configuration.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing static API client and how BucketClass and BucketAccessClass parameters are handled. Review the requested secret format and define validation, fallback, logging, and error-handling behavior; the work is done when dynamic clients, default-client fallback, and usage documentation and examples are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.