-
Notifications
You must be signed in to change notification settings - Fork 62
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
Allow passing linodeApitoken and region as secretRef #134
Conversation
@@ -7,3 +8,4 @@ stringData: | |||
apiToken: {{ required ".Values.apiToken required" .Values.apiToken }} | |||
region: {{ required ".Values.region required" .Values.region }} | |||
type: Opaque | |||
{{- end }} |
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.
nit: New line here
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.
fixed
# Set these values if your APIToken and region are already present in a k8s secret. | ||
# secretRef: | ||
# name: "linode-ccm" | ||
# apiTokenRef: "apiToken" | ||
# regionRef: "region" | ||
|
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.
Question: Are we passing in the values when we install the helm chart? If yes, why is this part commented?
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.
Yes, these values can be passed in when installing. This is commented to keep backwards compatibility. Existing users of the chart can continue to pass in the token and region, new users can choose to use the secretRef. Didn't want to break usersa
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!
@schinmai-akamai can you add a unit test for this? |
Helm linting passes with the token and region set manually
Helm linting passes with the token and region set via secret
Helm template works with the secret being created when the apiToken and region is manually set
Helm template works with secretReference - no secret, and correct values being passed.
|
General:
Pull Request Guidelines:
Adding support for passing the LinodeAPIToken and region via secret references instead of raw helm values. This prevents the disclosure of the token in values files when using gitops practices.