Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
calico-host-protection: add psp rule
Browse files Browse the repository at this point in the history
Calico host endpoint controller only needs to talk to the apiserver and
should not be granted privileged PSP.

Update deprecated apiVersion for clusterrole and clusterrolebinding.
closes: #287
Signed-off-by: knrt10 <kautilya@kinvolk.io>
  • Loading branch information
knrt10 committed Dec 18, 2020
1 parent 96a0488 commit f6518da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:

---
# rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: calico-hostendpoint-controller-role
Expand All @@ -61,8 +61,12 @@ rules:
- delete
# To use kubectl apply on resources that already exist
- patch
- apiGroups: ["policy"]
resources: ["podsecuritypolicies"]
verbs: ["use"]
resourceNames: ["zz-minimal"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: calico-hostendpoint-controller-role-binding
Expand Down
4 changes: 2 additions & 2 deletions pkg/assets/generated_assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f6518da

Please sign in to comment.