Skip to content

Commit

Permalink
chore: Add securitycontext for PSS PoC (rootless Kubeflow) (#11462)
Browse files Browse the repository at this point in the history
* Update securitycontext

Signed-off-by: biswassri <srijoni.biswas1994@gmail.com>

Update ml-pipeline-scheduledworkflow-deployment.yaml

Signed-off-by: juliusvonkohout <45896133+juliusvonkohout@users.noreply.github.com>

Update ml-pipeline-persistenceagent-deployment.yaml

Upstreaming off pss patches

Signed-off-by: Julius von Kohout <45896133+juliusvonkohout@users.noreply.github.com>

Updating server,ui,visualization,veiwercrd deployment yaml

Signed-off-by: biswassri <58236793+biswassri@users.noreply.github.com>
Signed-off-by: juliusvonkohout <45896133+juliusvonkohout@users.noreply.github.com>

Updating remaining PSS patches

Signed-off-by: biswassri <srijoni.biswas1994@gmail.com>

* add cache-server

Signed-off-by: juliusvonkohout <45896133+juliusvonkohout@users.noreply.github.com>

---------

Signed-off-by: biswassri <srijoni.biswas1994@gmail.com>
Signed-off-by: juliusvonkohout <45896133+juliusvonkohout@users.noreply.github.com>
  • Loading branch information
juliusvonkohout authored Dec 20, 2024
1 parent 803d7a8 commit f3cb244
Show file tree
Hide file tree
Showing 14 changed files with 126 additions and 0 deletions.
10 changes: 10 additions & 0 deletions manifests/kustomize/base/cache/cache-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ spec:
spec:
containers:
- name: server
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 0
capabilities:
drop:
- ALL
image: gcr.io/ml-pipeline/cache-server:dummy
env:
- name: DEFAULT_CACHE_STALENESS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,13 @@ spec:
containerPort: 9090
- name: envoy-admin
containerPort: 9901
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 0
capabilities:
drop:
- ALL
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ spec:
# * manifests/kustomize/base/metadata/base/metadata-grpc-deployment.yaml
# * test/tag_for_hosted.sh
image: gcr.io/tfx-oss-public/ml_metadata_store_server:1.14.0
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 0
capabilities:
drop:
- ALL
env:
- name: DBCONFIG_USER
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,14 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 0
capabilities:
drop:
- ALL
serviceAccountName: kubeflow-pipelines-metadata-writer
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@ spec:
failureThreshold: 12
periodSeconds: 5
timeoutSeconds: 2
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 0
capabilities:
drop:
- ALL
resources:
requests:
cpu: 250m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ spec:
volumeMounts:
- mountPath: /var/run/secrets/kubeflow/tokens
name: persistenceagent-sa-token
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 0
capabilities:
drop:
- ALL
serviceAccountName: ml-pipeline-persistenceagent
volumes:
- name: persistenceagent-sa-token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,14 @@ spec:
configMapKeyRef:
name: pipeline-install-config
key: cronScheduleTimezone
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 0
capabilities:
drop:
- ALL
serviceAccountName: ml-pipeline-scheduledworkflow
10 changes: 10 additions & 0 deletions manifests/kustomize/base/pipeline/ml-pipeline-ui-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ spec:
- name: config-volume
mountPath: /etc/config
readOnly: true
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 0
capabilities:
drop:
- ALL
env:
- name: VIEWER_TENSORBOARD_POD_TEMPLATE_SPEC_PATH
value: /etc/config/viewer-pod-template.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,14 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 0
capabilities:
drop:
- ALL
serviceAccountName: ml-pipeline-viewer-crd-service-account
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ spec:
initialDelaySeconds: 3
periodSeconds: 5
timeoutSeconds: 2
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 0
capabilities:
drop:
- ALL
resources:
requests:
cpu: 30m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ spec:
- workflow-controller-configmap
- --executor-image
- gcr.io/ml-pipeline/argoexec:v3.4.17-license-compliance
securityContext:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
resources:
requests:
cpu: 100m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ spec:
- --zap-log-level=4
- '--discovery-interval=3600s' # less insane than 10 seconds
securityContext:
seccompProfile:
type: RuntimeDefault
capabilities:
drop:
- ALL
Expand Down
10 changes: 10 additions & 0 deletions manifests/kustomize/third-party/minio/base/minio-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ spec:
name: minio
ports:
- containerPort: 9000
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 0
capabilities:
drop:
- ALL
volumeMounts:
- mountPath: /data
name: data
Expand Down
10 changes: 10 additions & 0 deletions manifests/kustomize/third-party/mysql/base/mysql-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ spec:
ports:
- containerPort: 3306
name: mysql
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 0
capabilities:
drop:
- ALL
volumeMounts:
- mountPath: /var/lib/mysql
name: mysql-persistent-storage
Expand Down

0 comments on commit f3cb244

Please sign in to comment.