Skip to content

Commit 0e9a98a

Browse files
authored
Allow more customization of kes section in tenant (#2452)
* Allow more customization of kes section in tenant * Add more examples in the values * keep backward compatibility * Add take affinity values from the right structure * correct indentation of sideCars * add comment
1 parent 7c1f234 commit 0e9a98a

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

helm/tenant/templates/tenant.yaml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -184,22 +184,24 @@ spec:
184184
{{- end }}
185185
## Key name to be created on the KMS, default is "my-minio-key"
186186
keyName: {{ .kes.keyName | quote }}
187-
{{- with (dig "resources" (dict) .) }}
188-
resources: {{- toYaml . | nindent 4 }}
187+
{{- with (dig "kes" "resources" (dict) .) | default (dig "resources" (dict) .)}}
188+
resources: {{- toYaml . | nindent 6 }}
189189
{{- end }}
190-
{{- with (dig "nodeSelector" (dict) .) }}
191-
nodeSelector: {{- toYaml . | nindent 4 }}
190+
{{- with (dig "kes" "nodeSelector" (dict) .) | default (dig "nodeSelector" (dict) .) }}
191+
nodeSelector: {{- toYaml . | nindent 6 }}
192192
{{- end }}
193193
affinity:
194-
nodeAffinity: {}
195-
podAffinity: {}
196-
podAntiAffinity: {}
197-
tolerations: []
198-
{{- with (dig "annotations" (dict) .) }}
199-
annotations: {{- toYaml . | nindent 4 }}
194+
nodeAffinity: {{- (dig "kes" "affinity" "nodeAffinity" (dict) .) | toYaml | nindent 8 }}
195+
podAffinity: {{- (dig "kes" "affinity" "podAffinity" (dict) .) | toYaml | nindent 8 }}
196+
podAntiAffinity: {{- (dig "kes" "affinity" "podAntiAffinity" (dict) .) | toYaml | nindent 8 }}
197+
{{- with (dig "kes" "tolerations" (list) .) }}
198+
tolerations: {{- toYaml . | nindent 4 }}
200199
{{- end }}
201-
{{- with (dig "labels" (dict) .) }}
202-
labels: {{- toYaml . | nindent 4 }}
200+
{{- with (dig "kes" "annotations" (dict) .) | default (dig "annotations" (dict) .) }}
201+
annotations: {{- toYaml . | nindent 6 }}
202+
{{- end }}
203+
{{- with (dig "kes" "labels" (dict) .) | default (dig "labels" (dict) .) }}
204+
labels: {{- toYaml . | nindent 6 }}
203205
{{- end }}
204206
serviceAccountName: {{ .kes.serviceAccountName | quote }}
205207
{{- if hasKey .kes "securityContext" }}
@@ -215,4 +217,7 @@ spec:
215217
{{- end }}
216218
{{- end }}
217219
{{- end }}
220+
{{- with (dig "sideCars" (dict) .) }}
221+
sideCars: {{- toYaml . | nindent 4 }}
222+
{{- end }}
218223
{{- end }}

helm/tenant/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,11 @@ tenant:
481481
# seccompProfile:
482482
# type: RuntimeDefault
483483

484+
###
485+
# Customize sideCars, as defined in https://min.io/docs/minio/kubernetes/upstream/reference/operator-crd.html#sidecars
486+
#sideCars:
487+
# resources: { }
488+
484489
###
485490
# Configures `Ingress <https://kubernetes.io/docs/concepts/services-networking/ingress/>`__ for the Tenant S3 API and Console.
486491
#

0 commit comments

Comments
 (0)