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

[FEATURE]: Support dynamic API client configuration #69

Open
shanduur opened this issue Jun 11, 2024 · 0 comments · May be fixed by #82
Open

[FEATURE]: Support dynamic API client configuration #69

shanduur opened this issue Jun 11, 2024 · 0 comments · May be fixed by #82
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@shanduur
Copy link
Member

shanduur commented Jun 11, 2024

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.
@shanduur shanduur added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 11, 2024
@shanduur shanduur added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Jun 30, 2024
@shanduur shanduur linked a pull request Jul 23, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant