Navigation Menu

Skip to content

Commit

Permalink
install pd-csi driver by default at kube-up
Browse files Browse the repository at this point in the history
  • Loading branch information
leiyiz committed Oct 5, 2021
1 parent 58c8786 commit 1f10cae
Show file tree
Hide file tree
Showing 12 changed files with 956 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cluster/addons/pdcsi-driver/README.md
@@ -0,0 +1,5 @@
## generate configurations
configurations in this folder is generated by the `stable-master` overlay from [pd-csi repo](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/tree/master/deploy/kubernetes/overlays/stable-master).

## maintenance
every time the container image versions from the stable-master is bumped, the corresponding versions in this folder should be changed accordingly. specifically, `pd-csi.yaml` contains specification for driver running on nodes while containers running in `pdcsi-controller` can be found in `pdcsi-controller.yaml` under [k/k/cluster/gce/manifests/](https://github.com/kubernetes/kubernetes/tree/master/cluster/gce/manifests)
74 changes: 74 additions & 0 deletions cluster/addons/pdcsi-driver/pd-csi-psp.yaml
@@ -0,0 +1,74 @@
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: csi-gce-pd-controller-psp
labels:
addonmanager.kubernetes.io/mode: Reconcile
spec:
fsGroup:
rule: RunAsAny
hostNetwork: true
runAsUser:
rule: RunAsAny
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes:
- emptyDir
- secret
---
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: csi-gce-pd-node-psp
labels:
addonmanager.kubernetes.io/mode: Reconcile
spec:
allowedHostPaths:
- pathPrefix: /var/lib/kubelet/plugins_registry/
- pathPrefix: /var/lib/kubelet
- pathPrefix: /var/lib/kubelet/plugins/pd.csi.storage.gke.io/
- pathPrefix: /dev
- pathPrefix: /etc/udev
- pathPrefix: /lib/udev
- pathPrefix: /run/udev
- pathPrefix: /sys
fsGroup:
rule: RunAsAny
hostNetwork: true
privileged: true
runAsUser:
rule: RunAsAny
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes:
- '*'
---
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: csi-gce-pd-node-psp-win
labels:
addonmanager.kubernetes.io/mode: Reconcile
spec:
allowedHostPaths:
- pathPrefix: \var\lib\kubelet
- pathPrefix: \var\lib\kubelet\plugins_registry
- pathPrefix: \var\lib\kubelet\plugins\pd.csi.storage.gke.io
- pathPrefix: \\.\pipe\csi-proxy-disk-v1beta1
- pathPrefix: \\.\pipe\csi-proxy-volume-v1beta1
- pathPrefix: \\.\pipe\csi-proxy-filesystem-v1beta1
fsGroup:
rule: RunAsAny
hostNetwork: true
runAsUser:
rule: RunAsAny
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes:
- '*'

0 comments on commit 1f10cae

Please sign in to comment.