mirror of
https://github.com/bitnami/charts.git
synced 2026-03-14 06:47:28 +08:00
* [bitnami/minio] Major release * Update README.md * Fix metadata * Update README.md * Add missing nodePorts.* * Update bitnami/minio/README.md Co-authored-by: Alejandro Moreno <alemorcuq@gmail.com> * [bitnami/minio] Update components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> Co-authored-by: Alejandro Moreno <alemorcuq@gmail.com> Co-authored-by: Bitnami Containers <containers@bitnami.com>
212 lines
9.7 KiB
YAML
212 lines
9.7 KiB
YAML
{{- if .Values.gateway.enabled }}
|
|
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "common.names.fullname" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
{{- if .Values.commonLabels }}
|
|
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.commonAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if not .Values.gateway.autoscaling.enabled }}
|
|
replicas: {{ .Values.gateway.replicaCount }}
|
|
{{- end }}
|
|
{{- if .Values.gateway.updateStrategy }}
|
|
strategy: {{- toYaml .Values.gateway.updateStrategy | nindent 4 }}
|
|
{{- else }}
|
|
strategy: {{- toYaml .Values.deployment.updateStrategy | nindent 4 }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels: {{- include "common.labels.standard" . | nindent 8 }}
|
|
{{- if .Values.podLabels }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if or .Values.podAnnotations (include "minio.createSecret" .) }}
|
|
annotations:
|
|
{{- if (include "minio.createSecret" .) }}
|
|
checksum/credentials-secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
|
{{- end }}
|
|
{{- if .Values.podAnnotations }}
|
|
{{- include "common.tplvalues.render" ( dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
spec:
|
|
{{- include "minio.imagePullSecrets" . | nindent 6 }}
|
|
{{- if .Values.schedulerName }}
|
|
schedulerName: {{ .Values.schedulerName }}
|
|
{{- end }}
|
|
serviceAccountName: {{ template "minio.serviceAccountName" . }}
|
|
{{- if .Values.affinity }}
|
|
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }}
|
|
{{- else }}
|
|
affinity:
|
|
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
|
|
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }}
|
|
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
|
|
{{- end }}
|
|
{{- if .Values.nodeSelector }}
|
|
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.tolerations }}
|
|
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.hostAliases }}
|
|
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.podSecurityContext.enabled }}
|
|
securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.gateway.priorityClassName }}
|
|
priorityClassName: {{ .Values.gateway.priorityClassName | quote}}
|
|
{{- end }}
|
|
{{- if .Values.initContainers }}
|
|
initContainers: {{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: minio
|
|
image: {{ include "minio.image" . }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
|
{{- if .Values.containerSecurityContext.enabled }}
|
|
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
|
{{- end }}
|
|
command:
|
|
{{- if .Values.command }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }}
|
|
{{- else }}
|
|
- minio
|
|
{{- end }}
|
|
args:
|
|
{{- if .Values.args }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }}
|
|
{{- else }}
|
|
- --certs-dir
|
|
- {{ default "/opt/bitnami/minio/certs" .Values.tls.mountPath }}
|
|
- gateway
|
|
- {{ .Values.gateway.type }}
|
|
{{- if eq .Values.gateway.type "gcs" }}
|
|
- {{ .Values.gateway.auth.gcs.projectID }}
|
|
{{- else if eq .Values.gateway.type "nas" }}
|
|
- {{ .Values.persistence.mountPath }}
|
|
{{- else if eq .Values.gateway.type "s3" }}
|
|
- {{ .Values.gateway.auth.s3.serviceEndpoint }}
|
|
{{- end }}
|
|
{{- end }}
|
|
env:
|
|
{{- if eq .Values.gateway.type "azure" }}
|
|
- name: AZURE_STORAGE_ACCOUNT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
{{- if not ( or (empty .Values.gateway.auth.azure.storageAccountNameExistingSecret) (empty .Values.gateway.auth.azure.storageAccountNameExistingSecretKey))}}
|
|
name: {{ .Values.gateway.auth.azure.storageAccountNameExistingSecret }}
|
|
key: {{ .Values.gateway.auth.azure.storageAccountNameExistingSecretKey }}
|
|
{{- else }}
|
|
name: {{ include "minio.secretName" . }}
|
|
key: azure-storage-account-name
|
|
{{- end }}
|
|
- name: AZURE_STORAGE_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
{{- if not ( or (empty .Values.gateway.auth.azure.storageAccountNameExistingSecret) (empty .Values.gateway.auth.azure.storageAccountNameExistingSecretKey))}}
|
|
name: {{ .Values.gateway.auth.azure.storageAccountKeyExistingSecret }}
|
|
key: {{ .Values.gateway.auth.azure.storageAccountKeyExistingSecretKey }}
|
|
{{- else }}
|
|
name: {{ include "minio.secretName" . }}
|
|
key: azure-storage-account-key
|
|
{{- end }}
|
|
{{- else if and (eq .Values.gateway.type "gcs") .Values.gateway.auth.gcs.keyJSON }}
|
|
- name: GOOGLE_APPLICATION_CREDENTIALS
|
|
value: "/opt/bitnami/minio/secrets/key.json"
|
|
{{- end }}
|
|
- name: MINIO_ROOT_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "minio.secretName" . }}
|
|
key: access-key
|
|
- name: MINIO_ROOT_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "minio.secretName" . }}
|
|
key: secret-key
|
|
- name: MINIO_PROMETHEUS_AUTH_TYPE
|
|
value: {{ .Values.metrics.prometheusAuthType | quote }}
|
|
{{- if .Values.extraEnv }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnv "context" $) | nindent 12 }}
|
|
{{- end }}
|
|
envFrom:
|
|
{{- if .Values.extraEnvVarsCM }}
|
|
- configMapRef:
|
|
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsCM "context" $) }}
|
|
{{- end }}
|
|
{{- if .Values.extraEnvVarsSecret }}
|
|
- secretRef:
|
|
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }}
|
|
{{- end }}
|
|
ports:
|
|
- name: minio-api
|
|
containerPort: {{ .Values.containerPorts.api }}
|
|
protocol: TCP
|
|
- name: minio-console
|
|
containerPort: {{ .Values.containerPorts.console }}
|
|
protocol: TCP
|
|
{{- if .Values.resources }}
|
|
resources: {{- toYaml .Values.resources | nindent 12 }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
{{- if .Values.tls.enabled }}
|
|
- name: minio-certs
|
|
mountPath: {{ default "/opt/bitnami/minio/certs" .Values.tls.mountPath }}
|
|
{{- end }}
|
|
{{- if and (eq .Values.gateway.type "gcs") .Values.gateway.auth.gcs.keyJSON }}
|
|
- name: minio-credentials
|
|
mountPath: /opt/bitnami/minio/secrets/
|
|
readOnly: true
|
|
{{- end }}
|
|
{{- if eq .Values.gateway.type "nas" }}
|
|
- name: data
|
|
mountPath: {{ .Values.persistence.mountPath }}
|
|
{{- end }}
|
|
{{- if .Values.extraVolumeMounts }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.sidecars }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
volumes:
|
|
{{- if and (eq .Values.gateway.type "gcs") .Values.gateway.auth.gcs.keyJSON }}
|
|
- name: minio-credentials
|
|
secret:
|
|
secretName: {{ include "minio.secretName" . }}
|
|
{{- end }}
|
|
{{- if eq .Values.gateway.type "nas" }}
|
|
- name: data
|
|
{{- if .Values.persistence.enabled }}
|
|
persistentVolumeClaim:
|
|
claimName: {{ include "minio.claimName" . }}
|
|
{{- else }}
|
|
emptyDir: {}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.tls.enabled }}
|
|
- name: minio-certs
|
|
secret:
|
|
secretName: {{ include "minio.tlsSecretName" . }}
|
|
items:
|
|
- key: tls.crt
|
|
path: public.crt
|
|
- key: tls.key
|
|
path: private.key
|
|
- key: ca.crt
|
|
path: CAs/public.crt
|
|
{{- end }}
|
|
{{- if .Values.extraVolumes }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|