blob: 59c64b4cc97b4cdbdf3ff8db3cc170722e4a18c4 [file] [log] [blame]
gio4a9d83d2024-04-14 13:14:40 +04001apiVersion: v1
2kind: Pod
3metadata:
4 name: "{{ include "zot.fullname" . }}-test-connection"
5 labels:
6 {{- include "zot.labels" . | nindent 4 }}
7 annotations:
8 "helm.sh/hook": test
9 "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded,hook-failed
10spec:
11 containers:
12 - name: wget
13 image: alpine:3.18
14 command:
15 - sh
16 - -c
17 - |
18 scheme="http"
19 {{- if eq $.Values.httpGet.scheme "HTTPS"}}
20 scheme="https"
21 {{- end }}
22 echo "$scheme"
23 {{- if .Values.authHeader }}
24 wget --no-check-certificate --header "Authorization: Basic {{ .Values.authHeader }}" $scheme://{{ include "zot.fullname" . }}:{{ .Values.service.port }}/v2/_catalog
25 {{- else }}
26 wget --no-check-certificate $scheme://{{ include "zot.fullname" . }}:{{ .Values.service.port }}/v2/_catalog
27 {{- end }}
28 restartPolicy: Never