Last active
June 16, 2021 02:50
-
-
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'"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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