Skip to content

Commit

Permalink
[Deprecated] PodSecurityPolicy
Browse files Browse the repository at this point in the history
This commit removes the deprecated PodSeucrityPolicy and add
PodSecurityAdmission(PSA) restricted label with respective policies
enforced by PSP but not covered by the restricted standard of PSA.
  • Loading branch information
JeromeJu committed Sep 23, 2022
1 parent 826d8a0 commit 6a4c46c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 69 deletions.
1 change: 1 addition & 0 deletions config/100-namespace/100-namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ metadata:
labels:
app.kubernetes.io/instance: default
app.kubernetes.io/part-of: tekton-pipelines
pod-security.kubernetes.io/enforce: restricted
57 changes: 0 additions & 57 deletions config/101-podsecuritypolicy.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions config/200-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ rules:
# When there are changes to the configs or secrets, knative updates the validatingwebhook config
# with the updated certificates or the refreshed set of rules.
verbs: ["get", "update", "delete"]
- apiGroups: ["policy"]
resources: ["podsecuritypolicies"]
resourceNames: ["tekton-pipelines"]
verbs: ["use"]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get"]
Expand Down
8 changes: 0 additions & 8 deletions config/200-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ rules:
resources: ["configmaps"]
verbs: ["get"]
resourceNames: ["config-logging", "config-observability", "config-artifact-bucket", "config-artifact-pvc", "feature-flags", "config-leader-election", "config-registry-cert"]
- apiGroups: ["policy"]
resources: ["podsecuritypolicies"]
resourceNames: ["tekton-pipelines"]
verbs: ["use"]
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
Expand Down Expand Up @@ -63,10 +59,6 @@ rules:
resources: ["secrets"]
verbs: ["get", "update"]
resourceNames: ["webhook-certs"]
- apiGroups: ["policy"]
resources: ["podsecuritypolicies"]
resourceNames: ["tekton-pipelines"]
verbs: ["use"]
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
4 changes: 4 additions & 0 deletions config/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ spec:
- name: config-registry-cert
configMap:
name: config-registry-cert
securityContext:
seLinuxOptions:
role: "RunAsUser"
runAsNonRoot: true
---
apiVersion: v1
kind: Service
Expand Down
4 changes: 4 additions & 0 deletions config/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ spec:
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
securityContext:
seLinuxOptions:
role: "RunAsUser"
runAsNonRoot: true
---
apiVersion: v1
kind: Service
Expand Down

0 comments on commit 6a4c46c

Please sign in to comment.