File tree Expand file tree Collapse file tree 2 files changed +41
-3
lines changed
Expand file tree Collapse file tree 2 files changed +41
-3
lines changed Original file line number Diff line number Diff line change 1+ {{- if .Values.test.enabled }}
12apiVersion : batch/v1
23kind : Job
34metadata :
@@ -16,10 +17,15 @@ spec:
1617 app.kubernetes.io/component : database-ping-test
1718 spec :
1819 restartPolicy : Never
20+ {{- if .Values.test.securityContext }}
21+ securityContext :
22+ {{- .Values.test.securityContext | toYaml | nindent 8 }}
23+ {{- end }}
1924 containers :
20- - name : alpine
21- image : alpine:3.17
22- command : [ 'sh' ]
25+ - name : ping
26+ image : " {{ .Values.test.image.registry }}/{{ .Values.test.image.repository }}:{{ .Values.test.image.tag }}"
27+ command :
28+ - {{ .Values.test.shell }}
2329 env :
2430 - name : PGUSER
2531 valueFrom :
4248 - >-
4349 apk add postgresql-client &&
4450 psql "postgresql://$PGUSER:$PGPASS@{{ include "cluster.fullname" . }}-rw.{{ include "cluster.namespace" . }}.svc.cluster.local:5432/${PGDBNAME:-$PGUSER}" -c 'SELECT 1'
51+ resources :
52+ {{- .Values.test.resources | toYaml | nindent 12 }}
53+ {{- if .Values.test.containerSecurityContext }}
54+ securityContext :
55+ {{- .Values.test.containerSecurityContext | toYaml | nindent 12 }}
56+ {{- end }}
57+ {{- end }}
Original file line number Diff line number Diff line change @@ -528,3 +528,28 @@ poolers: []
528528 # # -- Custom PgBouncer deployment template.
529529 # # Use to override image, specify resources, etc.
530530 # template: {}
531+
532+ # -- Define values for chart tests
533+ test :
534+ enabled : true
535+ # -- Container image for ping.yaml
536+ image :
537+ registry : docker.io
538+ repository : alpine
539+ tag : 3.17
540+ shell : sh
541+ # -- Resources request/limit for ping Pod
542+ resources : {}
543+ # limits:
544+ # cpu: 50m
545+ # memory: 32Mi
546+ # requests:
547+ # cpu: 25m
548+ # memory: 16Mi
549+ # -- Security context for ping Pod
550+ securityContext :
551+ runAsUser : 5051
552+ runAsGroup : 5051
553+ fsGroup : 5051
554+ # -- Container security context for ping Pod
555+ containerSecurityContext : null
You can’t perform that action at this time.
0 commit comments