Skip to content

[FEATURE]: Support dynamic API client configuration #69

@shanduur

Description

@shanduur

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions