diff --git a/scripts/test-env.sh b/scripts/test-env.sh index aa1d839b0..063728c3b 100755 --- a/scripts/test-env.sh +++ b/scripts/test-env.sh @@ -92,5 +92,9 @@ kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd/experimenta echo "INFO: Updating helm dependencies" for i in charts/*; do + if [ "$i" = "charts/kong" ] + then + continue + fi helm dependency update "$i" done diff --git a/scripts/test-run.sh b/scripts/test-run.sh index 2f8dce88a..8720e92a3 100755 --- a/scripts/test-run.sh +++ b/scripts/test-run.sh @@ -27,22 +27,8 @@ TEST_ENV_NAME="${TEST_ENV_NAME:-kong-charts-tests}" KUBECTL="kubectl --context kind-${TEST_ENV_NAME}" KUBERNETES_VERSION="$($KUBECTL version -o json | jq -r '.serverVersion.gitVersion')" -CONTROLLER_PREFIX="" -GATEWAY_PREFIX="" ADDITIONAL_FLAGS=() -# ------------------------------------------------------------------------------ -# Configure per-chart settings -# ------------------------------------------------------------------------------ -if [[ "${CHART_NAME}" == "ingress" ]]; then - CONTROLLER_PREFIX="controller." - GATEWAY_PREFIX="gateway." - # this is intentionally a no-op at present. this originally had a set that was - # made obsolete by a values default change. it's now a placeholder showing an - # example modification - # ADDITIONAL_FLAGS+=("") -fi - # ------------------------------------------------------------------------------ # Deploy Kuma configuration and test namespace # ------------------------------------------------------------------------------ @@ -82,23 +68,23 @@ TAG_MESSAGE="" if [[ "${TAG}" != "default" ]] then TAG_MESSAGE="with controller tag ${TAG} " - ADDITIONAL_FLAGS+=("--set ${CONTROLLER_PREFIX}ingressController.image.tag=${TAG} "); + ADDITIONAL_FLAGS+=("--set ingressController.deployment.pod.container.image.tag=${TAG} "); fi # Configure values for all tests # Enable Gateway API -ADDITIONAL_FLAGS+=("--set ${CONTROLLER_PREFIX}ingressController.env.feature_gates=GatewayAlpha=true") +ADDITIONAL_FLAGS+=("--set ingressController.deployment.pod.container.env.feature_gates=GatewayAlpha=true") # Tests should not show up in reporting -ADDITIONAL_FLAGS+=("--set ${CONTROLLER_PREFIX}ingressController.env.anonymous_reports=false") +ADDITIONAL_FLAGS+=("--set ingressController.deployment.pod.container.env.anonymous_reports=false") if [[ -n "${KONG_VERSION-}" ]] then -ADDITIONAL_FLAGS+=("--set ${GATEWAY_PREFIX}image.tag=${KONG_VERSION}") +ADDITIONAL_FLAGS+=("--set image.tag=${KONG_VERSION}") fi if [[ -n "${KIC_VERSION-}" ]] then -ADDITIONAL_FLAGS+=("--set ${CONTROLLER_PREFIX}ingressController.image.tag=${KIC_VERSION}") +ADDITIONAL_FLAGS+=("--set ingressController.deployment.pod.container.image.tag=${KIC_VERSION}") fi echo "INFO: installing chart as release ${RELEASE_NAME} ${TAG_MESSAGE}to namespace ${RELEASE_NAMESPACE}" diff --git a/scripts/test-upgrade.sh b/scripts/test-upgrade.sh index f69950476..b4b8eb776 100755 --- a/scripts/test-upgrade.sh +++ b/scripts/test-upgrade.sh @@ -27,20 +27,8 @@ TEST_ENV_NAME="${TEST_ENV_NAME:-kong-charts-tests}" KUBECTL="kubectl --context kind-${TEST_ENV_NAME}" KUBERNETES_VERSION="$($KUBECTL version -o json | jq -r '.serverVersion.gitVersion')" -CONTROLLER_PREFIX="" ADDITIONAL_FLAGS=() -# ------------------------------------------------------------------------------ -# Configure per-chart settings -# ------------------------------------------------------------------------------ -if [[ "${CHART_NAME}" == "ingress" ]]; then - CONTROLLER_PREFIX="controller." - # this is intentionally a no-op at present. this originally had a set that was - # made obsolete by a values default change. it's now a placeholder showing an - # example modification - # ADDITIONAL_FLAGS+=("") -fi - # ------------------------------------------------------------------------------ # Deploy Chart - Kubernetes Ingress Controller # ------------------------------------------------------------------------------ @@ -49,7 +37,7 @@ echo "INFO: installing chart as release ${RELEASE_NAME} to namespace ${RELEASE_N set -x # shellcheck disable=SC2048,SC2086 helm install --create-namespace --namespace "${RELEASE_NAMESPACE}" "${RELEASE_NAME}" \ - --set ${CONTROLLER_PREFIX}ingressController.env.anonymous_reports="false" \ + --set ingressController.deployment.pod.container.env.anonymous_reports="false" \ --set deployment.test.enabled=true ${ADDITIONAL_FLAGS[*]} \ "charts/${CHART_NAME}" set +x @@ -68,10 +56,10 @@ echo "INFO: upgrading the helm chart to image tag ${TAG}" set -x # shellcheck disable=SC2048,SC2086 helm upgrade --namespace "${RELEASE_NAMESPACE}" "${RELEASE_NAME}" \ - --set ${CONTROLLER_PREFIX}ingressController.image.tag="${TAG}" \ + --set ingressController.deployment.pod.container.image.tag="${TAG}" \ --set deployment.test.enabled=true ${ADDITIONAL_FLAGS[*]} \ - --set ${CONTROLLER_PREFIX}ingressController.env.anonymous_reports="false" \ - --set ${CONTROLLER_PREFIX}ingressController.image.effectiveSemver="${EFFECTIVE_TAG}" \ + --set ingressController.deployment.pod.container.env.anonymous_reports="false" \ + --set ingressController.deployment.pod.container.image.effectiveSemver="${EFFECTIVE_TAG}" \ "charts/${CHART_NAME}" set +x # ------------------------------------------------------------------------------