Skip to content

Instantly share code, notes, and snippets.

@onefoursix
Last active June 16, 2021 02:50
Show Gist options
  • Save onefoursix/067c218618393ba15e57e20bb877d11e to your computer and use it in GitHub Desktop.
Save onefoursix/067c218618393ba15e57e20bb877d11e to your computer and use it in GitHub Desktop.
SDC Deployment YAML with a runAsUser ID to prevent issue with PodSecurityPolicy "'MustRunAsNonRoot'"
apiVersion: apps/v1
kind: Deployment
metadata:
name: sdc
labels:
app : sdc
spec:
replicas: 1
selector:
matchLabels:
app: sdc
template:
metadata:
labels:
app: sdc
spec:
containers:
- name : sdc
image: streamsets/datacollector:3.22.3
ports:
- containerPort: 18630
env:
- name: SDC_JAVA_OPTS
value: "-Xmx2048m -Xms2048m"
volumeMounts:
- name: sdc-id
mountPath: /data/sdc.id
subPath: sdc.id
- name: sdc-auth-token
mountPath: /etc/sdc/application-token.txt
subPath: application-token.txt
- name: dpm-config
mountPath: /etc/sdc/dpm.properties
subPath: dpm.properties
securityContext:
runAsUser: 20159
volumes:
- name: sdc-id
secret:
secretName: sdc-id
- name: sdc-auth-token
secret:
secretName: sdc-auth-token
- name: dpm-config
configMap:
name: dpm-config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment