mirror of
https://github.com/minio/minio.git
synced 2025-01-25 21:53:16 -05:00
Reformat helm chart templates (#16947)
This commit is contained in:
parent
839b9c9271
commit
18515a4e3b
@ -3,7 +3,7 @@
|
|||||||
Expand the name of the chart.
|
Expand the name of the chart.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "minio.name" -}}
|
{{- define "minio.name" -}}
|
||||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
@ -12,102 +12,102 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
|||||||
If release name contains chart name it will be used as a full name.
|
If release name contains chart name it will be used as a full name.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "minio.fullname" -}}
|
{{- define "minio.fullname" -}}
|
||||||
{{- if .Values.fullnameOverride -}}
|
{{- if .Values.fullnameOverride -}}
|
||||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
{{- if contains $name .Release.Name -}}
|
{{- if contains $name .Release.Name -}}
|
||||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Create chart name and version as used by the chart label.
|
Create chart name and version as used by the chart label.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "minio.chart" -}}
|
{{- define "minio.chart" -}}
|
||||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Return the appropriate apiVersion for networkpolicy.
|
Return the appropriate apiVersion for networkpolicy.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "minio.networkPolicy.apiVersion" -}}
|
{{- define "minio.networkPolicy.apiVersion" -}}
|
||||||
{{- if semverCompare ">=1.4-0, <1.7-0" .Capabilities.KubeVersion.Version -}}
|
{{- if semverCompare ">=1.4-0, <1.7-0" .Capabilities.KubeVersion.Version -}}
|
||||||
{{- print "extensions/v1beta1" -}}
|
{{- print "extensions/v1beta1" -}}
|
||||||
{{- else if semverCompare ">=1.7-0, <1.16-0" .Capabilities.KubeVersion.Version -}}
|
{{- else if semverCompare ">=1.7-0, <1.16-0" .Capabilities.KubeVersion.Version -}}
|
||||||
{{- print "networking.k8s.io/v1beta1" -}}
|
{{- print "networking.k8s.io/v1beta1" -}}
|
||||||
{{- else if semverCompare "^1.16-0" .Capabilities.KubeVersion.Version -}}
|
{{- else if semverCompare "^1.16-0" .Capabilities.KubeVersion.Version -}}
|
||||||
{{- print "networking.k8s.io/v1" -}}
|
{{- print "networking.k8s.io/v1" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Return the appropriate apiVersion for deployment.
|
Return the appropriate apiVersion for deployment.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "minio.deployment.apiVersion" -}}
|
{{- define "minio.deployment.apiVersion" -}}
|
||||||
{{- if semverCompare "<1.9-0" .Capabilities.KubeVersion.Version -}}
|
{{- if semverCompare "<1.9-0" .Capabilities.KubeVersion.Version -}}
|
||||||
{{- print "apps/v1beta2" -}}
|
{{- print "apps/v1beta2" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- print "apps/v1" -}}
|
{{- print "apps/v1" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Return the appropriate apiVersion for statefulset.
|
Return the appropriate apiVersion for statefulset.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "minio.statefulset.apiVersion" -}}
|
{{- define "minio.statefulset.apiVersion" -}}
|
||||||
{{- if semverCompare "<1.16-0" .Capabilities.KubeVersion.Version -}}
|
{{- if semverCompare "<1.16-0" .Capabilities.KubeVersion.Version -}}
|
||||||
{{- print "apps/v1beta2" -}}
|
{{- print "apps/v1beta2" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- print "apps/v1" -}}
|
{{- print "apps/v1" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Return the appropriate apiVersion for ingress.
|
Return the appropriate apiVersion for ingress.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "minio.ingress.apiVersion" -}}
|
{{- define "minio.ingress.apiVersion" -}}
|
||||||
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||||
{{- print "extensions/v1beta1" -}}
|
{{- print "extensions/v1beta1" -}}
|
||||||
{{- else if semverCompare "<1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
{{- else if semverCompare "<1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||||
{{- print "networking.k8s.io/v1beta1" -}}
|
{{- print "networking.k8s.io/v1beta1" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- print "networking.k8s.io/v1" -}}
|
{{- print "networking.k8s.io/v1" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Return the appropriate apiVersion for console ingress.
|
Return the appropriate apiVersion for console ingress.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "minio.consoleIngress.apiVersion" -}}
|
{{- define "minio.consoleIngress.apiVersion" -}}
|
||||||
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||||
{{- print "extensions/v1beta1" -}}
|
{{- print "extensions/v1beta1" -}}
|
||||||
{{- else if semverCompare "<1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
{{- else if semverCompare "<1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||||
{{- print "networking.k8s.io/v1beta1" -}}
|
{{- print "networking.k8s.io/v1beta1" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- print "networking.k8s.io/v1" -}}
|
{{- print "networking.k8s.io/v1" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Determine secret name.
|
Determine secret name.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "minio.secretName" -}}
|
{{- define "minio.secretName" -}}
|
||||||
{{- if .Values.existingSecret -}}
|
{{- if .Values.existingSecret -}}
|
||||||
{{- .Values.existingSecret }}
|
{{- .Values.existingSecret }}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- include "minio.fullname" . -}}
|
{{- include "minio.fullname" . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Determine name for scc role and rolebinding
|
Determine name for scc role and rolebinding
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "minio.sccRoleName" -}}
|
{{- define "minio.sccRoleName" -}}
|
||||||
{{- printf "%s-%s" "scc" (include "minio.fullname" .) | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-%s" "scc" (include "minio.fullname" .) | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
|
@ -9,24 +9,24 @@ metadata:
|
|||||||
heritage: {{ .Release.Service }}
|
heritage: {{ .Release.Service }}
|
||||||
data:
|
data:
|
||||||
initialize: |-
|
initialize: |-
|
||||||
{{ include (print $.Template.BasePath "/_helper_create_bucket.txt") . | indent 4 }}
|
{{- include (print $.Template.BasePath "/_helper_create_bucket.txt") . | nindent 4 }}
|
||||||
add-user: |-
|
add-user: |-
|
||||||
{{ include (print $.Template.BasePath "/_helper_create_user.txt") . | indent 4 }}
|
{{- include (print $.Template.BasePath "/_helper_create_user.txt") . | nindent 4 }}
|
||||||
add-policy: |-
|
add-policy: |-
|
||||||
{{ include (print $.Template.BasePath "/_helper_create_policy.txt") . | indent 4 }}
|
{{- include (print $.Template.BasePath "/_helper_create_policy.txt") . | nindent 4 }}
|
||||||
{{- range $idx, $policy := .Values.policies }}
|
{{- range $idx, $policy := .Values.policies }}
|
||||||
# Policy: {{ $policy.name }}
|
# Policy: {{ $policy.name }}
|
||||||
policy_{{ $idx }}.json: |-
|
policy_{{ $idx }}.json: |-
|
||||||
{{ include (print $.Template.BasePath "/_helper_policy.tpl") . | indent 4 }}
|
{{- include (print $.Template.BasePath "/_helper_policy.tpl") . | nindent 4 }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- range $idx, $svc := .Values.svcaccts }}
|
{{- range $idx, $svc := .Values.svcaccts }}
|
||||||
{{- if $svc.policy }}
|
{{- if $svc.policy }}
|
||||||
# SVC: {{ $svc.accessKey }}
|
# SVC: {{ $svc.accessKey }}
|
||||||
svc_policy_{{ $idx }}.json: |-
|
svc_policy_{{ $idx }}.json: |-
|
||||||
{{ include (print $.Template.BasePath "/_helper_policy.tpl") .policy | indent 4 }}
|
{{- include (print $.Template.BasePath "/_helper_policy.tpl") .policy | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ end }}
|
{{- end }}
|
||||||
add-svcacct: |-
|
add-svcacct: |-
|
||||||
{{ include (print $.Template.BasePath "/_helper_create_svcacct.txt") . | indent 4 }}
|
{{- include (print $.Template.BasePath "/_helper_create_svcacct.txt") . | nindent 4 }}
|
||||||
custom-command: |-
|
custom-command: |-
|
||||||
{{ include (print $.Template.BasePath "/_helper_custom_command.txt") . | indent 4 }}
|
{{- include (print $.Template.BasePath "/_helper_custom_command.txt") . | nindent 4 }}
|
||||||
|
@ -11,19 +11,17 @@ metadata:
|
|||||||
chart: {{ template "minio.chart" . }}
|
chart: {{ template "minio.chart" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
heritage: {{ .Release.Service }}
|
heritage: {{ .Release.Service }}
|
||||||
{{- with .Values.consoleIngress.labels }}
|
{{- with .Values.consoleIngress.labels }}
|
||||||
{{ toYaml . | indent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .Values.consoleIngress.annotations }}
|
||||||
{{- with .Values.consoleIngress.annotations }}
|
annotations: {{- toYaml . | nindent 4 }}
|
||||||
annotations:
|
{{- end }}
|
||||||
{{ toYaml . | indent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
spec:
|
||||||
{{- if .Values.consoleIngress.ingressClassName }}
|
{{- if .Values.consoleIngress.ingressClassName }}
|
||||||
ingressClassName: {{ .Values.consoleIngress.ingressClassName }}
|
ingressClassName: {{ .Values.consoleIngress.ingressClassName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.consoleIngress.tls }}
|
{{- if .Values.consoleIngress.tls }}
|
||||||
tls:
|
tls:
|
||||||
{{- range .Values.consoleIngress.tls }}
|
{{- range .Values.consoleIngress.tls }}
|
||||||
- hosts:
|
- hosts:
|
||||||
@ -32,7 +30,7 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
secretName: {{ .secretName }}
|
secretName: {{ .secretName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
{{- range .Values.consoleIngress.hosts }}
|
{{- range .Values.consoleIngress.hosts }}
|
||||||
- http:
|
- http:
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
{{ $scheme := "http" }}
|
{{ $scheme := .Values.tls.enabled | ternary "https" "http" }}
|
||||||
{{- if .Values.tls.enabled }}
|
|
||||||
{{ $scheme = "https" }}
|
|
||||||
{{ end }}
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
@ -11,37 +8,36 @@ metadata:
|
|||||||
chart: {{ template "minio.chart" . }}
|
chart: {{ template "minio.chart" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
heritage: {{ .Release.Service }}
|
heritage: {{ .Release.Service }}
|
||||||
{{- if .Values.consoleService.annotations }}
|
{{- if .Values.consoleService.annotations }}
|
||||||
annotations:
|
annotations: {{- toYaml .Values.consoleService.annotations | nindent 4 }}
|
||||||
{{ toYaml .Values.consoleService.annotations | indent 4 }}
|
{{- end }}
|
||||||
{{- end }}
|
|
||||||
spec:
|
spec:
|
||||||
{{- if (or (eq .Values.consoleService.type "ClusterIP" "") (empty .Values.consoleService.type)) }}
|
{{- if (or (eq .Values.consoleService.type "ClusterIP" "") (empty .Values.consoleService.type)) }}
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
{{- if not (empty .Values.consoleService.clusterIP) }}
|
{{- if not (empty .Values.consoleService.clusterIP) }}
|
||||||
clusterIP: {{ .Values.consoleService.clusterIP }}
|
clusterIP: {{ .Values.consoleService.clusterIP }}
|
||||||
{{end}}
|
{{- end }}
|
||||||
{{- else if eq .Values.consoleService.type "LoadBalancer" }}
|
{{- else if eq .Values.consoleService.type "LoadBalancer" }}
|
||||||
type: {{ .Values.consoleService.type }}
|
type: {{ .Values.consoleService.type }}
|
||||||
loadBalancerIP: {{ default "" .Values.consoleService.loadBalancerIP }}
|
loadBalancerIP: {{ default "" .Values.consoleService.loadBalancerIP }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
type: {{ .Values.consoleService.type }}
|
type: {{ .Values.consoleService.type }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- name: {{ $scheme }}
|
- name: {{ $scheme }}
|
||||||
port: {{ .Values.consoleService.port }}
|
port: {{ .Values.consoleService.port }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
{{- if (and (eq .Values.consoleService.type "NodePort") ( .Values.consoleService.nodePort)) }}
|
{{- if (and (eq .Values.consoleService.type "NodePort") ( .Values.consoleService.nodePort)) }}
|
||||||
nodePort: {{ .Values.consoleService.nodePort }}
|
nodePort: {{ .Values.consoleService.nodePort }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
targetPort: {{ .Values.minioConsolePort }}
|
targetPort: {{ .Values.minioConsolePort }}
|
||||||
{{- end}}
|
{{- end }}
|
||||||
{{- if .Values.consoleService.externalIPs }}
|
{{- if .Values.consoleService.externalIPs }}
|
||||||
externalIPs:
|
externalIPs:
|
||||||
{{- range $i , $ip := .Values.consoleService.externalIPs }}
|
{{- range $i , $ip := .Values.consoleService.externalIPs }}
|
||||||
- {{ $ip }}
|
- {{ $ip }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
app: {{ template "minio.name" . }}
|
app: {{ template "minio.name" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
{{- if eq .Values.mode "standalone" }}
|
{{- if eq .Values.mode "standalone" }}
|
||||||
{{ $scheme := "http" }}
|
{{ $scheme := .Values.tls.enabled | ternary "https" "http" }}
|
||||||
{{- if .Values.tls.enabled }}
|
|
||||||
{{ $scheme = "https" }}
|
|
||||||
{{ end }}
|
|
||||||
{{ $bucketRoot := or ($.Values.bucketRoot) ($.Values.mountPath) }}
|
{{ $bucketRoot := or ($.Values.bucketRoot) ($.Values.mountPath) }}
|
||||||
apiVersion: {{ template "minio.deployment.apiVersion" . }}
|
apiVersion: {{ template "minio.deployment.apiVersion" . }}
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
@ -13,13 +10,12 @@ metadata:
|
|||||||
chart: {{ template "minio.chart" . }}
|
chart: {{ template "minio.chart" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
heritage: {{ .Release.Service }}
|
heritage: {{ .Release.Service }}
|
||||||
{{- if .Values.additionalLabels }}
|
{{- if .Values.additionalLabels }}
|
||||||
{{ toYaml .Values.additionalLabels | trimSuffix "\n" | indent 4 }}
|
{{- toYaml .Values.additionalLabels | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.additionalAnnotations }}
|
{{- if .Values.additionalAnnotations }}
|
||||||
annotations:
|
annotations: {{- toYaml .Values.additionalAnnotations | nindent 4 }}
|
||||||
{{ toYaml .Values.additionalAnnotations | trimSuffix "\n" | indent 4 }}
|
{{- end }}
|
||||||
{{- end }}
|
|
||||||
spec:
|
spec:
|
||||||
strategy:
|
strategy:
|
||||||
type: {{ .Values.DeploymentUpdate.type }}
|
type: {{ .Values.DeploymentUpdate.type }}
|
||||||
@ -27,7 +23,7 @@ spec:
|
|||||||
rollingUpdate:
|
rollingUpdate:
|
||||||
maxSurge: {{ .Values.DeploymentUpdate.maxSurge }}
|
maxSurge: {{ .Values.DeploymentUpdate.maxSurge }}
|
||||||
maxUnavailable: {{ .Values.DeploymentUpdate.maxUnavailable }}
|
maxUnavailable: {{ .Values.DeploymentUpdate.maxUnavailable }}
|
||||||
{{- end}}
|
{{- end }}
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
@ -39,17 +35,17 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: {{ template "minio.name" . }}
|
app: {{ template "minio.name" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
{{- if .Values.podLabels }}
|
{{- if .Values.podLabels }}
|
||||||
{{ toYaml .Values.podLabels | indent 8 }}
|
{{- toYaml .Values.podLabels | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- if not .Values.ignoreChartChecksums }}
|
{{- if not .Values.ignoreChartChecksums }}
|
||||||
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
||||||
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.podAnnotations }}
|
{{- if .Values.podAnnotations }}
|
||||||
{{ toYaml .Values.podAnnotations | trimSuffix "\n" | indent 8 }}
|
{{- toYaml .Values.podAnnotations | trimSuffix "\n" | indent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- if .Values.priorityClassName }}
|
{{- if .Values.priorityClassName }}
|
||||||
priorityClassName: "{{ .Values.priorityClassName }}"
|
priorityClassName: "{{ .Values.priorityClassName }}"
|
||||||
@ -57,7 +53,7 @@ spec:
|
|||||||
{{- if .Values.runtimeClassName }}
|
{{- if .Values.runtimeClassName }}
|
||||||
runtimeClassName: "{{ .Values.runtimeClassName }}"
|
runtimeClassName: "{{ .Values.runtimeClassName }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if and .Values.securityContext.enabled .Values.persistence.enabled }}
|
{{- if and .Values.securityContext.enabled .Values.persistence.enabled }}
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||||
runAsGroup: {{ .Values.securityContext.runAsGroup }}
|
runAsGroup: {{ .Values.securityContext.runAsGroup }}
|
||||||
@ -65,10 +61,10 @@ spec:
|
|||||||
{{- if and (ge .Capabilities.KubeVersion.Major "1") (ge .Capabilities.KubeVersion.Minor "20") }}
|
{{- if and (ge .Capabilities.KubeVersion.Major "1") (ge .Capabilities.KubeVersion.Minor "20") }}
|
||||||
fsGroupChangePolicy: {{ .Values.securityContext.fsGroupChangePolicy }}
|
fsGroupChangePolicy: {{ .Values.securityContext.fsGroupChangePolicy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ if .Values.serviceAccount.create }}
|
{{ if .Values.serviceAccount.create }}
|
||||||
serviceAccountName: {{ .Values.serviceAccount.name }}
|
serviceAccountName: {{ .Values.serviceAccount.name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
@ -113,11 +109,11 @@ spec:
|
|||||||
{{- if .Values.extraSecret }}
|
{{- if .Values.extraSecret }}
|
||||||
- name: MINIO_CONFIG_ENV_FILE
|
- name: MINIO_CONFIG_ENV_FILE
|
||||||
value: "/tmp/minio-config-env/config.env"
|
value: "/tmp/minio-config-env/config.env"
|
||||||
{{- end}}
|
{{- end }}
|
||||||
{{- if .Values.metrics.serviceMonitor.public }}
|
{{- if .Values.metrics.serviceMonitor.public }}
|
||||||
- name: MINIO_PROMETHEUS_AUTH_TYPE
|
- name: MINIO_PROMETHEUS_AUTH_TYPE
|
||||||
value: "public"
|
value: "public"
|
||||||
{{- end}}
|
{{- end }}
|
||||||
{{- if .Values.oidc.enabled }}
|
{{- if .Values.oidc.enabled }}
|
||||||
- name: MINIO_IDENTITY_OPENID_CONFIG_URL
|
- name: MINIO_IDENTITY_OPENID_CONFIG_URL
|
||||||
value: {{ .Values.oidc.configUrl }}
|
value: {{ .Values.oidc.configUrl }}
|
||||||
@ -135,7 +131,7 @@ spec:
|
|||||||
value: {{ .Values.oidc.redirectUri }}
|
value: {{ .Values.oidc.redirectUri }}
|
||||||
- name: MINIO_IDENTITY_OPENID_COMMENT
|
- name: MINIO_IDENTITY_OPENID_COMMENT
|
||||||
value: {{ .Values.oidc.comment }}
|
value: {{ .Values.oidc.comment }}
|
||||||
{{- end}}
|
{{- end }}
|
||||||
{{- if .Values.etcd.endpoints }}
|
{{- if .Values.etcd.endpoints }}
|
||||||
- name: MINIO_ETCD_ENDPOINTS
|
- name: MINIO_ETCD_ENDPOINTS
|
||||||
value: {{ join "," .Values.etcd.endpoints | quote }}
|
value: {{ join "," .Values.etcd.endpoints | quote }}
|
||||||
@ -159,9 +155,8 @@ spec:
|
|||||||
{{- range $key, $val := .Values.environment }}
|
{{- range $key, $val := .Values.environment }}
|
||||||
- name: {{ $key }}
|
- name: {{ $key }}
|
||||||
value: {{ $val | quote }}
|
value: {{ $val | quote }}
|
||||||
{{- end}}
|
{{- end }}
|
||||||
resources:
|
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||||
{{ toYaml .Values.resources | indent 12 }}
|
|
||||||
{{- with .Values.extraContainers }}
|
{{- with .Values.extraContainers }}
|
||||||
{{- if eq (typeOf .) "string" }}
|
{{- if eq (typeOf .) "string" }}
|
||||||
{{- tpl . $ | nindent 8 }}
|
{{- tpl . $ | nindent 8 }}
|
||||||
@ -169,19 +164,16 @@ spec:
|
|||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector: {{- toYaml . | nindent 8 }}
|
||||||
{{ toYaml . | indent 8 }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- include "minio.imagePullSecrets" . | indent 6 }}
|
||||||
{{- include "minio.imagePullSecrets" . | indent 6 }}
|
{{- with .Values.affinity }}
|
||||||
{{- with .Values.affinity }}
|
affinity: {{- toYaml . | nindent 8 }}
|
||||||
affinity:
|
{{- end }}
|
||||||
{{ toYaml . | indent 8 }}
|
{{- with .Values.tolerations }}
|
||||||
{{- end }}
|
tolerations: {{- toYaml . | nindent 8 }}
|
||||||
{{- with .Values.tolerations }}
|
{{- end }}
|
||||||
tolerations:
|
|
||||||
{{ toYaml . | indent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: export
|
- name: export
|
||||||
{{- if .Values.persistence.enabled }}
|
{{- if .Values.persistence.enabled }}
|
||||||
|
@ -11,19 +11,17 @@ metadata:
|
|||||||
chart: {{ template "minio.chart" . }}
|
chart: {{ template "minio.chart" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
heritage: {{ .Release.Service }}
|
heritage: {{ .Release.Service }}
|
||||||
{{- with .Values.ingress.labels }}
|
{{- with .Values.ingress.labels }}
|
||||||
{{ toYaml . | indent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .Values.ingress.annotations }}
|
||||||
{{- with .Values.ingress.annotations }}
|
annotations: {{- toYaml . | nindent 4 }}
|
||||||
annotations:
|
{{- end }}
|
||||||
{{ toYaml . | indent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
spec:
|
||||||
{{- if .Values.ingress.ingressClassName }}
|
{{- if .Values.ingress.ingressClassName }}
|
||||||
ingressClassName: {{ .Values.ingress.ingressClassName }}
|
ingressClassName: {{ .Values.ingress.ingressClassName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.ingress.tls }}
|
{{- if .Values.ingress.tls }}
|
||||||
tls:
|
tls:
|
||||||
{{- range .Values.ingress.tls }}
|
{{- range .Values.ingress.tls }}
|
||||||
- hosts:
|
- hosts:
|
||||||
@ -32,7 +30,7 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
secretName: {{ .secretName }}
|
secretName: {{ .secretName }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
{{- range .Values.ingress.hosts }}
|
{{- range .Values.ingress.hosts }}
|
||||||
- http:
|
- http:
|
||||||
|
@ -24,23 +24,19 @@ spec:
|
|||||||
{{- toYaml .Values.podLabels | nindent 8 }}
|
{{- toYaml .Values.podLabels | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.postJob.podAnnotations }}
|
{{- if .Values.postJob.podAnnotations }}
|
||||||
annotations:
|
annotations: {{- toYaml .Values.postJob.podAnnotations | nindent 8 }}
|
||||||
{{- toYaml .Values.postJob.podAnnotations | nindent 8 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
restartPolicy: OnFailure
|
restartPolicy: OnFailure
|
||||||
{{- include "minio.imagePullSecrets" . | nindent 6 }}
|
{{- include "minio.imagePullSecrets" . | indent 6 }}
|
||||||
{{- if .Values.nodeSelector }}
|
{{- if .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector: {{- toYaml .Values.postJob.nodeSelector | nindent 8 }}
|
||||||
{{- toYaml .Values.postJob.nodeSelector | nindent 8 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.postJob.affinity }}
|
{{- with .Values.postJob.affinity }}
|
||||||
affinity:
|
affinity: {{- toYaml . | nindent 8 }}
|
||||||
{{- toYaml . | nindent 8 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.postJob.tolerations }}
|
{{- with .Values.postJob.tolerations }}
|
||||||
tolerations:
|
tolerations: {{- toYaml . | nindent 8 }}
|
||||||
{{- toYaml . | nindent 8 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.postJob.securityContext.enabled }}
|
{{- if .Values.postJob.securityContext.enabled }}
|
||||||
securityContext:
|
securityContext:
|
||||||
@ -81,7 +77,7 @@ spec:
|
|||||||
items:
|
items:
|
||||||
- key: {{ .Values.tls.publicCrt }}
|
- key: {{ .Values.tls.publicCrt }}
|
||||||
path: CAs/public.crt
|
path: CAs/public.crt
|
||||||
{{ end }}
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
{{- if .Values.buckets }}
|
{{- if .Values.buckets }}
|
||||||
- name: minio-make-bucket
|
- name: minio-make-bucket
|
||||||
@ -109,9 +105,8 @@ spec:
|
|||||||
{{- if .Values.tls.enabled }}
|
{{- if .Values.tls.enabled }}
|
||||||
- name: cert-secret-volume-mc
|
- name: cert-secret-volume-mc
|
||||||
mountPath: {{ .Values.configPathmc }}certs
|
mountPath: {{ .Values.configPathmc }}certs
|
||||||
{{ end }}
|
{{- end }}
|
||||||
resources:
|
resources: {{- toYaml .Values.makeBucketJob.resources | nindent 12 }}
|
||||||
{{- toYaml .Values.makeBucketJob.resources | nindent 12 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.users }}
|
{{- if .Values.users }}
|
||||||
- name: minio-make-user
|
- name: minio-make-user
|
||||||
@ -139,9 +134,8 @@ spec:
|
|||||||
{{- if .Values.tls.enabled }}
|
{{- if .Values.tls.enabled }}
|
||||||
- name: cert-secret-volume-mc
|
- name: cert-secret-volume-mc
|
||||||
mountPath: {{ .Values.configPathmc }}certs
|
mountPath: {{ .Values.configPathmc }}certs
|
||||||
{{ end }}
|
{{- end }}
|
||||||
resources:
|
resources: {{- toYaml .Values.makeUserJob.resources | nindent 12 }}
|
||||||
{{- toYaml .Values.makeUserJob.resources | nindent 12 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.policies }}
|
{{- if .Values.policies }}
|
||||||
- name: minio-make-policy
|
- name: minio-make-policy
|
||||||
@ -169,9 +163,8 @@ spec:
|
|||||||
{{- if .Values.tls.enabled }}
|
{{- if .Values.tls.enabled }}
|
||||||
- name: cert-secret-volume-mc
|
- name: cert-secret-volume-mc
|
||||||
mountPath: {{ .Values.configPathmc }}certs
|
mountPath: {{ .Values.configPathmc }}certs
|
||||||
{{ end }}
|
{{- end }}
|
||||||
resources:
|
resources: {{- toYaml .Values.makePolicyJob.resources | nindent 12 }}
|
||||||
{{- toYaml .Values.makePolicyJob.resources | nindent 12 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.customCommands }}
|
{{- if .Values.customCommands }}
|
||||||
- name: minio-custom-command
|
- name: minio-custom-command
|
||||||
@ -199,9 +192,8 @@ spec:
|
|||||||
{{- if .Values.tls.enabled }}
|
{{- if .Values.tls.enabled }}
|
||||||
- name: cert-secret-volume-mc
|
- name: cert-secret-volume-mc
|
||||||
mountPath: {{ .Values.configPathmc }}certs
|
mountPath: {{ .Values.configPathmc }}certs
|
||||||
{{ end }}
|
{{- end }}
|
||||||
resources:
|
resources: {{- toYaml .Values.customCommandJob.resources | nindent 12 }}
|
||||||
{{- toYaml .Values.customCommandJob.resources | nindent 12 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.svcaccts }}
|
{{- if .Values.svcaccts }}
|
||||||
- name: minio-make-svcacct
|
- name: minio-make-svcacct
|
||||||
@ -229,8 +221,7 @@ spec:
|
|||||||
{{- if .Values.tls.enabled }}
|
{{- if .Values.tls.enabled }}
|
||||||
- name: cert-secret-volume-mc
|
- name: cert-secret-volume-mc
|
||||||
mountPath: {{ .Values.configPathmc }}certs
|
mountPath: {{ .Values.configPathmc }}certs
|
||||||
{{ end }}
|
{{- end }}
|
||||||
resources:
|
resources: {{- toYaml .Values.makeServiceAccountJob.resources | nindent 12 }}
|
||||||
{{- toYaml .Values.makeServiceAccountJob.resources | nindent 12 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -9,26 +9,24 @@ metadata:
|
|||||||
chart: {{ template "minio.chart" . }}
|
chart: {{ template "minio.chart" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
heritage: {{ .Release.Service }}
|
heritage: {{ .Release.Service }}
|
||||||
{{- if .Values.persistence.annotations }}
|
{{- if .Values.persistence.annotations }}
|
||||||
annotations:
|
annotations: {{- toYaml .Values.persistence.annotations | nindent 4 }}
|
||||||
{{ toYaml .Values.persistence.annotations | trimSuffix "\n" | indent 4 }}
|
{{- end }}
|
||||||
{{- end }}
|
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- {{ .Values.persistence.accessMode | quote }}
|
- {{ .Values.persistence.accessMode | quote }}
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: {{ .Values.persistence.size | quote }}
|
storage: {{ .Values.persistence.size | quote }}
|
||||||
|
{{- if .Values.persistence.storageClass }}
|
||||||
{{- if .Values.persistence.storageClass }}
|
{{- if (eq "-" .Values.persistence.storageClass) }}
|
||||||
{{- if (eq "-" .Values.persistence.storageClass) }}
|
|
||||||
storageClassName: ""
|
storageClassName: ""
|
||||||
{{- else }}
|
{{- else }}
|
||||||
storageClassName: "{{ .Values.persistence.storageClass }}"
|
storageClassName: "{{ .Values.persistence.storageClass }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.persistence.VolumeName }}
|
{{- if .Values.persistence.VolumeName }}
|
||||||
volumeName: "{{ .Values.persistence.VolumeName }}"
|
volumeName: "{{ .Values.persistence.VolumeName }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
{{ $scheme := "http" }}
|
{{ $scheme := .Values.tls.enabled | ternary "https" "http" }}
|
||||||
{{- if .Values.tls.enabled }}
|
|
||||||
{{ $scheme = "https" }}
|
|
||||||
{{ end }}
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
@ -12,37 +9,36 @@ metadata:
|
|||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
heritage: {{ .Release.Service }}
|
heritage: {{ .Release.Service }}
|
||||||
monitoring: "true"
|
monitoring: "true"
|
||||||
{{- if .Values.service.annotations }}
|
{{- if .Values.service.annotations }}
|
||||||
annotations:
|
annotations: {{- toYaml .Values.service.annotations | nindent 4 }}
|
||||||
{{ toYaml .Values.service.annotations | indent 4 }}
|
{{- end }}
|
||||||
{{- end }}
|
|
||||||
spec:
|
spec:
|
||||||
{{- if (or (eq .Values.service.type "ClusterIP" "") (empty .Values.service.type)) }}
|
{{- if (or (eq .Values.service.type "ClusterIP" "") (empty .Values.service.type)) }}
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
{{- if not (empty .Values.service.clusterIP) }}
|
{{- if not (empty .Values.service.clusterIP) }}
|
||||||
clusterIP: {{ .Values.service.clusterIP }}
|
clusterIP: {{ .Values.service.clusterIP }}
|
||||||
{{end}}
|
{{- end }}
|
||||||
{{- else if eq .Values.service.type "LoadBalancer" }}
|
{{- else if eq .Values.service.type "LoadBalancer" }}
|
||||||
type: {{ .Values.service.type }}
|
type: {{ .Values.service.type }}
|
||||||
loadBalancerIP: {{ default "" .Values.service.loadBalancerIP }}
|
loadBalancerIP: {{ default "" .Values.service.loadBalancerIP }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
type: {{ .Values.service.type }}
|
type: {{ .Values.service.type }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- name: {{ $scheme }}
|
- name: {{ $scheme }}
|
||||||
port: {{ .Values.service.port }}
|
port: {{ .Values.service.port }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
{{- if (and (eq .Values.service.type "NodePort") ( .Values.service.nodePort)) }}
|
{{- if (and (eq .Values.service.type "NodePort") ( .Values.service.nodePort)) }}
|
||||||
nodePort: {{ .Values.service.nodePort }}
|
nodePort: {{ .Values.service.nodePort }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
targetPort: {{ .Values.minioAPIPort }}
|
targetPort: {{ .Values.minioAPIPort }}
|
||||||
{{- end}}
|
{{- end }}
|
||||||
{{- if .Values.service.externalIPs }}
|
{{- if .Values.service.externalIPs }}
|
||||||
externalIPs:
|
externalIPs:
|
||||||
{{- range $i , $ip := .Values.service.externalIPs }}
|
{{- range $i , $ip := .Values.service.externalIPs }}
|
||||||
- {{ $ip }}
|
- {{ $ip }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
app: {{ template "minio.name" . }}
|
app: {{ template "minio.name" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{{- if .Values.serviceAccount.create -}}
|
{{- if .Values.serviceAccount.create }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{{- if and .Values.metrics.serviceMonitor.enabled .Values.metrics.serviceMonitor.includeNode}}
|
{{- if and .Values.metrics.serviceMonitor.enabled .Values.metrics.serviceMonitor.includeNode }}
|
||||||
apiVersion: monitoring.coreos.com/v1
|
apiVersion: monitoring.coreos.com/v1
|
||||||
kind: ServiceMonitor
|
kind: ServiceMonitor
|
||||||
metadata:
|
metadata:
|
||||||
@ -12,12 +12,11 @@ metadata:
|
|||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
heritage: {{ .Release.Service }}
|
heritage: {{ .Release.Service }}
|
||||||
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
|
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
|
||||||
{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }}
|
{{- toYaml .Values.metrics.serviceMonitor.additionalLabels | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.metrics.serviceMonitor.annotations }}
|
||||||
|
annotations: {{- toYaml .Values.metrics.serviceMonitor.annotations | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.metrics.serviceMonitor.annotations }}
|
|
||||||
annotations:
|
|
||||||
{{ toYaml .Values.metrics.serviceMonitor.annotations | trimSuffix "\n" | indent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
spec:
|
||||||
endpoints:
|
endpoints:
|
||||||
{{- if .Values.tls.enabled }}
|
{{- if .Values.tls.enabled }}
|
||||||
@ -29,7 +28,7 @@ spec:
|
|||||||
name: {{ .Values.tls.certSecret }}
|
name: {{ .Values.tls.certSecret }}
|
||||||
key: {{ .Values.tls.publicCrt }}
|
key: {{ .Values.tls.publicCrt }}
|
||||||
serverName: {{ template "minio.fullname" . }}
|
serverName: {{ template "minio.fullname" . }}
|
||||||
{{ else }}
|
{{- else }}
|
||||||
- port: http
|
- port: http
|
||||||
scheme: http
|
scheme: http
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@ -41,7 +40,7 @@ spec:
|
|||||||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.metrics.serviceMonitor.relabelConfigs }}
|
{{- if .Values.metrics.serviceMonitor.relabelConfigs }}
|
||||||
{{ toYaml .Values.metrics.serviceMonitor.relabelConfigs | indent 6 }}
|
{{- toYaml .Values.metrics.serviceMonitor.relabelConfigs | nindent 6 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if not .Values.metrics.serviceMonitor.public }}
|
{{- if not .Values.metrics.serviceMonitor.public }}
|
||||||
bearerTokenSecret:
|
bearerTokenSecret:
|
||||||
@ -72,7 +71,7 @@ metadata:
|
|||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
heritage: {{ .Release.Service }}
|
heritage: {{ .Release.Service }}
|
||||||
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
|
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
|
||||||
{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }}
|
{{- toYaml .Values.metrics.serviceMonitor.additionalLabels | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
jobName: {{ template "minio.fullname" . }}
|
jobName: {{ template "minio.fullname" . }}
|
||||||
@ -89,11 +88,11 @@ spec:
|
|||||||
path: /minio/v2/metrics/cluster
|
path: /minio/v2/metrics/cluster
|
||||||
{{- if .Values.tls.enabled }}
|
{{- if .Values.tls.enabled }}
|
||||||
scheme: https
|
scheme: https
|
||||||
{{ else }}
|
{{- else }}
|
||||||
scheme: http
|
scheme: http
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.metrics.serviceMonitor.relabelConfigsCluster }}
|
{{- if .Values.metrics.serviceMonitor.relabelConfigsCluster }}
|
||||||
{{ toYaml .Values.metrics.serviceMonitor.relabelConfigsCluster | indent 2 }}
|
{{- toYaml .Values.metrics.serviceMonitor.relabelConfigsCluster | nindent 2 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
targets:
|
targets:
|
||||||
staticConfig:
|
staticConfig:
|
||||||
|
@ -3,10 +3,7 @@
|
|||||||
{{ $nodeCount := .Values.replicas | int }}
|
{{ $nodeCount := .Values.replicas | int }}
|
||||||
{{ $replicas := mul $poolCount $nodeCount }}
|
{{ $replicas := mul $poolCount $nodeCount }}
|
||||||
{{ $drivesPerNode := .Values.drivesPerNode | int }}
|
{{ $drivesPerNode := .Values.drivesPerNode | int }}
|
||||||
{{ $scheme := "http" }}
|
{{ $scheme := .Values.tls.enabled | ternary "https" "http" }}
|
||||||
{{- if .Values.tls.enabled }}
|
|
||||||
{{ $scheme = "https" }}
|
|
||||||
{{ end }}
|
|
||||||
{{ $mountPath := .Values.mountPath }}
|
{{ $mountPath := .Values.mountPath }}
|
||||||
{{ $bucketRoot := or ($.Values.bucketRoot) ($.Values.mountPath) }}
|
{{ $bucketRoot := or ($.Values.bucketRoot) ($.Values.mountPath) }}
|
||||||
{{ $subPath := .Values.persistence.subPath }}
|
{{ $subPath := .Values.persistence.subPath }}
|
||||||
@ -21,8 +18,8 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
app: {{ template "minio.name" . }}
|
app: {{ template "minio.name" . }}
|
||||||
chart: {{ template "minio.chart" . }}
|
chart: {{ template "minio.chart" . }}
|
||||||
release: "{{ .Release.Name }}"
|
release: {{ .Release.Name }}
|
||||||
heritage: "{{ .Release.Service }}"
|
heritage: {{ .Release.Service }}
|
||||||
spec:
|
spec:
|
||||||
publishNotReadyAddresses: true
|
publishNotReadyAddresses: true
|
||||||
clusterIP: None
|
clusterIP: None
|
||||||
@ -44,13 +41,12 @@ metadata:
|
|||||||
chart: {{ template "minio.chart" . }}
|
chart: {{ template "minio.chart" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
heritage: {{ .Release.Service }}
|
heritage: {{ .Release.Service }}
|
||||||
{{- if .Values.additionalLabels }}
|
{{- if .Values.additionalLabels }}
|
||||||
{{ toYaml .Values.additionalLabels | trimSuffix "\n" | indent 4 }}
|
{{- toYaml .Values.additionalLabels | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.additionalAnnotations }}
|
{{- if .Values.additionalAnnotations }}
|
||||||
annotations:
|
annotations: {{- toYaml .Values.additionalAnnotations | nindent 4 }}
|
||||||
{{ toYaml .Values.additionalAnnotations | trimSuffix "\n" | indent 4 }}
|
{{- end }}
|
||||||
{{- end }}
|
|
||||||
spec:
|
spec:
|
||||||
updateStrategy:
|
updateStrategy:
|
||||||
type: {{ .Values.StatefulSetUpdate.updateStrategy }}
|
type: {{ .Values.StatefulSetUpdate.updateStrategy }}
|
||||||
@ -67,17 +63,17 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: {{ template "minio.name" . }}
|
app: {{ template "minio.name" . }}
|
||||||
release: {{ .Release.Name }}
|
release: {{ .Release.Name }}
|
||||||
{{- if .Values.podLabels }}
|
{{- if .Values.podLabels }}
|
||||||
{{ toYaml .Values.podLabels | indent 8 }}
|
{{- toYaml .Values.podLabels | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- if not .Values.ignoreChartChecksums }}
|
{{- if not .Values.ignoreChartChecksums }}
|
||||||
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
||||||
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.podAnnotations }}
|
{{- if .Values.podAnnotations }}
|
||||||
{{ toYaml .Values.podAnnotations | trimSuffix "\n" | indent 8 }}
|
{{- toYaml .Values.podAnnotations | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- if .Values.priorityClassName }}
|
{{- if .Values.priorityClassName }}
|
||||||
priorityClassName: "{{ .Values.priorityClassName }}"
|
priorityClassName: "{{ .Values.priorityClassName }}"
|
||||||
@ -85,7 +81,7 @@ spec:
|
|||||||
{{- if .Values.runtimeClassName }}
|
{{- if .Values.runtimeClassName }}
|
||||||
runtimeClassName: "{{ .Values.runtimeClassName }}"
|
runtimeClassName: "{{ .Values.runtimeClassName }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if and .Values.securityContext.enabled .Values.persistence.enabled }}
|
{{- if and .Values.securityContext.enabled .Values.persistence.enabled }}
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||||
runAsGroup: {{ .Values.securityContext.runAsGroup }}
|
runAsGroup: {{ .Values.securityContext.runAsGroup }}
|
||||||
@ -93,18 +89,19 @@ spec:
|
|||||||
{{- if and (ge .Capabilities.KubeVersion.Major "1") (ge .Capabilities.KubeVersion.Minor "20") }}
|
{{- if and (ge .Capabilities.KubeVersion.Major "1") (ge .Capabilities.KubeVersion.Minor "20") }}
|
||||||
fsGroupChangePolicy: {{ .Values.securityContext.fsGroupChangePolicy }}
|
fsGroupChangePolicy: {{ .Values.securityContext.fsGroupChangePolicy }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ if .Values.serviceAccount.create }}
|
{{- if .Values.serviceAccount.create }}
|
||||||
serviceAccountName: {{ .Values.serviceAccount.name }}
|
serviceAccountName: {{ .Values.serviceAccount.name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
command: [
|
||||||
command: [ "/bin/sh",
|
"/bin/sh",
|
||||||
"-ce",
|
"-ce",
|
||||||
"/usr/bin/docker-entrypoint.sh minio server {{- range $i := until $poolCount }}{{ $factor := mul $i $nodeCount }}{{ $endIndex := add $factor $nodeCount }}{{ $beginIndex := mul $i $nodeCount }} {{ $scheme }}://{{ template `minio.fullname` $ }}-{{ `{` }}{{ $beginIndex }}...{{ sub $endIndex 1 }}{{ `}`}}.{{ template `minio.fullname` $ }}-svc.{{ $.Release.Namespace }}.svc.{{ $.Values.clusterDomain }}{{if (gt $drivesPerNode 1)}}{{ $bucketRoot }}-{{ `{` }}0...{{ sub $drivesPerNode 1 }}{{ `}` }}{{else}}{{ $bucketRoot }}{{end}}{{- end}} -S {{ .Values.certsPath }} --address :{{ .Values.minioAPIPort }} --console-address :{{ .Values.minioConsolePort }} {{- template `minio.extraArgs` . }}" ]
|
"/usr/bin/docker-entrypoint.sh minio server {{- range $i := until $poolCount }}{{ $factor := mul $i $nodeCount }}{{ $endIndex := add $factor $nodeCount }}{{ $beginIndex := mul $i $nodeCount }} {{ $scheme }}://{{ template `minio.fullname` $ }}-{{ `{` }}{{ $beginIndex }}...{{ sub $endIndex 1 }}{{ `}`}}.{{ template `minio.fullname` $ }}-svc.{{ $.Release.Namespace }}.svc.{{ $.Values.clusterDomain }}{{if (gt $drivesPerNode 1)}}{{ $bucketRoot }}-{{ `{` }}0...{{ sub $drivesPerNode 1 }}{{ `}` }}{{ else }}{{ $bucketRoot }}{{end }}{{- end }} -S {{ .Values.certsPath }} --address :{{ .Values.minioAPIPort }} --console-address :{{ .Values.minioConsolePort }} {{- template `minio.extraArgs` . }}"
|
||||||
|
]
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
{{- if $penabled }}
|
{{- if $penabled }}
|
||||||
{{- if (gt $drivesPerNode 1) }}
|
{{- if (gt $drivesPerNode 1) }}
|
||||||
@ -150,11 +147,11 @@ spec:
|
|||||||
{{- if .Values.extraSecret }}
|
{{- if .Values.extraSecret }}
|
||||||
- name: MINIO_CONFIG_ENV_FILE
|
- name: MINIO_CONFIG_ENV_FILE
|
||||||
value: "/tmp/minio-config-env/config.env"
|
value: "/tmp/minio-config-env/config.env"
|
||||||
{{- end}}
|
{{- end }}
|
||||||
{{- if .Values.metrics.serviceMonitor.public }}
|
{{- if .Values.metrics.serviceMonitor.public }}
|
||||||
- name: MINIO_PROMETHEUS_AUTH_TYPE
|
- name: MINIO_PROMETHEUS_AUTH_TYPE
|
||||||
value: "public"
|
value: "public"
|
||||||
{{- end}}
|
{{- end }}
|
||||||
{{- if .Values.oidc.enabled }}
|
{{- if .Values.oidc.enabled }}
|
||||||
- name: MINIO_IDENTITY_OPENID_CONFIG_URL
|
- name: MINIO_IDENTITY_OPENID_CONFIG_URL
|
||||||
value: {{ .Values.oidc.configUrl }}
|
value: {{ .Values.oidc.configUrl }}
|
||||||
@ -172,13 +169,12 @@ spec:
|
|||||||
value: {{ .Values.oidc.redirectUri }}
|
value: {{ .Values.oidc.redirectUri }}
|
||||||
- name: MINIO_IDENTITY_OPENID_COMMENT
|
- name: MINIO_IDENTITY_OPENID_COMMENT
|
||||||
value: {{ .Values.oidc.comment }}
|
value: {{ .Values.oidc.comment }}
|
||||||
{{- end}}
|
{{- end }}
|
||||||
{{- range $key, $val := .Values.environment }}
|
{{- range $key, $val := .Values.environment }}
|
||||||
- name: {{ $key }}
|
- name: {{ $key }}
|
||||||
value: {{ $val | quote }}
|
value: {{ $val | quote }}
|
||||||
{{- end}}
|
{{- end }}
|
||||||
resources:
|
resources: {{- toYaml .Values.resources | nindent 12 }}
|
||||||
{{ toYaml .Values.resources | indent 12 }}
|
|
||||||
{{- with .Values.extraContainers }}
|
{{- with .Values.extraContainers }}
|
||||||
{{- if eq (typeOf .) "string" }}
|
{{- if eq (typeOf .) "string" }}
|
||||||
{{- tpl . $ | nindent 8 }}
|
{{- tpl . $ | nindent 8 }}
|
||||||
@ -187,22 +183,18 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector: {{- toYaml . | nindent 8 }}
|
||||||
{{ toYaml . | indent 8 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- include "minio.imagePullSecrets" . | indent 6 }}
|
{{- include "minio.imagePullSecrets" . | indent 6 }}
|
||||||
{{- with .Values.affinity }}
|
{{- with .Values.affinity }}
|
||||||
affinity:
|
affinity: {{- toYaml . | nindent 8 }}
|
||||||
{{ toYaml . | indent 8 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.tolerations }}
|
{{- with .Values.tolerations }}
|
||||||
tolerations:
|
tolerations: {{- toYaml . | nindent 8 }}
|
||||||
{{ toYaml . | indent 8 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if and (gt $replicas 1) (ge .Capabilities.KubeVersion.Major "1") (ge .Capabilities.KubeVersion.Minor "19") }}
|
{{- if and (gt $replicas 1) (ge .Capabilities.KubeVersion.Major "1") (ge .Capabilities.KubeVersion.Minor "19") }}
|
||||||
{{- with .Values.topologySpreadConstraints }}
|
{{- with .Values.topologySpreadConstraints }}
|
||||||
topologySpreadConstraints:
|
topologySpreadConstraints: {{- toYaml . | nindent 8 }}
|
||||||
{{ toYaml . | indent 8 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
volumes:
|
volumes:
|
||||||
@ -216,17 +208,16 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- include "minio.tlsKeysVolume" . | indent 8 }}
|
{{- include "minio.tlsKeysVolume" . | indent 8 }}
|
||||||
{{- if .Values.extraVolumes }}
|
{{- if .Values.extraVolumes }}
|
||||||
{{ toYaml .Values.extraVolumes | nindent 8 }}
|
{{- toYaml .Values.extraVolumes | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.persistence.enabled }}
|
{{- if .Values.persistence.enabled }}
|
||||||
volumeClaimTemplates:
|
volumeClaimTemplates:
|
||||||
{{- if gt $drivesPerNode 1 }}
|
{{- if gt $drivesPerNode 1 }}
|
||||||
{{- range $diskId := until $drivesPerNode}}
|
{{- range $diskId := until $drivesPerNode}}
|
||||||
- metadata:
|
- metadata:
|
||||||
name: export-{{ $diskId }}
|
name: export-{{ $diskId }}
|
||||||
{{- if $.Values.persistence.annotations }}
|
{{- if $.Values.persistence.annotations }}
|
||||||
annotations:
|
annotations: {{- toYaml $.Values.persistence.annotations | nindent 10 }}
|
||||||
{{ toYaml $.Values.persistence.annotations | trimSuffix "\n" | indent 10 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
accessModes: [ {{ $accessMode | quote }} ]
|
accessModes: [ {{ $accessMode | quote }} ]
|
||||||
@ -241,8 +232,7 @@ spec:
|
|||||||
- metadata:
|
- metadata:
|
||||||
name: export
|
name: export
|
||||||
{{- if $.Values.persistence.annotations }}
|
{{- if $.Values.persistence.annotations }}
|
||||||
annotations:
|
annotations: {{- toYaml $.Values.persistence.annotations | nindent 10 }}
|
||||||
{{ toYaml $.Values.persistence.annotations | trimSuffix "\n" | indent 10 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
accessModes: [ {{ $accessMode | quote }} ]
|
accessModes: [ {{ $accessMode | quote }} ]
|
||||||
@ -253,5 +243,5 @@ spec:
|
|||||||
requests:
|
requests:
|
||||||
storage: {{ $psize }}
|
storage: {{ $psize }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user