Skip to content

Commit

Permalink
Added securityContext profiles for deployments failing PSS restricted…
Browse files Browse the repository at this point in the history
… level (#2836)

* Added securityContext for profile-controller deployments

Signed-off-by: biswajit-9776 <biswajitpatt139@gmail.com>

* Fixed PSS warnings for containers kfam and manager

Signed-off-by: biswajit-9776 <biswajitpatt139@gmail.com>

* Added securitycontext profiles to dex and oauth2-proxy deployments

Signed-off-by: biswajit-9776 <biswajitpatt139@gmail.com>

* Added seccompProfile for cluster-local-gateway

Signed-off-by: biswajit-9776 <biswajitpatt139@gmail.com>

* Added securityContext to cronjob

Signed-off-by: biswajit-9776 <biswajitpatt139@gmail.com>

* Added securityContext to pipelines pods

Signed-off-by: biswajit-9776 <biswajitpatt139@gmail.com>

* trigger GitHub actions

Signed-off-by: biswajit-9776 <biswajitpatt139@gmail.com>

* trigger GitHub actions

Signed-off-by: biswajit-9776 <biswajitpatt139@gmail.com>

* Undoing changes to cronjob

Signed-off-by: biswajit-9776 <biswajitpatt139@gmail.com>

---------

Signed-off-by: biswajit-9776 <biswajitpatt139@gmail.com>
  • Loading branch information
biswajit-9776 committed Aug 16, 2024
1 parent fcf861f commit 49d2c9c
Show file tree
Hide file tree
Showing 18 changed files with 302 additions and 0 deletions.
17 changes: 17 additions & 0 deletions contrib/security/PSS/patches/cache-server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: cache-server
spec:
template:
spec:
containers:
- name: server
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL
12 changes: 12 additions & 0 deletions contrib/security/PSS/patches/cluster-local-gateway.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: cluster-local-gateway
spec:
template:
spec:
containers:
- name: istio-proxy
securityContext:
seccompProfile:
type: RuntimeDefault
17 changes: 17 additions & 0 deletions contrib/security/PSS/patches/dex.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: dex
spec:
template:
spec:
containers:
- name: dex
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL
17 changes: 17 additions & 0 deletions contrib/security/PSS/patches/kfam.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: profiles-deployment
spec:
template:
spec:
containers:
- name: kfam
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: kubeflow-pipelines-profile-controller
spec:
template:
spec:
containers:
- name: profile-controller
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL
17 changes: 17 additions & 0 deletions contrib/security/PSS/patches/manager.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: profiles-deployment
spec:
template:
spec:
containers:
- name: manager
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL
17 changes: 17 additions & 0 deletions contrib/security/PSS/patches/metadata-envoy-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: metadata-envoy-deployment
spec:
template:
spec:
containers:
- name: container
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL
17 changes: 17 additions & 0 deletions contrib/security/PSS/patches/metadata-grpc-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: metadata-grpc-deployment
spec:
template:
spec:
containers:
- name: container
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL
17 changes: 17 additions & 0 deletions contrib/security/PSS/patches/metadata-writer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: metadata-writer
spec:
template:
spec:
containers:
- name: main
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL
17 changes: 17 additions & 0 deletions contrib/security/PSS/patches/minio.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: minio
spec:
template:
spec:
containers:
- name: minio
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL
17 changes: 17 additions & 0 deletions contrib/security/PSS/patches/ml-pipeline-persistenceagent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ml-pipeline-persistenceagent
spec:
template:
spec:
containers:
- name: ml-pipeline-persistenceagent
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL
17 changes: 17 additions & 0 deletions contrib/security/PSS/patches/ml-pipeline-scheduledworkflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ml-pipeline-scheduledworkflow
spec:
template:
spec:
containers:
- name: ml-pipeline-scheduledworkflow
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL
17 changes: 17 additions & 0 deletions contrib/security/PSS/patches/ml-pipeline-ui.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ml-pipeline-ui
spec:
template:
spec:
containers:
- name: ml-pipeline-ui
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL
17 changes: 17 additions & 0 deletions contrib/security/PSS/patches/ml-pipeline-viewer-crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ml-pipeline-viewer-crd
spec:
template:
spec:
containers:
- name: ml-pipeline-viewer-crd
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL
17 changes: 17 additions & 0 deletions contrib/security/PSS/patches/ml-pipeline-visualizationserver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ml-pipeline-visualizationserver
spec:
template:
spec:
containers:
- name: ml-pipeline-visualizationserver
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL
17 changes: 17 additions & 0 deletions contrib/security/PSS/patches/ml-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ml-pipeline
spec:
template:
spec:
containers:
- name: ml-pipeline-api-server
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL
17 changes: 17 additions & 0 deletions contrib/security/PSS/patches/mysql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql
spec:
template:
spec:
containers:
- name: mysql
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL
18 changes: 18 additions & 0 deletions contrib/security/PSS/patches/oauth2-proxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: oauth2-proxy
spec:
replicas: 2
template:
spec:
containers:
- name: oauth2-proxy
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
capabilities:
drop:
- ALL

0 comments on commit 49d2c9c

Please sign in to comment.