[RECV-94] Separate docker/robot invoking
[validation.git] / tests / k8s / conformance / sonobuoy.yaml
1 ##############################################################################
2 # Copyright (c) 2019 AT&T Intellectual Property.                             #
3 # Copyright (c) 2019 Nokia.                                                  #
4 #                                                                            #
5 # Licensed under the Apache License, Version 2.0 (the "License");            #
6 # you maynot use this file except in compliance with the License.            #
7 #                                                                            #
8 # You may obtain a copy of the License at                                    #
9 #       http://www.apache.org/licenses/LICENSE-2.0                           #
10 #                                                                            #
11 # Unless required by applicable law or agreed to in writing, software        #
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
14 # See the License for the specific language governing permissions and        #
15 # limitations under the License.                                             #
16 ##############################################################################
17
18 ---
19 apiVersion: v1
20 kind: Namespace
21 metadata:
22   name: heptio-sonobuoy
23 ---
24 apiVersion: v1
25 kind: ServiceAccount
26 metadata:
27   labels:
28     component: sonobuoy
29   name: sonobuoy-serviceaccount
30   namespace: heptio-sonobuoy
31 ---
32 apiVersion: rbac.authorization.k8s.io/v1
33 kind: ClusterRoleBinding
34 metadata:
35   labels:
36     component: sonobuoy
37   name: sonobuoy-serviceaccount-heptio-sonobuoy
38 roleRef:
39   apiGroup: rbac.authorization.k8s.io
40   kind: ClusterRole
41   name: sonobuoy-serviceaccount
42 subjects:
43 - kind: ServiceAccount
44   name: sonobuoy-serviceaccount
45   namespace: heptio-sonobuoy
46 ---
47 apiVersion: rbac.authorization.k8s.io/v1
48 kind: ClusterRole
49 metadata:
50   labels:
51     component: sonobuoy
52   name: sonobuoy-serviceaccount
53 rules:
54 - apiGroups:
55   - '*'
56   resources:
57   - '*'
58   verbs:
59   - '*'
60 - nonResourceURLs:
61   - '/metrics'
62   - '/logs'
63   - '/logs/*'
64   verbs:
65   - 'get'
66 ---
67 apiVersion: v1
68 data:
69   config.json: |
70     {"Description":"DEFAULT","UUID":"376a4ddc-4498-49fc-af2e-999242c4c245","Version":"v0.13.0","ResultsDir":"/tmp/sonobuoy","Resources":["CertificateSigningRequests","ClusterRoleBindings","ClusterRoles","ComponentStatuses","CustomResourceDefinitions","Nodes","PersistentVolumes","PodSecurityPolicies","ServerGroups","ServerVersion","StorageClasses","ConfigMaps","ControllerRevisions","CronJobs","DaemonSets","Deployments","Endpoints","Ingresses","Jobs","LimitRanges","NetworkPolicies","PersistentVolumeClaims","PodDisruptionBudgets","PodTemplates","Pods","ReplicaSets","ReplicationControllers","ResourceQuotas","RoleBindings","Roles","ServiceAccounts","Services","StatefulSets"],"Filters":{"Namespaces":".*","LabelSelector":""},"Limits":{"PodLogs":{"LimitSize":"","LimitTime":""}},"Server":{"bindaddress":"0.0.0.0","bindport":8080,"advertiseaddress":"","timeoutseconds":10800},"Plugins":[{"name":"e2e"},{"name":"systemd-logs"}],"PluginSearchPath":["./plugins.d","/etc/sonobuoy/plugins.d","~/sonobuoy/plugins.d"],"Namespace":"heptio-sonobuoy","LoadedPlugins":null,"WorkerImage":"gcr.io/heptio-images/sonobuoy:latest","ImagePullPolicy":"Always"}
71 kind: ConfigMap
72 metadata:
73   labels:
74     component: sonobuoy
75   name: sonobuoy-config-cm
76   namespace: heptio-sonobuoy
77 ---
78 apiVersion: v1
79 data:
80   e2e.yaml: |
81     sonobuoy-config:
82       driver: Job
83       plugin-name: e2e
84       result-type: e2e
85     spec:
86       env:
87       - name: E2E_FOCUS
88         value: '\[Conformance\]'
89       - name: E2E_SKIP
90         value: 'Alpha|\[(Disruptive|Feature:[^\]]+|Flaky)\]'
91       - name: E2E_PARALLEL
92         value: '1'
93       command: ["/run_e2e.sh"]
94       image: akraino/validation:kube-conformance-v1.11
95       imagePullPolicy: Always
96       name: e2e
97       volumeMounts:
98       - mountPath: /tmp/results
99         name: results
100         readOnly: false
101       tolerations:
102         - operator: "Exists"
103   systemd-logs.yaml: |
104     sonobuoy-config:
105       driver: DaemonSet
106       plugin-name: systemd-logs
107       result-type: systemd_logs
108     spec:
109       command: ["/bin/sh", "-c", "/get_systemd_logs.sh && sleep 3600"]
110       env:
111       - name: NODE_NAME
112         valueFrom:
113           fieldRef:
114             fieldPath: spec.nodeName
115       - name: RESULTS_DIR
116         value: /tmp/results
117       - name: CHROOT_DIR
118         value: /node
119       image: akraino/validation:sonobuoy-plugin-systemd-logs-latest
120       imagePullPolicy: Always
121       name: sonobuoy-systemd-logs-config
122       securityContext:
123         privileged: true
124       volumeMounts:
125       - mountPath: /tmp/results
126         name: results
127         readOnly: false
128       - mountPath: /node
129         name: root
130         readOnly: false
131 kind: ConfigMap
132 metadata:
133   labels:
134     component: sonobuoy
135   name: sonobuoy-plugins-cm
136   namespace: heptio-sonobuoy
137 ---
138 apiVersion: v1
139 kind: Pod
140 metadata:
141   labels:
142     component: sonobuoy
143     run: sonobuoy-master
144     tier: analysis
145   name: sonobuoy
146   namespace: heptio-sonobuoy
147 spec:
148   containers:
149   - command:
150     - /bin/bash
151     - -c
152     - /sonobuoy master --no-exit=true -v 3 --logtostderr
153     env:
154     - name: SONOBUOY_ADVERTISE_IP
155       valueFrom:
156         fieldRef:
157           fieldPath: status.podIP
158     image: gcr.io/heptio-images/sonobuoy:v0.13.0
159     imagePullPolicy: Always
160     name: kube-sonobuoy
161     volumeMounts:
162     - mountPath: /etc/sonobuoy
163       name: sonobuoy-config-volume
164     - mountPath: /plugins.d
165       name: sonobuoy-plugins-volume
166     - mountPath: /tmp/sonobuoy
167       name: output-volume
168   restartPolicy: Never
169   serviceAccountName: sonobuoy-serviceaccount
170   volumes:
171   - configMap:
172       name: sonobuoy-config-cm
173     name: sonobuoy-config-volume
174   - configMap:
175       name: sonobuoy-plugins-cm
176     name: sonobuoy-plugins-volume
177   - emptyDir: {}
178     name: output-volume
179 ---
180 apiVersion: v1
181 kind: Service
182 metadata:
183   labels:
184     component: sonobuoy
185     run: sonobuoy-master
186   name: sonobuoy-master
187   namespace: heptio-sonobuoy
188 spec:
189   ports:
190   - port: 8080
191     protocol: TCP
192     targetPort: 8080
193   selector:
194     run: sonobuoy-master
195   type: ClusterIP
196