diff --git a/hack/e2e/eksctl.sh b/hack/e2e/eksctl.sh index 18beff750d..e069ec9cd8 100644 --- a/hack/e2e/eksctl.sh +++ b/hack/e2e/eksctl.sh @@ -43,7 +43,9 @@ function eksctl_create_cluster() { --dry-run \ "${CLUSTER_NAME}" > "${CLUSTER_FILE}" - eksctl_patch_cluster_file "$CLUSTER_FILE" "$EKSCTL_PATCH_FILE" + if test -f "$EKSCTL_PATCH_FILE"; then + eksctl_patch_cluster_file "$CLUSTER_FILE" "$EKSCTL_PATCH_FILE" + fi loudecho "Creating cluster $CLUSTER_NAME with $CLUSTER_FILE" ${BIN} create cluster -f "${CLUSTER_FILE}" --kubeconfig "${KUBECONFIG}" diff --git a/hack/e2e/kops.sh b/hack/e2e/kops.sh index 06fb856a31..f7fcb487a4 100644 --- a/hack/e2e/kops.sh +++ b/hack/e2e/kops.sh @@ -46,7 +46,9 @@ function kops_create_cluster() { -o json \ "${CLUSTER_NAME}" > "${CLUSTER_FILE}" - kops_patch_cluster_file "$CLUSTER_FILE" "$KOPS_PATCH_FILE" + if test -f "$KOPS_PATCH_FILE"; then + kops_patch_cluster_file "$CLUSTER_FILE" "$KOPS_PATCH_FILE" + fi loudecho "Creating cluster $CLUSTER_NAME with $CLUSTER_FILE" ${BIN} create --state "${KOPS_STATE_FILE}" -f "${CLUSTER_FILE}" diff --git a/hack/e2e/run.sh b/hack/e2e/run.sh index 4507e6451e..fd1c7fef2f 100755 --- a/hack/e2e/run.sh +++ b/hack/e2e/run.sh @@ -138,14 +138,20 @@ fi loudecho "Deploying driver" startSec=$(date +'%s') -"${HELM_BIN}" upgrade --install "${DRIVER_NAME}" \ - --namespace kube-system \ - --set image.repository="${IMAGE_NAME}" \ - --set image.tag="${IMAGE_TAG}" \ - -f "${HELM_VALUES_FILE}" \ - --wait \ - --kubeconfig "${KUBECONFIG}" \ - ./charts/"${DRIVER_NAME}" + +HELM_ARGS=(upgrade --install "${DRIVER_NAME}" + --namespace kube-system + --set image.repository="${IMAGE_NAME}" + --set image.tag="${IMAGE_TAG}" + --wait + --kubeconfig "${KUBECONFIG}" + ./charts/"${DRIVER_NAME}") +if test -f "$HELM_VALUES_FILE"; then + HELM_ARGS+=(-f "${HELM_VALUES_FILE}") +fi +set -x +"${HELM_BIN}" "${HELM_ARGS[@]}" +set +x if [[ -r "${EBS_SNAPSHOT_CRD}" ]]; then loudecho "Deploying snapshot CRD"