You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.3 KiB
44 lines
1.3 KiB
{{- if .Values.test.enabled }}
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: {{ include "keycloak.fullname" . }}-test
|
|
labels:
|
|
{{- include "keycloak.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: test
|
|
annotations:
|
|
helm.sh/hook: test
|
|
helm.sh/hook-delete-policy: {{ .Values.test.deletionPolicy }}
|
|
spec:
|
|
securityContext:
|
|
{{- toYaml .Values.test.podSecurityContext | nindent 4 }}
|
|
containers:
|
|
- name: keycloak-test
|
|
image: "{{ .Values.test.image.repository }}:{{ .Values.test.image.tag }}"
|
|
imagePullPolicy: {{ .Values.test.image.pullPolicy }}
|
|
securityContext:
|
|
{{- toYaml .Values.test.securityContext | nindent 8 }}
|
|
command:
|
|
- python3
|
|
args:
|
|
- /tests/test.py
|
|
env:
|
|
- name: KEYCLOAK_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "keycloak.fullname" . }}-admin-creds
|
|
key: user
|
|
- name: KEYCLOAK_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "keycloak.fullname" . }}-admin-creds
|
|
key: password
|
|
volumeMounts:
|
|
- name: tests
|
|
mountPath: /tests
|
|
volumes:
|
|
- name: tests
|
|
configMap:
|
|
name: {{ include "keycloak.fullname" . }}-test
|
|
restartPolicy: Never
|
|
{{- end }}
|
|
|