Skip to content

Instantly share code, notes, and snippets.

@prb112
Last active April 3, 2023 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prb112/287674cf49ddbfd4a437a61f33602117 to your computer and use it in GitHub Desktop.
Save prb112/287674cf49ddbfd4a437a61f33602117 to your computer and use it in GitHub Desktop.
pod-def.yml
kind: Pod
apiVersion: v1
metadata:
annotations:
openshift.io/scc: node-exporter
name: debug-tools
namespace: example-ns
spec:
nodeSelector:
kubernetes.io/os: linux
restartPolicy: Always
priority: 2000000000
schedulerName: default-scheduler
enableServiceLinks: true
terminationGracePeriodSeconds: 30
preemptionPolicy: PreemptLowerPriority
containers:
- name: diagnostic
image: quay.ocp-power.xyz/powercloud/debug-tools
imagePullPolicy: IfNotPresent
command: [ "sh", "-c", "sleep inf" ]
resources:
requests:
cpu: 1000m
memory: 2048Mi
volumeMounts:
- name: host-sys
mountPath: /sys
terminationMessagePath: /dev/termination-log
securityContext:
privileged: true
seccompProfile:
type: RuntimeDefault
capabilities:
add:
- CAP_SYS_ADMIN
- CAP_FOWNER
- NET_ADMIN
- SYS_ADMIN
drop:
- ALL
runAsUser: 0
runAsGroup: 0
runAsNonRoot: false
readOnlyRootFilesystem: false
allowPrivilegeEscalation: true
volumes:
- name: host-sys
hostPath:
path: /sys
type: Directory
nodeName: master-0
priorityClassName: system-cluster-critical
hostPID: true
hostIPC: true
hostNetwork: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment