最終更新 1 month ago

修正履歴 2708c8f0ef394cebb1bb1643c2d70437927099db

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