File tree Expand file tree Collapse file tree 2 files changed +78
-0
lines changed Expand file tree Collapse file tree 2 files changed +78
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ kind: ServiceAccount
44metadata :
55 name : kafka
66 namespace : kafka
7+ automountServiceAccountToken : true
78---
89# Sufficient rights to look up self's pod description and pod's node description
910kind : ClusterRole
Original file line number Diff line number Diff line change 1+ ---
2+ kind : ConfigMap
3+ metadata :
4+ name : test-rack-awareness
5+ # To test using the service account we need to be in the kafka namespace for now
6+ namespace : kafka
7+ apiVersion : v1
8+ data :
9+
10+ setup.sh : |-
11+ touch /tmp/testlog
12+
13+ tail -f /tmp/testlog
14+
15+ continue.sh : |-
16+ exit 0
17+
18+ run.sh : |-
19+ exec >> /tmp/testlog
20+ exec 2>&1
21+
22+ exit 0
23+
24+ ---
25+ apiVersion : apps/v1beta1
26+ kind : Deployment
27+ metadata :
28+ name : test-rack-awareness
29+ # To test using the service account we need to be in the kafka namespace for now
30+ namespace : kafka
31+ spec :
32+ replicas : 1
33+ template :
34+ metadata :
35+ labels :
36+ test-target : kafka
37+ test-type : readiness
38+ spec :
39+ serviceAccountName : kafka
40+ containers :
41+ - name : testcase
42+ image : solsson/curl@sha256:8c0c5d669b3dd67932da934024252af59fb9d0fa0e5118b5a737b35c5e1487bf
43+ env :
44+ - name : MY_NODE_NAME
45+ valueFrom :
46+ fieldRef :
47+ fieldPath : spec.nodeName
48+ - name : MY_POD_SERVICE_ACCOUNT
49+ valueFrom :
50+ fieldRef :
51+ fieldPath : spec.serviceAccountName
52+ # Test set up
53+ command :
54+ - /bin/bash
55+ - -e
56+ - /test/setup.sh
57+ # Test run, again and again
58+ readinessProbe :
59+ exec :
60+ command :
61+ - /bin/bash
62+ - -e
63+ - /test/run.sh
64+ # Test quit on nonzero exit
65+ livenessProbe :
66+ exec :
67+ command :
68+ - /bin/bash
69+ - -e
70+ - /test/continue.sh
71+ volumeMounts :
72+ - name : config
73+ mountPath : /test
74+ volumes :
75+ - name : config
76+ configMap :
77+ name : test-rack-awareness
You can’t perform that action at this time.
0 commit comments