Merge "Change the error message for orchestrator startup"
[multicloud/k8s.git] / kud / tests / vnfs / comp-app / collection / app2 / helm / prometheus-operator / templates / prometheus-operator / admission-webhooks / job-patch / job-createSecret.yaml
1 {{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled }}
2 apiVersion: batch/v1
3 kind: Job
4 metadata:
5   name:  {{ template "prometheus-operator.fullname" . }}-admission-create
6   namespace: {{ template "prometheus-operator.namespace" . }}
7   annotations:
8     "helm.sh/hook": pre-install,pre-upgrade
9     "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
10   labels:
11     app: {{ template "prometheus-operator.name" $ }}-admission-create
12 {{- include "prometheus-operator.labels" $ | indent 4 }}
13 spec:
14   {{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }}
15   # Alpha feature since k8s 1.12
16   ttlSecondsAfterFinished: 0
17   {{- end }}
18   template:
19     metadata:
20       name:  {{ template "prometheus-operator.fullname" . }}-admission-create
21 {{- with .Values.prometheusOperator.admissionWebhooks.patch.podAnnotations }}
22       annotations:
23 {{ toYaml .  | indent 8 }}
24 {{- end }}
25       labels:
26         app: {{ template "prometheus-operator.name" $ }}-admission-create
27 {{- include "prometheus-operator.labels" $ | indent 8 }}
28     spec:
29       {{- if .Values.prometheusOperator.admissionWebhooks.patch.priorityClassName }}
30       priorityClassName: {{ .Values.prometheusOperator.admissionWebhooks.patch.priorityClassName }}
31       {{- end }}
32       containers:
33         - name: create
34           image: {{ .Values.prometheusOperator.admissionWebhooks.patch.image.repository }}:{{ .Values.prometheusOperator.admissionWebhooks.patch.image.tag }}
35           imagePullPolicy: {{ .Values.prometheusOperator.admissionWebhooks.patch.image.pullPolicy }}
36           args:
37             - create
38             - --host={{ template "prometheus-operator.operator.fullname" . }},{{ template "prometheus-operator.operator.fullname" . }}.{{ template "prometheus-operator.namespace" . }}.svc
39             - --namespace={{ template "prometheus-operator.namespace" . }}
40             - --secret-name={{ template "prometheus-operator.fullname" . }}-admission
41           resources:
42 {{ toYaml .Values.prometheusOperator.admissionWebhooks.patch.resources | indent 12 }}
43       restartPolicy: OnFailure
44       serviceAccountName: {{ template "prometheus-operator.fullname" . }}-admission
45       {{- with .Values.prometheusOperator.admissionWebhooks.patch.nodeSelector }}
46       nodeSelector:
47 {{ toYaml . | indent 8 }}
48       {{- end }}
49       {{- with .Values.prometheusOperator.admissionWebhooks.patch.affinity }}
50       affinity:
51 {{ toYaml . | indent 8 }}
52       {{- end }}
53       {{- with .Values.prometheusOperator.admissionWebhooks.patch.tolerations }}
54       tolerations:
55 {{ toYaml . | indent 8 }}
56       {{- end }}
57       securityContext:
58         runAsGroup: 2000
59         runAsNonRoot: true
60         runAsUser: 2000
61 {{- end }}