diff --git a/deploy/kubernetes/base/csidriver.yaml b/deploy/kubernetes/base/csidriver.yaml new file mode 100644 index 000000000..9f7fe6063 --- /dev/null +++ b/deploy/kubernetes/base/csidriver.yaml @@ -0,0 +1,8 @@ +--- + +apiVersion: storage.k8s.io/v1beta1 +kind: CSIDriver +metadata: + name: efs.csi.aws.com +spec: + attachRequired: false diff --git a/deploy/kubernetes/base/kustomization.yaml b/deploy/kubernetes/base/kustomization.yaml new file mode 100644 index 000000000..656cdf17c --- /dev/null +++ b/deploy/kubernetes/base/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: kube-system +resources: +- node.yaml +- csidriver.yaml diff --git a/deploy/kubernetes/manifest.yaml b/deploy/kubernetes/base/node.yaml similarity index 94% rename from deploy/kubernetes/manifest.yaml rename to deploy/kubernetes/base/node.yaml index ecdef0ae1..f96b8b6c5 100644 --- a/deploy/kubernetes/manifest.yaml +++ b/deploy/kubernetes/base/node.yaml @@ -26,7 +26,6 @@ spec: securityContext: privileged: true image: amazon/aws-efs-csi-driver:latest - imagePullPolicy: Always args: - --endpoint=$(CSI_ENDPOINT) - --logtostderr @@ -95,11 +94,4 @@ spec: path: /var/lib/kubelet/plugins/efs.csi.aws.com/ type: DirectoryOrCreate ---- -apiVersion: storage.k8s.io/v1beta1 -kind: CSIDriver -metadata: - name: efs.csi.aws.com -spec: - attachRequired: false diff --git a/deploy/kubernetes/overlays/dev/kustomization.yaml b/deploy/kubernetes/overlays/dev/kustomization.yaml new file mode 100644 index 000000000..dd944db3d --- /dev/null +++ b/deploy/kubernetes/overlays/dev/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +bases: +- ../../base +images: +- name: amazon/aws-efs-csi-driver + newTag: latest diff --git a/deploy/kubernetes/overlays/stable/kustomization.yaml b/deploy/kubernetes/overlays/stable/kustomization.yaml new file mode 100644 index 000000000..4f406d882 --- /dev/null +++ b/deploy/kubernetes/overlays/stable/kustomization.yaml @@ -0,0 +1,15 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +bases: +- ../../base +images: +- name: amazon/aws-efs-csi-driver + newName: 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/aws-efs-csi-driver + newTag: v0.2.0 +- name: quay.io/k8scsi/livenessprobe + newName: 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/csi-liveness-probe + newTag: v1.1.0 +- name: quay.io/k8scsi/csi-node-driver-registrar + newName: 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/csi-node-driver-registrar + newTag: v1.1.0 + diff --git a/docs/README.md b/docs/README.md index 658292072..b917eca8e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -56,7 +56,7 @@ The following sections are Kubernetes specific. If you are a Kubernetes user, us Deploy the driver: ```sh -kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/aws-efs-csi-driver/master/deploy/kubernetes/manifest.yaml +kubectl apply -k "github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/dev/?ref=master" ``` ### Examples diff --git a/hack/run-e2e-test b/hack/run-e2e-test index 8ed301eca..59cb3025f 100755 --- a/hack/run-e2e-test +++ b/hack/run-e2e-test @@ -77,8 +77,9 @@ done; echo "Deploying driver" -cat deploy/kubernetes/manifest.yaml | sed s,amazon/aws-efs-csi-driver:.*,$IMAGE_NAME:$IMAGE_TAG, > $TEST_DIR/manifest.yaml -kubectl apply -f $TEST_DIR/manifest.yaml +sed -i'' "s,amazon/aws-efs-csi-driver,$IMAGE_NAME," deploy/kubernetes/overlays/dev/kustomization.yaml +sed -i'' "s,newTag: latest,newTag: $IMAGE_TAG," deploy/kubernetes/overlays/dev/kustomization.yaml +kubectl apply -k deploy/kubernetes/overlays/dev/ echo "Creating EFS file system" aws efs create-file-system --creation-token $TEST_ID --tags Key=KubernetesCluster,Value=$CLUSTER_NAME.k8s.local --region $REGION