mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Optionally run a command when completing jobs (#15017)
This commit is contained in:
parent
aff236e20e
commit
0357121d17
@ -69,7 +69,12 @@ spec:
|
||||
- name: minio-mc
|
||||
image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}"
|
||||
imagePullPolicy: {{ .Values.mcImage.pullPolicy }}
|
||||
{{- if .Values.makeBucketJob.exitCommand }}
|
||||
command: ["/bin/sh", "-c"]
|
||||
args: ["/bin/sh /config/initialize; x=$(echo $?); {{ .Values.makeBucketJob.exitCommand }} && exit $x" ]
|
||||
{{- else }}
|
||||
command: ["/bin/sh", "/config/initialize"]
|
||||
{{- end }}
|
||||
env:
|
||||
- name: MINIO_ENDPOINT
|
||||
value: {{ template "minio.fullname" . }}
|
||||
|
@ -69,7 +69,12 @@ spec:
|
||||
- name: minio-mc
|
||||
image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}"
|
||||
imagePullPolicy: {{ .Values.mcImage.pullPolicy }}
|
||||
{{- if .Values.makePolicyJob.exitCommand }}
|
||||
command: ["/bin/sh", "-c"]
|
||||
args: ["/bin/sh /config/add-policy; x=$(echo $?); {{ .Values.makePolicyJob.exitCommand }} && exit $x" ]
|
||||
{{- else }}
|
||||
command: ["/bin/sh", "/config/add-policy"]
|
||||
{{- end }}
|
||||
env:
|
||||
- name: MINIO_ENDPOINT
|
||||
value: {{ template "minio.fullname" . }}
|
||||
|
@ -79,7 +79,12 @@ spec:
|
||||
- name: minio-mc
|
||||
image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}"
|
||||
imagePullPolicy: {{ .Values.mcImage.pullPolicy }}
|
||||
{{- if .Values.makeUserJob.exitCommand }}
|
||||
command: ["/bin/sh", "-c"]
|
||||
args: ["/bin/sh /config/add-user; x=$(echo $?); {{ .Values.makeUserJob.exitCommand }} && exit $x" ]
|
||||
{{- else }}
|
||||
command: ["/bin/sh", "/config/add-user"]
|
||||
{{- end }}
|
||||
env:
|
||||
- name: MINIO_ENDPOINT
|
||||
value: {{ template "minio.fullname" . }}
|
||||
|
@ -69,7 +69,12 @@ spec:
|
||||
- name: minio-mc
|
||||
image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}"
|
||||
imagePullPolicy: {{ .Values.mcImage.pullPolicy }}
|
||||
{{- if .Values.customCommandJob.exitCommand }}
|
||||
command: ["/bin/sh", "-c"]
|
||||
args: ["/bin/sh /config/custom-command; x=$(echo $?); {{ .Values.customCommandJob.exitCommand }} && exit $x" ]
|
||||
{{- else }}
|
||||
command: ["/bin/sh", "/config/custom-command"]
|
||||
{{- end }}
|
||||
env:
|
||||
- name: MINIO_ENDPOINT
|
||||
value: {{ template "minio.fullname" . }}
|
||||
|
@ -310,6 +310,8 @@ makePolicyJob:
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
# Command to run after the main command on exit
|
||||
exitCommand: ""
|
||||
|
||||
## List of users to be created after minio install
|
||||
##
|
||||
@ -344,6 +346,8 @@ makeUserJob:
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
# Command to run after the main command on exit
|
||||
exitCommand: ""
|
||||
|
||||
## List of buckets to be created after minio install
|
||||
##
|
||||
@ -378,7 +382,9 @@ makeBucketJob:
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
|
||||
# Command to run after the main command on exit
|
||||
exitCommand: ""
|
||||
|
||||
## List of command to run after minio install
|
||||
## NOTE: the mc command TARGET is always "myminio"
|
||||
customCommands:
|
||||
@ -399,7 +405,9 @@ customCommandJob:
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
|
||||
# Command to run after the main command on exit
|
||||
exitCommand: ""
|
||||
|
||||
## Use this field to add environment variables relevant to MinIO server. These fields will be passed on to MinIO container(s)
|
||||
## when Chart is deployed
|
||||
environment:
|
||||
|
Loading…
Reference in New Issue
Block a user