-
Notifications
You must be signed in to change notification settings - Fork 4
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: Allow specifying API Key via reference to an external Secret #72
feat: Allow specifying API Key via reference to an external Secret #72
Conversation
"properties": { | ||
"apiKey": { "type": "string" }, | ||
"existingAPIKeySecret": { | ||
"type": "object", | ||
"title": "An existing secret with the API Key to be used by the operator. If this is specified, the apiKey field will be ignored.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is correct. When I pass in both twingateOperator.existingAPIKeySecret.name
and twingateOperator.apiKey
the apiKey is not ignored. It throws an error
helm template --debug -f values.yaml --set twingateOperator.existingAPIKeySecret.name=mysecret --set twingateOperator.existingAPIKeySecret.key=mykey --set twingateOperator.apiKey=test --set twingateOperator.network=test --set twingateOperator.remoteNetworkId=test .
Error: values don't meet the specifications of the schema(s) in the following chart(s):
twingate-operator:
- twingateOperator: Must validate one and only one schema (oneOf)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I learned how to use oneOf
:)
will update
@@ -4,6 +4,9 @@ | |||
|
|||
twingateOperator: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since apiKey, network, remoteNetworkId are required should we have those uncommented so people don't think they are optional.
Also maybe add a comment to either use apiKey or existingAPIKeySecret.
When not passing either there is an error
twingate-operator:
- twingateOperator: Must validate one and only one schema (oneOf)
- twingateOperator: apiKey is required
Should that be changed to "apiKey or existingAPIKeySecret1.name is required"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont control that error information it comes from schema validation...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re uncommenting - I want people to explicitly have to uncomment and put values there rather than run with default values which will seem like its working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Related Tickets & Documents
Changes
Added
existingAPIKeySecret
definition to values.yaml