-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsonobuoy.yaml
233 lines (233 loc) · 5.25 KB
/
sonobuoy.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
---
apiVersion: v1
kind: Namespace
metadata:
name: heptio-sonobuoy
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
component: sonobuoy
name: sonobuoy-serviceaccount
namespace: heptio-sonobuoy
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
labels:
component: sonobuoy
name: sonobuoy-serviceaccount
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: sonobuoy-serviceaccount
subjects:
- kind: ServiceAccount
name: sonobuoy-serviceaccount
namespace: heptio-sonobuoy
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
labels:
component: sonobuoy
name: sonobuoy-serviceaccount
namespace: heptio-sonobuoy
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- '*'
---
apiVersion: v1
data:
config.json: |
{
"Description": "sonobuoy run for scanner.heptio.com",
"Filters": {
"LabelSelector": "",
"Namespaces": ".*"
},
"PluginNamespace": "heptio-sonobuoy",
"Plugins": [
{
"name": "e2e"
}
],
"Resources": [
"Nodes",
"ServerVersion"
],
"ResultsDir": "/tmp/sonobuoy",
"Server": {
"advertiseaddress": "sonobuoy-master:8080",
"bindaddress": "0.0.0.0",
"bindport": 8080,
"timeoutseconds": 5400
},
"Version": "v0.10.0"
}
kind: ConfigMap
metadata:
labels:
component: sonobuoy
name: sonobuoy-config-cm
namespace: heptio-sonobuoy
---
apiVersion: v1
data:
e2e.tmpl: |
apiVersion: v1
kind: Pod
metadata:
annotations:
sonobuoy-driver: Job
sonobuoy-plugin: e2e
sonobuoy-result-type: e2e
labels:
component: sonobuoy
sonobuoy-run: '{{.SessionID}}'
tier: analysis
name: sonobuoy-e2e-job-{{.SessionID}}
namespace: '{{.Namespace}}'
spec:
containers:
- env:
- name: E2E_FOCUS
value: Conformance
image: gcr.io/heptio-images/kube-conformance:v1.8
imagePullPolicy: Always
name: e2e
volumeMounts:
- mountPath: /tmp/results
name: results
readOnly: false
- command:
- sh
- -c
- /sonobuoy worker global -v 5 --logtostderr
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: RESULTS_DIR
value: /tmp/results
- name: MASTER_URL
value: '{{.MasterAddress}}'
- name: RESULT_TYPE
value: e2e
image: gcr.io/heptio-images/sonobuoy:v0.10.0
imagePullPolicy: Always
name: sonobuoy-worker
volumeMounts:
- mountPath: /tmp/results
name: results
readOnly: false
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- key: CriticalAddonsOnly
operator: Exists
volumes:
- emptyDir: {}
name: results
kind: ConfigMap
metadata:
labels:
component: sonobuoy
name: sonobuoy-plugins-cm
namespace: heptio-sonobuoy
---
apiVersion: v1
kind: Pod
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
tier: analysis
name: sonobuoy
namespace: heptio-sonobuoy
spec:
containers:
- env:
- name: SONOBUOY_ADVERTISE_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
image: gcr.io/heptio-images/sonobuoy:v0.10.0
imagePullPolicy: Always
name: kube-sonobuoy
volumeMounts:
- mountPath: /etc/sonobuoy
name: sonobuoy-config-volume
- mountPath: /plugins.d
name: sonobuoy-plugins-volume
- mountPath: /tmp/sonobuoy
name: sonobuoy-output
- env:
- name: READ_RESULTS_DIR
value: /tmp/sonobuoy
- name: WRITE_RESULTS_DIR
value: /tmp/forwarder
- name: HEPTIO_TOKEN
value: "f5a37c8017782c1581f040e911dc5461"
- name: CLOUD_URL
value: https://scanner.heptio.com
image: gcr.io/heptio-images/scanner-forwarder:v0.0.4
imagePullPolicy: Always
name: forwarder
volumeMounts:
- mountPath: /tmp/sonobuoy
name: sonobuoy-output
- mountPath: /tmp/forwarder
name: forwarder-output
- env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: READ_RESULTS_DIR
value: /tmp/forwarder
image: gcr.io/heptio-images/namespace-deleter:v0.0.1
imagePullPolicy: Always
name: cleanup
volumeMounts:
- mountPath: /tmp/forwarder
name: forwarder-output
restartPolicy: Never
serviceAccountName: sonobuoy-serviceaccount
volumes:
- configMap:
name: sonobuoy-config-cm
name: sonobuoy-config-volume
- configMap:
name: sonobuoy-plugins-cm
name: sonobuoy-plugins-volume
- emptyDir: {}
name: sonobuoy-output
- emptyDir: {}
name: forwarder-output
---
apiVersion: v1
kind: Service
metadata:
labels:
component: sonobuoy
run: sonobuoy-master
name: sonobuoy-master
namespace: heptio-sonobuoy
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
run: sonobuoy-master
type: ClusterIP