Última atividade 1 month ago

thaddselden's Avatar thaddselden revisou este gist 1 month ago. Ir para a revisão

1 file changed, 1 insertion, 1 deletion

must-gatherer.yaml

@@ -87,7 +87,7 @@ spec:
87 87 command:
88 88 - '/bin/bash'
89 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/*'
90 + - 'mkdir -p /storage/html && oc adm must-gather --image-stream=openshift/must-gather:latest https://www.youtube.com/watch?v=VNzl-q0EGfg --dest-dir=/storage/html && tar -czvf /storage/html/must-gather.tar.gz /storage/html/*'
91 91 volumeMounts:
92 92 - mountPath: /storage
93 93 name: storage

thaddselden's Avatar thaddselden revisou este gist 1 month ago. Ir para a revisão

1 file changed, 2 insertions, 2 deletions

must-gatherer.yaml

@@ -82,7 +82,7 @@ spec:
82 82 path: welcome.conf
83 83 initContainers:
84 84 - name: oc-cli
85 - image: 'registry.redhat.io/openshift4/ose-cli-rhel9:latest'
85 + image: 'image-registry.openshift-image-registry.svc:5000/openshift/cli:latest'
86 86 securityContext: {}
87 87 command:
88 88 - '/bin/bash'
@@ -93,7 +93,7 @@ spec:
93 93 name: storage
94 94 containers:
95 95 - name: httpd
96 - image: 'registry.access.redhat.com/ubi9/httpd-24:9.8-1788412240'
96 + image: 'image-registry.openshift-image-registry.svc:5000/openshift/httpd:latest'
97 97 ports:
98 98 - containerPort: 8080
99 99 volumeMounts:

thaddselden's Avatar thaddselden revisou este gist 1 month ago. Ir para a revisão

1 file changed, 2 insertions, 3 deletions

must-gatherer.yaml

@@ -10,11 +10,10 @@ metadata:
10 10 name: must-gather-admin
11 11 namespace: must-gather
12 12 ---
13 - kind: RoleBinding
13 + kind: ClusterRoleBinding
14 14 apiVersion: rbac.authorization.k8s.io/v1
15 15 metadata:
16 16 name: must-gather-cluster-admin
17 - namespace: must-gather
18 17 subjects:
19 18 - kind: ServiceAccount
20 19 name: must-gather-admin
@@ -88,7 +87,7 @@ spec:
88 87 command:
89 88 - '/bin/bash'
90 89 - '-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/*'
90 + - 'mkdir -p /storage/html && oc adm must-gather --dest-dir=/storage/html && tar -czvf /storage/html/must-gather.tar.gz /storage/html/*'
92 91 volumeMounts:
93 92 - mountPath: /storage
94 93 name: storage

thaddselden's Avatar thaddselden revisou este gist 1 month ago. Ir para a revisão

1 file changed, 3 insertions, 2 deletions

must-gatherer.yaml

@@ -10,10 +10,11 @@ metadata:
10 10 name: must-gather-admin
11 11 namespace: must-gather
12 12 ---
13 - kind: ClusterRoleBinding
13 + kind: RoleBinding
14 14 apiVersion: rbac.authorization.k8s.io/v1
15 15 metadata:
16 16 name: must-gather-cluster-admin
17 + namespace: must-gather
17 18 subjects:
18 19 - kind: ServiceAccount
19 20 name: must-gather-admin
@@ -87,7 +88,7 @@ spec:
87 88 command:
88 89 - '/bin/bash'
89 90 - '-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 + - '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/*'
91 92 volumeMounts:
92 93 - mountPath: /storage
93 94 name: storage

thaddselden's Avatar thaddselden revisou este gist 1 month ago. Ir para a revisão

1 file changed, 104 insertions

must-gatherer.yaml(arquivo criado)

@@ -0,0 +1,104 @@
1 + kind: Project
2 + apiVersion: project.openshift.io/v1
3 + metadata:
4 + name: must-gather
5 + spec: {}
6 + ---
7 + apiVersion: v1
8 + kind: ServiceAccount
9 + metadata:
10 + name: must-gather-admin
11 + namespace: must-gather
12 + ---
13 + kind: ClusterRoleBinding
14 + apiVersion: rbac.authorization.k8s.io/v1
15 + metadata:
16 + name: must-gather-cluster-admin
17 + subjects:
18 + - kind: ServiceAccount
19 + name: must-gather-admin
20 + namespace: must-gather
21 + roleRef:
22 + apiGroup: rbac.authorization.k8s.io
23 + kind: ClusterRole
24 + name: cluster-admin
25 + ---
26 + kind: ConfigMap
27 + apiVersion: v1
28 + metadata:
29 + name: blank-httpd-conf
30 + namespace: must-gather
31 + data:
32 + blank: '#'
33 + ---
34 + kind: Service
35 + apiVersion: v1
36 + metadata:
37 + name: must-gather-service
38 + namespace: must-gather
39 + spec:
40 + ports:
41 + - protocol: TCP
42 + port: 80
43 + targetPort: 8080
44 + type: ClusterIP
45 + selector:
46 + job: must-gather
47 + ---
48 + kind: Route
49 + apiVersion: route.openshift.io/v1
50 + metadata:
51 + name: must-gather-route
52 + namespace: must-gather
53 + spec:
54 + to:
55 + kind: Service
56 + name: must-gather-service
57 + tls:
58 + termination: edge
59 + wildcardPolicy: None
60 + ---
61 + apiVersion: v1
62 + kind: Pod
63 + metadata:
64 + name: must-gatherer
65 + labels:
66 + job: must-gather
67 + namespace: must-gather
68 + spec:
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
Próximo Anterior