-
Notifications
You must be signed in to change notification settings - Fork 148
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
Chart always expects accessKey and secretKey to be defined when using s3 storage #71
Comments
Thanks, @robmyersrobmyers! This diff looks fine to me, but conflicts, in part, with #62, since it touches some of the same code. cc @ddelange @kuzaxak This might have been why there was a default value being set for |
For the 'functional' approach ref #62 (comment) |
Given the status of this issue as OPEN, I'm going to assume this was never actually fixed. I have now run into this defect today. |
For anyone that isn't a maintainer:The fastest way to get around this problem and use IAM roles is to set For the maintainersThis is the current state of your {{- else if eq .Values.storage "s3" }}
{{- if and .Values.secrets.s3.secretKey .Values.secrets.s3.accessKey }}
s3AccessKey: {{ .Values.secrets.s3.accessKey | b64enc | quote }}
s3SecretKey: {{ .Values.secrets.s3.secretKey | b64enc | quote }}
{{- end }} The problem with this is that it assumes that someone who sets A better approach to this is as follows: {{- else if eq .Values.storage "s3" }}
{{- if and (ne (default .Values.secrets.s3.secretKey "empty") "empty") (ne (default .Values.secrets.s3.accessKey "empty") "empty") }}
s3AccessKey: {{ .Values.secrets.s3.accessKey | b64enc | quote }}
s3SecretKey: {{ .Values.secrets.s3.secretKey | b64enc | quote }}
{{- end }} This should cause the undefined keys to no longer produce errors when users do not define |
Even with setting the key and secret as '' I was getting I also needed to change |
The current chart always
secrets.s3.accessKey
andsecrets.s3.secretKey
to be defined when using s3 storage, which can break if you rely on ec2 instance profiles.The diff below checks to make sure
.Values.secrets.s3
is defined before using it, which appears to resolve my issue.Please let me know if I'm doing it wrong or missed some documentation. Thanks!
The text was updated successfully, but these errors were encountered: