diff --git a/Makefile b/Makefile index 21a3c630bc..f954b94259 100644 --- a/Makefile +++ b/Makefile @@ -175,3 +175,4 @@ generate-kustomize: bin/helm cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/serviceaccount-csi-node.yaml > ../../deploy/kubernetes/base/serviceaccount-csi-node.yaml cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/serviceaccount-snapshot-controller.yaml > ../../deploy/kubernetes/base/serviceaccount-snapshot-controller.yaml cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/snapshot-controller.yaml -f ../../deploy/kubernetes/values/snapshotter.yaml > ../../deploy/kubernetes/base/snapshot_controller.yaml + cd charts/aws-ebs-csi-driver && mkdir -p ../../deploy/kubernetes/cluster && cp crds/snapshot-controller-crds.yaml ../../deploy/kubernetes/cluster/snapshot-controller-crds.yaml diff --git a/deploy/kubernetes/cluster/crd_snapshotter.yaml b/charts/aws-ebs-csi-driver/crds/snapshot-controller-crds.yaml similarity index 100% rename from deploy/kubernetes/cluster/crd_snapshotter.yaml rename to charts/aws-ebs-csi-driver/crds/snapshot-controller-crds.yaml diff --git a/charts/aws-ebs-csi-driver/templates/crds.yml b/charts/aws-ebs-csi-driver/templates/crds.yml new file mode 100644 index 0000000000..ebd5f49e6a --- /dev/null +++ b/charts/aws-ebs-csi-driver/templates/crds.yml @@ -0,0 +1,6 @@ +{{- if and .Values.enableVolumeSnapshot (ne (.Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1") true) }} +{{- range $path, $bytes := .Files.Glob "crds/*.yaml" }} +{{ $.Files.Get $path }} +--- +{{- end }} +{{- end }} diff --git a/hack/e2e/run.sh b/hack/e2e/run.sh index fd1c7fef2f..0be2615506 100755 --- a/hack/e2e/run.sh +++ b/hack/e2e/run.sh @@ -153,12 +153,6 @@ set -x "${HELM_BIN}" "${HELM_ARGS[@]}" set +x -if [[ -r "${EBS_SNAPSHOT_CRD}" ]]; then - loudecho "Deploying snapshot CRD" - kubectl apply -f "$EBS_SNAPSHOT_CRD" \ - --kubeconfig "${KUBECONFIG}" - # TODO deploy snapshot controller too instead of including in helm chart -fi endSec=$(date +'%s') secondUsed=$(((endSec - startSec) / 1)) # Set timeout threshold as 20 seconds for now, usually it takes less than 10s to startup