mirror of
https://github.com/minio/minio.git
synced 2024-12-25 06:35:56 -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
|
- name: minio-mc
|
||||||
image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}"
|
image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}"
|
||||||
imagePullPolicy: {{ .Values.mcImage.pullPolicy }}
|
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"]
|
command: ["/bin/sh", "/config/initialize"]
|
||||||
|
{{- end }}
|
||||||
env:
|
env:
|
||||||
- name: MINIO_ENDPOINT
|
- name: MINIO_ENDPOINT
|
||||||
value: {{ template "minio.fullname" . }}
|
value: {{ template "minio.fullname" . }}
|
||||||
|
@ -69,7 +69,12 @@ spec:
|
|||||||
- name: minio-mc
|
- name: minio-mc
|
||||||
image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}"
|
image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}"
|
||||||
imagePullPolicy: {{ .Values.mcImage.pullPolicy }}
|
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"]
|
command: ["/bin/sh", "/config/add-policy"]
|
||||||
|
{{- end }}
|
||||||
env:
|
env:
|
||||||
- name: MINIO_ENDPOINT
|
- name: MINIO_ENDPOINT
|
||||||
value: {{ template "minio.fullname" . }}
|
value: {{ template "minio.fullname" . }}
|
||||||
|
@ -79,7 +79,12 @@ spec:
|
|||||||
- name: minio-mc
|
- name: minio-mc
|
||||||
image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}"
|
image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}"
|
||||||
imagePullPolicy: {{ .Values.mcImage.pullPolicy }}
|
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"]
|
command: ["/bin/sh", "/config/add-user"]
|
||||||
|
{{- end }}
|
||||||
env:
|
env:
|
||||||
- name: MINIO_ENDPOINT
|
- name: MINIO_ENDPOINT
|
||||||
value: {{ template "minio.fullname" . }}
|
value: {{ template "minio.fullname" . }}
|
||||||
|
@ -69,7 +69,12 @@ spec:
|
|||||||
- name: minio-mc
|
- name: minio-mc
|
||||||
image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}"
|
image: "{{ .Values.mcImage.repository }}:{{ .Values.mcImage.tag }}"
|
||||||
imagePullPolicy: {{ .Values.mcImage.pullPolicy }}
|
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"]
|
command: ["/bin/sh", "/config/custom-command"]
|
||||||
|
{{- end }}
|
||||||
env:
|
env:
|
||||||
- name: MINIO_ENDPOINT
|
- name: MINIO_ENDPOINT
|
||||||
value: {{ template "minio.fullname" . }}
|
value: {{ template "minio.fullname" . }}
|
||||||
|
@ -310,6 +310,8 @@ makePolicyJob:
|
|||||||
nodeSelector: {}
|
nodeSelector: {}
|
||||||
tolerations: []
|
tolerations: []
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
# Command to run after the main command on exit
|
||||||
|
exitCommand: ""
|
||||||
|
|
||||||
## List of users to be created after minio install
|
## List of users to be created after minio install
|
||||||
##
|
##
|
||||||
@ -344,6 +346,8 @@ makeUserJob:
|
|||||||
nodeSelector: {}
|
nodeSelector: {}
|
||||||
tolerations: []
|
tolerations: []
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
# Command to run after the main command on exit
|
||||||
|
exitCommand: ""
|
||||||
|
|
||||||
## List of buckets to be created after minio install
|
## List of buckets to be created after minio install
|
||||||
##
|
##
|
||||||
@ -378,7 +382,9 @@ makeBucketJob:
|
|||||||
nodeSelector: {}
|
nodeSelector: {}
|
||||||
tolerations: []
|
tolerations: []
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
# Command to run after the main command on exit
|
||||||
|
exitCommand: ""
|
||||||
|
|
||||||
## List of command to run after minio install
|
## List of command to run after minio install
|
||||||
## NOTE: the mc command TARGET is always "myminio"
|
## NOTE: the mc command TARGET is always "myminio"
|
||||||
customCommands:
|
customCommands:
|
||||||
@ -399,7 +405,9 @@ customCommandJob:
|
|||||||
nodeSelector: {}
|
nodeSelector: {}
|
||||||
tolerations: []
|
tolerations: []
|
||||||
affinity: {}
|
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)
|
## 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
|
## when Chart is deployed
|
||||||
environment:
|
environment:
|
||||||
|
Loading…
Reference in New Issue
Block a user