added repo
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
# Minio provides post-install hook to create bucket
|
||||
# however the hook won't be executed if helm install is run
|
||||
# with --wait flag. Hence this job is a workaround for that.
|
||||
# See https://github.com/grafana/mimir/issues/2464
|
||||
{{- if .Values.minio.enabled }}
|
||||
{{- if .Values.minio.buckets }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
{{- $minioSub := index .Subcharts "minio" }}
|
||||
name: {{ include "mimir.resourceName" (dict "ctx" . "component" "make-minio-buckets") }}-{{ $minioSub.Chart.Version }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels:
|
||||
app: {{ template "minio.name" . }}-make-bucket-job
|
||||
chart: {{ template "minio.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- with .Values.minio.makeBucketJob.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "minio.name" . }}-job
|
||||
release: {{ .Release.Name }}
|
||||
{{- if .Values.minio.podLabels }}
|
||||
{{ toYaml .Values.minio.podLabels | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.minio.makeBucketJob.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.minio.makeBucketJob.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
{{- include "minio.imagePullSecrets" . | indent 6 }}
|
||||
{{- if .Values.minio.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.minio.makeBucketJob.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.minio.makeBucketJob.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.minio.makeBucketJob.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.minio.makeBucketJob.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.minio.makeBucketJob.securityContext.runAsUser }}
|
||||
runAsGroup: {{ .Values.minio.makeBucketJob.securityContext.runAsGroup }}
|
||||
fsGroup: {{ .Values.minio.makeBucketJob.securityContext.fsGroup }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: minio-configuration
|
||||
projected:
|
||||
sources:
|
||||
- configMap:
|
||||
name: {{ .Release.Name }}-minio
|
||||
- secret:
|
||||
name: {{ .Release.Name }}-minio
|
||||
{{- if .Values.minio.tls.enabled }}
|
||||
- name: cert-secret-volume-mc
|
||||
secret:
|
||||
secretName: {{ .Values.minio.tls.certSecret }}
|
||||
items:
|
||||
- key: {{ .Values.minio.tls.publicCrt }}
|
||||
path: CAs/public.crt
|
||||
{{ end }}
|
||||
containers:
|
||||
- name: minio-mc
|
||||
image: "{{ .Values.minio.mcImage.repository }}:{{ .Values.minio.mcImage.tag }}"
|
||||
imagePullPolicy: {{ .Values.minio.mcImage.pullPolicy }}
|
||||
command: ["/bin/sh", "/config/initialize"]
|
||||
env:
|
||||
- name: MINIO_ENDPOINT
|
||||
value: {{ .Release.Name }}-minio
|
||||
- name: MINIO_PORT
|
||||
value: {{ .Values.minio.service.port | quote }}
|
||||
volumeMounts:
|
||||
- name: minio-configuration
|
||||
mountPath: /config
|
||||
{{- if .Values.minio.tls.enabled }}
|
||||
- name: cert-secret-volume-mc
|
||||
mountPath: {{ .Values.minio.configPathmc }}certs
|
||||
{{ end }}
|
||||
resources:
|
||||
{{ toYaml .Values.minio.makeBucketJob.resources | indent 10 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user