| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- {{- if .Values.plugin.jobs.patchConsoles.enabled }}
- apiVersion: batch/v1
- kind: Job
- metadata:
- name: {{ template "openshift-console-plugin.patcherName" . }}
- namespace: {{ .Release.Namespace }}
- labels:
- {{- include "openshift-console-plugin.labels" . | nindent 4 }}
- annotations:
- helm.sh/hook: post-install,post-upgrade
- helm.sh/hook-delete-policy: before-hook-creation
- spec:
- parallelism: 1
- template:
- metadata:
- labels:
- {{- include "openshift-console-plugin.labels" . | nindent 8 }}
- spec:
- restartPolicy: OnFailure
- serviceAccountName: {{ template "openshift-console-plugin.patcherServiceAccountName" . }}
- {{- if .Values.plugin.jobs.patchConsoles.podSecurityContext }}
- securityContext:
- {{ tpl (toYaml .Values.plugin.jobs.patchConsoles.podSecurityContext | indent 8) . }}
- {{- end }}
- terminationGracePeriodSeconds: 400
- dnsPolicy: ClusterFirst
- containers:
- - name: {{ template "openshift-console-plugin.patcherName" . }}
- image: {{ required "Patcher image must be specified!" .Values.plugin.jobs.patchConsoles.image }}
- {{- if .Values.plugin.jobs.patchConsoles.containerSecurityContext }}
- securityContext:
- {{ tpl (toYaml .Values.plugin.jobs.patchConsoles.containerSecurityContext | indent 8) . }}
- {{- end }}
- resources:
- {{- toYaml .Values.plugin.jobs.patchConsoles.resources | nindent 12 }}
- command:
- - /bin/bash
- - -c
- - |
- oc patch consoles.operator.openshift.io cluster --patch '{ "spec": { "plugins": ["{{ template "openshift-console-plugin.name" . }}"] } }' --type=merge
- {{- end }}
|