-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add windows driver installation support
This PR adds windows driver support. It adds a windows base dir to install base yaml files. It also adds a windows alpha kustomization file. To install driver for windows, first set env GCE_PD_DRIVER_VERSION=windows/alpha and run deploy/kubernetes/deploy-driver-win.sh script.
- Loading branch information
Showing
4 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
deploy/kubernetes/overlays/windows/alpha/disableHostNetwork.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
kind: DaemonSet | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: csi-gce-pd-node | ||
spec: | ||
template: | ||
spec: | ||
hostNetwork: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
kind: DaemonSet | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: csi-gce-pd-node | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- securityContext: | ||
$patch: delete | ||
name: gce-pd-driver | ||
image: gke.gcr.io/gcp-compute-persistent-disk-csi-driver-win | ||
volumeMounts: | ||
- name: kubelet-dir | ||
mountPath: C:\var\lib\kubelet | ||
mountPropagation: "None" | ||
- name: plugin-dir | ||
mountPath: C:\csi | ||
- name: csi-proxy-disk-pipe | ||
mountPath: \\.\pipe\csi-proxy-disk-v1alpha1 | ||
- name: csi-proxy-volume-pipe | ||
mountPath: \\.\pipe\csi-proxy-volume-v1alpha1 | ||
- name: csi-proxy-filesystem-pipe | ||
mountPath: \\.\pipe\csi-proxy-filesystem-v1alpha1 | ||
- name: kubelet-dir | ||
mountPath: /var/lib/kubelet | ||
mountPropagation: "Bidirectional" | ||
$patch: delete | ||
- name: plugin-dir | ||
mountPath: /csi | ||
$patch: delete | ||
- name: device-dir | ||
mountPath: /dev | ||
$patch: delete | ||
- name: udev-rules-etc | ||
mountPath: /etc/udev | ||
$patch: delete | ||
- name: udev-rules-lib | ||
mountPath: /lib/udev | ||
$patch: delete | ||
- name: udev-socket | ||
mountPath: /run/udev | ||
$patch: delete | ||
- name: sys | ||
mountPath: /sys | ||
$patch: delete | ||
nodeSelector: | ||
kubernetes.io/os: windows | ||
volumes: | ||
- name: csi-proxy-disk-pipe | ||
hostPath: | ||
path: \\.\pipe\csi-proxy-disk-v1alpha1 | ||
type: "" | ||
- name: csi-proxy-volume-pipe | ||
hostPath: | ||
path: \\.\pipe\csi-proxy-volume-v1alpha1 | ||
type: "" | ||
- name: csi-proxy-filesystem-pipe | ||
hostPath: | ||
path: \\.\pipe\csi-proxy-filesystem-v1alpha1 | ||
type: "" | ||
- name: registration-dir | ||
hostPath: | ||
path: C:\var\lib\kubelet\plugins_registry\ | ||
- name: kubelet-dir | ||
hostPath: | ||
path: C:\var\lib\kubelet\ | ||
- name: plugin-dir | ||
hostPath: | ||
path: C:\var\lib\kubelet\plugins\pd.csi.storage.gke.io\ | ||
- $patch: delete | ||
name: device-dir | ||
# The following mounts are required to trigger host udevadm from | ||
# container | ||
- $patch: delete | ||
name: udev-rules-etc | ||
- name: udev-rules-lib | ||
$patch: delete | ||
- name: udev-socket | ||
$patch: delete | ||
- name: sys | ||
$patch: delete |
34 changes: 34 additions & 0 deletions
34
deploy/kubernetes/overlays/windows/alpha/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
bases: | ||
- ../../../base | ||
patchesStrategicMerge: | ||
- disableHostNetwork.yaml | ||
- gcepd.yaml | ||
- noderegistrar.yaml | ||
images: | ||
- name: gke.gcr.io/gcp-compute-persistent-disk-csi-driver | ||
# Don't change stable image without changing pdImagePlaceholder in | ||
# test/k8s-integration/main.go | ||
newName: gke.gcr.io/gcp-compute-persistent-disk-csi-driver | ||
newTag: "v0.7.0-gke.0" | ||
- name: gke.gcr.io/gcp-compute-persistent-disk-csi-driver-win | ||
# Temporarly set to the private repo. Will swtich to public one | ||
# once it is available. | ||
newName: gcr.io/jing-k8s-dev/gce-pd-windows-2019 | ||
newTag: "0.2.0" | ||
- name: gke.gcr.io/csi-provisioner | ||
newName: gke.gcr.io/csi-provisioner | ||
newTag: "v1.5.0-gke.0" | ||
- name: gke.gcr.io/csi-attacher | ||
newName: gke.gcr.io/csi-attacher | ||
newTag: "v2.1.1-gke.0" | ||
- name: gke.gcr.io/csi-node-driver-registrar | ||
newName: gcr.io/k8s-staging-csi/csi-node-driver-registrar | ||
newTag: "amd64-windows-v20200428-v1.3.0-26-g510710d5" | ||
- name: gke.gcr.io/csi-resizer | ||
newName: gke.gcr.io/csi-resizer | ||
newTag: "v0.4.0-gke.0" | ||
- name: gke.gcr.io/csi-snapshotter | ||
newName: gke.gcr.io/csi-snapshotter | ||
newTag: "v2.1.1-gke.0" |
17 changes: 17 additions & 0 deletions
17
deploy/kubernetes/overlays/windows/alpha/noderegistrar.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
kind: DaemonSet | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: csi-gce-pd-node | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: csi-driver-registrar | ||
args: | ||
- --v=5 | ||
- --csi-address=unix://C:\\csi\\csi.sock | ||
- --kubelet-registration-path=C:\\var\\lib\\kubelet\\plugins\\pd.csi.storage.gke.io\\csi.sock | ||
lifecycle: | ||
preStop: | ||
exec: | ||
command: ["cmd", "/c", "del C:\\registration\\pd.csi.storage.gke.io-reg.sock"] |