-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathvalidate-usage.yaml
More file actions
41 lines (41 loc) · 1.51 KB
/
validate-usage.yaml
File metadata and controls
41 lines (41 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{{- if not .Values.installer.skipUsageValidation }}
apiVersion: batch/v1
kind: Job
metadata:
name: validate-usage
annotations:
helm.sh/hook: pre-install
helm.sh/hook-delete-policy: hook-succeeded,before-hook-creation
helm.sh/hook-weight: "10"
spec:
ttlSecondsAfterFinished: 300
template:
spec:
serviceAccountName: validate-usage-sa
restartPolicy: Never
containers:
- name: validate-usage
image: "{{ .Values.installer.image.repository }}:{{ .Values.installer.image.tag | default .Chart.Version }}"
imagePullPolicy: {{ .Values.installer.image.pullPolicy }}
{{- include "installer.validate-usage.environment-variables" . | nindent 8}}
command: ["sh", "-c"]
args:
- |
cf account validate-usage --fail-condition=reached --subject=clusters --values /job_tmp/values.yaml --namespace ${NAMESPACE} --hook --log-level debug
volumeMounts:
- name: validate-usage-volume
mountPath: "/job_tmp"
volumes:
- name: validate-usage-volume
configMap:
name: helm-values-config
{{- with .Values.installer.nodeSelector | default .Values.global.nodeSelector }}
nodeSelector: {{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.installer.tolerations | default .Values.global.tolerations}}
tolerations: {{ toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.installer.affinity }}
affinity: {{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}