-
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
Changes from 1 commit
a27c44f
eb7a089
87cbdc2
40c396f
45e0271
160ee60
820eccb
4160cc3
da779c9
5a91c7b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
{{- if not .Values.twingateOperator.existingAPIKeySecret -}} | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "twingate-operator.fullname" . }} | ||
name: {{ include "twingate-operator.secretName" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "twingate-operator.labels" . | nindent 4 }} | ||
data: | ||
TWINGATE_API_KEY: {{ required "API Key required" .Values.twingateOperator.apiKey | b64enc }} | ||
{{ include "twingate-operator.secretApiKey" }}: {{ required "API Key required" .Values.twingateOperator.apiKey | b64enc }} | ||
{{- end -}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ | |
|
||
twingateOperator: {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Should that be changed to "apiKey or existingAPIKeySecret1.name is required" There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 |
||
# apiKey: "<api key>" | ||
# existingAPIKeySecret: | ||
# name: my-secret | ||
# key: TWINGATE_API_KEY | ||
# network: "<network slug>" | ||
# remoteNetworkId: "<remote network id>" | ||
# logFormat: "plain|full|json" | ||
|
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
andtwingateOperator.apiKey
the apiKey is not ignored. It throws an errorThere 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