From d8b0f383a32b6fc352bb0e4f0d7e7b2e84a81f65 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 25 Aug 2020 17:26:44 +0300 Subject: [PATCH 1/3] Use preinstall 0.18 in tests --- test/e2e-common.sh | 16 ++++++++-------- test/e2e-upgrade-tests.sh | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/e2e-common.sh b/test/e2e-common.sh index 17e9c0e686b..c452c1f44d2 100755 --- a/test/e2e-common.sh +++ b/test/e2e-common.sh @@ -47,8 +47,8 @@ readonly SUGAR_CONTROLLER_CONFIG="config/sugar/500-controller.yaml" # Config tracing config. readonly CONFIG_TRACING_CONFIG="test/config/config-tracing.yaml" -# PreInstall script for v0.16 -readonly PRE_INSTALL_V016="config/pre-install/v0.16.0" +# PreInstall script for v0.18 +readonly PRE_INSTALL_V018="config/pre-install/v0.18.0" # The number of controlplane replicas to run. readonly REPLICAS=3 @@ -176,12 +176,12 @@ function install_latest_release() { fail_test "Knative latest release installation failed" } -function run_preinstall_V016() { - local TMP_PRE_INSTALL_V016=${TMP_DIR}/pre_install - mkdir -p ${TMP_PRE_INSTALL_V016} - cp -r ${PRE_INSTALL_V016}/* ${TMP_PRE_INSTALL_V016} - find ${TMP_PRE_INSTALL_V016} -type f -name "*.yaml" -exec sed -i "s/namespace: ${KNATIVE_DEFAULT_NAMESPACE}/namespace: ${TEST_EVENTING_NAMESPACE}/g" {} + - ko apply --strict -f "${TMP_PRE_INSTALL_V016}" || return 1 +function run_preinstall_V018() { + local TMP_PRE_INSTALL_V018=${TMP_DIR}/pre_install + mkdir -p ${TMP_PRE_INSTALL_V018} + cp -r ${PRE_INSTALL_V018}/* ${TMP_PRE_INSTALL_V018} + find ${TMP_PRE_INSTALL_V018} -type f -name "*.yaml" -exec sed -i "s/namespace: ${KNATIVE_DEFAULT_NAMESPACE}/namespace: ${TEST_EVENTING_NAMESPACE}/g" {} + + ko apply --strict -f "${TMP_PRE_INSTALL_V018}" || return 1 wait_until_batch_job_complete ${TEST_EVENTING_NAMESPACE} || return 1 } diff --git a/test/e2e-upgrade-tests.sh b/test/e2e-upgrade-tests.sh index d415fe7ce43..abf94eeeade 100755 --- a/test/e2e-upgrade-tests.sh +++ b/test/e2e-upgrade-tests.sh @@ -58,7 +58,7 @@ echo "Prober PID is ${PROBER_PID}" wait_for_file ${PROBER_READY_FILE} || fail_test header "Performing upgrade to HEAD" -run_preinstall_V016 || fail_test 'Running preinstall 0.16 failed' +run_preinstall_V018 || fail_test 'Running preinstall 0.18 failed' install_head || fail_test 'Installing HEAD version of eventing failed' install_channel_crds || fail_test 'Installing HEAD channel CRDs failed' install_mt_broker || fail_test 'Installing HEAD Broker failed' From db9879e141cd5503770984e0853a2c4475233882 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Wed, 26 Aug 2020 17:39:08 +0300 Subject: [PATCH 2/3] Fix apiGroup for containersource --- config/pre-install/v0.18.0/storage-version-migration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/pre-install/v0.18.0/storage-version-migration.yaml b/config/pre-install/v0.18.0/storage-version-migration.yaml index 29eed16f74c..208d03dc49e 100644 --- a/config/pre-install/v0.18.0/storage-version-migration.yaml +++ b/config/pre-install/v0.18.0/storage-version-migration.yaml @@ -38,7 +38,7 @@ spec: # and substituted here. image: ko://knative.dev/eventing/vendor/knative.dev/pkg/apiextensions/storageversion/cmd/migrate args: - - "containersources.eventing.knative.dev" + - "containersources.sources.knative.dev" - "sinkbindings.sources.knative.dev" - "brokers.sources.knative.dev" - "triggers.sources.knative.dev" From b6d8ecca3a8fb28b08519ee5ee7f7e23d21333f9 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Thu, 27 Aug 2020 10:49:35 +0300 Subject: [PATCH 3/3] Fix wrong apiGroup for broker and trigger for migration --- config/pre-install/v0.18.0/storage-version-migration.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/pre-install/v0.18.0/storage-version-migration.yaml b/config/pre-install/v0.18.0/storage-version-migration.yaml index 208d03dc49e..78fad2e8311 100644 --- a/config/pre-install/v0.18.0/storage-version-migration.yaml +++ b/config/pre-install/v0.18.0/storage-version-migration.yaml @@ -40,7 +40,7 @@ spec: args: - "containersources.sources.knative.dev" - "sinkbindings.sources.knative.dev" - - "brokers.sources.knative.dev" - - "triggers.sources.knative.dev" + - "brokers.eventing.knative.dev" + - "triggers.eventing.knative.dev" - "channels.messaging.knative.dev" - "inmemorychannels.messaging.knative.dev"