-
Notifications
You must be signed in to change notification settings - Fork 1
/
test-simple.yaml
30 lines (30 loc) · 972 Bytes
/
test-simple.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
apiVersion: v1
kind: Pod
metadata:
name: "{{ .Release.Name }}-simple-test"
annotations:
"helm.sh/hook": test
"helm.sh/hook-delete-policy": hook-succeeded
spec:
containers:
- image: alpine
env:
- name: SERVICE_ADDR
value: "{{ include "gocolor.fullname" . }}"
- name: SERVICE_PORT
value: "{{ .Values.service.port }}"
command:
- /bin/sh
- -ec
- |
set -x
printenv
apk update
apk add curl
resp=$(curl -s $SERVICE_ADDR:$SERVICE_PORT/info)
echo "resp: $resp"
echo $resp | grep -q -e "Account: {{ .Values.gocolorEnv.account | default "unknown" }}"
echo $resp | grep -q -e "Region: {{ .Values.gocolorEnv.region | default "unknown" }}"
echo $resp | grep -q -e "background-color: {{ .Values.gocolorEnv.color | default "aquamarine" }};"
name: {{ .Release.Name }}-simple-test
restartPolicy: Never