-
Notifications
You must be signed in to change notification settings - Fork 274
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
fix(nextcloud): truly not require SSE-C #643
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: John Stewart <john.anthony.stewart@gmail.com>
Signed-off-by: John Stewart <john.anthony.stewart@gmail.com>
Signed-off-by: Jesse Hitch <jessebot@linux.com>
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.
Looks good, can be uncomplicated just a bit though :)
@@ -307,7 +307,8 @@ S3 as primary object store env vars | |||
secretKeyRef: | |||
name: {{ .Values.nextcloud.objectStore.s3.existingSecret }} | |||
key: {{ .Values.nextcloud.objectStore.s3.secretKeys.sse_c_key }} | |||
{{- else }} | |||
{{- end }} | |||
{{- if and (gt (len .Values.nextcloud.objectStore.s3.sse_c_key) 0) (lt (len .Values.nextcloud.objectStore.s3.secretKeys.sse_c_key) 1) }} |
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.
{{- if and (gt (len .Values.nextcloud.objectStore.s3.sse_c_key) 0) (lt (len .Values.nextcloud.objectStore.s3.secretKeys.sse_c_key) 1) }} | |
{{- if .Values.nextcloud.objectStore.s3.sse_c_key }} |
We don't actually need to calculate the length, as if this is not an empty string, it will trigger. My above suggestion should work fine.
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.
After the change, you should rebase and fix the version dump.
@@ -307,7 +307,8 @@ S3 as primary object store env vars | |||
secretKeyRef: | |||
name: {{ .Values.nextcloud.objectStore.s3.existingSecret }} | |||
key: {{ .Values.nextcloud.objectStore.s3.secretKeys.sse_c_key }} | |||
{{- else }} | |||
{{- end }} | |||
{{- if and (gt (len .Values.nextcloud.objectStore.s3.sse_c_key) 0) (lt (len .Values.nextcloud.objectStore.s3.secretKeys.sse_c_key) 1) }} | |||
- name: OBJECTSTORE_S3_SSE_C_KEY | |||
value: {{ .Values.nextcloud.objectStore.s3.sse_c_key | quote }} | |||
{{- 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.
change the order of evaluote first if sse_c_key
is set (and then existingSecret) so that we has the name: OBJECTSTORE_S3_SSE_C_KEY
just once and.
It is for me better readable (maybe we change the idea of if
and with
) ...
{{- end }} | |
{{- with .Values.nextcloud.objectStore.s3.sse_c_key }} | |
- name: OBJECTSTORE_S3_SSE_C_KEY | |
{{- if $.Values.nextcloud.objectStore.s3.existingSecret }} | |
valueFrom: | |
secretKeyRef: | |
name: {{ $.Values.nextcloud.objectStore.s3.existingSecret }} | |
key: {{ . | quote }} | |
{{- else }} | |
value: {{ . | quote }} | |
{{- end }} | |
{{- end }} |
Description of the change
Make SSE-C truly not be required just as the upstream project does not require SSE-C.
Benefits
Make SSE-C truly not be required just as the upstream project does not require SSE-C.
Possible drawbacks
None: only makes Helm chart more compliant with available upstream options.
Applicable issues
Additional information
Checklist
Chart.yaml
according to semver.