diff --git a/README.md b/README.md index bd5f91cf..a6aff1ae 100644 --- a/README.md +++ b/README.md @@ -62,20 +62,19 @@ If your Kubernetes distribution does not bundle the snapshot controller, you may There is a new validating webhook server which provides tightened validation on snapshot objects. The cluster admin or Kubernetes distribution admin should install the webhook alongside the snapshot controllers and CRDs. More details [below](#validating-webhook). Install Snapshot CRDs: -* kubectl create -f client/config/crd +* kubectl kustomize client/config/crd | kubectl create -f - * https://github.com/kubernetes-csi/external-snapshotter/tree/master/client/config/crd * Do this once per cluster Install Common Snapshot Controller: * Update the namespace to an appropriate value for your environment (e.g. kube-system) -* kubectl create -f deploy/kubernetes/snapshot-controller -* https://github.com/kubernetes-csi/external-snapshotter/tree/master/deploy/kubernetes/snapshot-controller +* kubectl -n kube-system kustomize deploy/kubernetes/snapshot-controller | kubectl create -f - * Do this once per cluster Install CSI Driver: * Follow instructions provided by your CSI Driver vendor. * Here is an example to install the sample hostpath CSI driver - * kubectl create -f deploy/kubernetes/csi-snapshotter + * kubectl kustomize deploy/kubernetes/csi-snapshotter | kubectl create -f - * https://github.com/kubernetes-csi/external-snapshotter/tree/master/deploy/kubernetes/csi-snapshotter ### Validating Webhook diff --git a/client/config/crd/kustomization.yaml b/client/config/crd/kustomization.yaml new file mode 100644 index 00000000..34af2b73 --- /dev/null +++ b/client/config/crd/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - snapshot.storage.k8s.io_volumesnapshotclasses.yaml + - snapshot.storage.k8s.io_volumesnapshotcontents.yaml + - snapshot.storage.k8s.io_volumesnapshots.yaml diff --git a/deploy/kubernetes/csi-snapshotter/kustomization.yaml b/deploy/kubernetes/csi-snapshotter/kustomization.yaml new file mode 100644 index 00000000..31115c90 --- /dev/null +++ b/deploy/kubernetes/csi-snapshotter/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - rbac-csi-snapshotter.yaml + - rbac-external-provisioner.yaml + - setup-csi-snapshotter.yaml diff --git a/deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml b/deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml index d481bebf..51d4421b 100644 --- a/deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml +++ b/deploy/kubernetes/csi-snapshotter/setup-csi-snapshotter.yaml @@ -120,4 +120,4 @@ spec: mountPath: /csi volumes: - name: socket-dir - emptyDir: + emptyDir: {} diff --git a/deploy/kubernetes/snapshot-controller/kustomization.yaml b/deploy/kubernetes/snapshot-controller/kustomization.yaml new file mode 100644 index 00000000..883ea154 --- /dev/null +++ b/deploy/kubernetes/snapshot-controller/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - rbac-snapshot-controller.yaml + - setup-snapshot-controller.yaml