diff --git a/charts/s3-operator/templates/deployment.yaml b/charts/s3-operator/templates/deployment.yaml index 7ecc1f4..672ebba 100644 --- a/charts/s3-operator/templates/deployment.yaml +++ b/charts/s3-operator/templates/deployment.yaml @@ -36,6 +36,12 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.s3.mountCertsFromSecret }} + volumes: + - name: ca-certs + secret: + secretName: "{{.Values.s3.mountCertsFromSecret}}" + {{- end }} containers: - args: - --health-probe-bind-address=:8081 @@ -45,11 +51,20 @@ spec: {{- if .Values.s3.caCertificateBundlePath }} - --s3-ca-certificate-bundle-path={{ .Values.s3.caCertificateBundlePath }} {{- end }} + {{- if .Values.s3.disableTls }} + - --useSsl=false + {{- end }} {{- range .Values.s3.caCertificatesBase64 }} - --s3-ca-certificate-base64={{ . }} {{- end }} command: - /manager + {{- if .Values.s3.mountCertsFromSecret }} + volumeMounts: + - name: ca-certs + mountPath: "{{.Values.s3.caCertificateBundlePath}}" + subPath: {{.Values.s3.mountCertsFromSecretKey | default "public.crt" }} + {{- end }} env: - name: KUBERNETES_CLUSTER_DOMAIN value: {{ quote .Values.kubernetesClusterDomain }} @@ -58,7 +73,7 @@ spec: valueFrom: secretKeyRef: name: {{ .Values.s3.existingSecret }} - key: S3_ACCESS_KEY + key: {{ .Values.s3.accessKeyName }} {{- else }} value: {{ .Values.s3.accessKey }} {{- end }} @@ -67,7 +82,7 @@ spec: valueFrom: secretKeyRef: name: {{ .Values.s3.existingSecret }} - key: S3_SECRET_KEY + key: {{ .Values.s3.secretKeyName }} {{- else }} value: {{ .Values.s3.secretKey }} {{- end }} @@ -93,4 +108,4 @@ spec: securityContext: runAsNonRoot: true serviceAccountName: {{ include "s3-operator.fullname" . }}-controller-manager - terminationGracePeriodSeconds: 10 \ No newline at end of file + terminationGracePeriodSeconds: 10 diff --git a/charts/s3-operator/values.yaml b/charts/s3-operator/values.yaml index e453164..37ddcd1 100644 --- a/charts/s3-operator/values.yaml +++ b/charts/s3-operator/values.yaml @@ -27,6 +27,11 @@ controllerManager: kubernetesClusterDomain: cluster.local s3: endpointUrl: "localhost:9000" + disableTls: false + # mountCertsFromSecret: + # mountCertsFromSecretKey + accessKeyName: S3_ACCESS_KEY + secretKeyName: S3_SECRET_KEY # To manage access/secret keys, two options : # - (Poor) Directly set them using the accessKey/secretKey parameters below.