kind: Project apiVersion: project.openshift.io/v1 metadata: name: must-gather spec: {} --- apiVersion: v1 kind: ServiceAccount metadata: name: must-gather-admin namespace: must-gather --- kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: must-gather-cluster-admin namespace: must-gather subjects: - kind: ServiceAccount name: must-gather-admin namespace: must-gather roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-admin --- kind: ConfigMap apiVersion: v1 metadata: name: blank-httpd-conf namespace: must-gather data: blank: '#' --- kind: Service apiVersion: v1 metadata: name: must-gather-service namespace: must-gather spec: ports: - protocol: TCP port: 80 targetPort: 8080 type: ClusterIP selector: job: must-gather --- kind: Route apiVersion: route.openshift.io/v1 metadata: name: must-gather-route namespace: must-gather spec: to: kind: Service name: must-gather-service tls: termination: edge wildcardPolicy: None --- apiVersion: v1 kind: Pod metadata: name: must-gatherer labels: job: must-gather namespace: must-gather spec: securityContext: runAsNonRoot: true seccompProfile: type: RuntimeDefault serviceAccount: must-gather-admin volumes: - name: storage emptyDir: {} - name: blank-welcome-conf configMap: name: blank-httpd-conf items: - key: blank path: welcome.conf initContainers: - name: oc-cli image: 'registry.redhat.io/openshift4/ose-cli-rhel9:latest' securityContext: {} command: - '/bin/bash' - '-c' - '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/*' volumeMounts: - mountPath: /storage name: storage containers: - name: httpd image: 'registry.access.redhat.com/ubi9/httpd-24:9.8-1788412240' ports: - containerPort: 8080 volumeMounts: - mountPath: /var/www name: storage - mountPath: /etc/httpd/conf.d/welcome.conf name: blank-welcome-conf subPath: welcome.conf