Naposledy aktivní 1 month ago

Revize c174624c227b1815ecc2c7403cc7dd2ce910103b

must-gatherer.yaml Raw
1kind: Project
2apiVersion: project.openshift.io/v1
3metadata:
4 name: must-gather
5spec: {}
6---
7apiVersion: v1
8kind: ServiceAccount
9metadata:
10 name: must-gather-admin
11 namespace: must-gather
12---
13kind: RoleBinding
14apiVersion: rbac.authorization.k8s.io/v1
15metadata:
16 name: must-gather-cluster-admin
17 namespace: must-gather
18subjects:
19 - kind: ServiceAccount
20 name: must-gather-admin
21 namespace: must-gather
22roleRef:
23 apiGroup: rbac.authorization.k8s.io
24 kind: ClusterRole
25 name: cluster-admin
26---
27kind: ConfigMap
28apiVersion: v1
29metadata:
30 name: blank-httpd-conf
31 namespace: must-gather
32data:
33 blank: '#'
34---
35kind: Service
36apiVersion: v1
37metadata:
38 name: must-gather-service
39 namespace: must-gather
40spec:
41 ports:
42 - protocol: TCP
43 port: 80
44 targetPort: 8080
45 type: ClusterIP
46 selector:
47 job: must-gather
48---
49kind: Route
50apiVersion: route.openshift.io/v1
51metadata:
52 name: must-gather-route
53 namespace: must-gather
54spec:
55 to:
56 kind: Service
57 name: must-gather-service
58 tls:
59 termination: edge
60 wildcardPolicy: None
61---
62apiVersion: v1
63kind: Pod
64metadata:
65 name: must-gatherer
66 labels:
67 job: must-gather
68 namespace: must-gather
69spec:
70 securityContext:
71 runAsNonRoot: true
72 seccompProfile:
73 type: RuntimeDefault
74 serviceAccount: must-gather-admin
75 volumes:
76 - name: storage
77 emptyDir: {}
78 - name: blank-welcome-conf
79 configMap:
80 name: blank-httpd-conf
81 items:
82 - key: blank
83 path: welcome.conf
84 initContainers:
85 - name: oc-cli
86 image: 'registry.redhat.io/openshift4/ose-cli-rhel9:latest'
87 securityContext: {}
88 command:
89 - '/bin/bash'
90 - '-c'
91 - 'mkdir -p /storage/html && oc adm must-gather --run-namespace=must-gather --dest-dir=/storage/html && tar -czvf /storage/html/must-gather.tar.gz /storage/html/*'
92 volumeMounts:
93 - mountPath: /storage
94 name: storage
95 containers:
96 - name: httpd
97 image: 'registry.access.redhat.com/ubi9/httpd-24:9.8-1788412240'
98 ports:
99 - containerPort: 8080
100 volumeMounts:
101 - mountPath: /var/www
102 name: storage
103 - mountPath: /etc/httpd/conf.d/welcome.conf
104 name: blank-welcome-conf
105 subPath: welcome.conf