-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathtest-setup.yaml
40 lines (39 loc) · 958 Bytes
/
test-setup.yaml
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
apiVersion: v1
kind: Pod
metadata:
name: {{ include "konk-service.fullname" . }}-test
namespace: {{ .Release.Namespace }}
labels:
{{- include "konk-service.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test-success
"helm.sh/hook": test
spec:
containers:
- name: kubectl
image: {{ .Values.kind.image.repository }}:{{ .Values.kind.image.tag }}
command:
- /bin/bash
- -cx
env:
- name: KUBECONFIG
value: /kubeconfig/admin.conf
args:
- |
kubectl auth can-i create apiservice
kubectl auth can-i create crd
{{- range .Values.group.kinds }}
until kubectl get {{ . }}.{{ $.Values.group.name}}
do
sleep 3s
done
{{- end }}
volumeMounts:
- name: kubeconfig
mountPath: /kubeconfig
readOnly: true
restartPolicy: Never
volumes:
- name: kubeconfig
secret:
secretName: {{ include "konk-service.fullname" . }}-kubeconfig