Skip to content

Commit

Permalink
Added PSS to contrib/baseline and contrib/restricted as kustomize com…
Browse files Browse the repository at this point in the history
…ponents (#2757)

* Added PSS to contrib/baseline and restricted as kustomize components

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

* Added kustomize PSS components to example

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

* Fixed spelling

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

* Added link to PSS official documentation

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

* Fixed indentation

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

---------

Signed-off-by: biswajit-9776 <biswajitpatt139@gmail.com>
  • Loading branch information
biswajit-9776 committed Jun 24, 2024
1 parent 1b42748 commit 7a7079b
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contrib/security/PSS/static/baseline/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

patches:
- path: patches/kubeflow-labels.yaml
- path: patches/istio-labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: istio-system
labels:
pod-security.kubernetes.io/enforce: baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: kubeflow
labels:
pod-security.kubernetes.io/enforce: baseline
6 changes: 6 additions & 0 deletions contrib/security/PSS/static/restricted/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

patches:
- path: patches/kubeflow-labels.yaml
- path: patches/istio-labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: istio-system
labels:
pod-security.kubernetes.io/enforce: restricted
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: kubeflow
labels:
pod-security.kubernetes.io/enforce: restricted
7 changes: 7 additions & 0 deletions example/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,10 @@ resources:
# KServe
- ../contrib/kserve/kserve
- ../contrib/kserve/models-web-app/overlays/kubeflow

# Pod Security Standards
# https://kubernetes.io/docs/concepts/security/pod-security-standards/
# Uncomment to enable baseline level standards
# - ../contrib/security/PSS/static/baseline
# Uncomment to enable restricted level standards
# - ../contrib/security/PSS/static/restricted

0 comments on commit 7a7079b

Please sign in to comment.