Skip to content

Commit

Permalink
Make helm values, kops patch, and eksctl patch files optional
Browse files Browse the repository at this point in the history
  • Loading branch information
wongma7 committed Jun 9, 2021
1 parent bc52c8f commit 38b0165
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
4 changes: 3 additions & 1 deletion hack/e2e/eksctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
4 changes: 3 additions & 1 deletion hack/e2e/kops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
22 changes: 14 additions & 8 deletions hack/e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 38b0165

Please sign in to comment.