From 29b6e3d48c731c450c75e3c0993ee6e50fb5be30 Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Wed, 8 Apr 2020 10:06:47 +0200 Subject: [PATCH 1/3] Remove duplicated default configmaps, and stash them in core Signed-off-by: Matthias Wessendorf --- ...aml => 400-config-br-default-channel.yaml} | 0 config/400-config-br-defaults.yaml | 29 ++++++++++++++++++- .../400-config-br-default-channel.yaml | 1 - .../400-config-br-defaults.yaml | 1 - .../configmaps/default-broker.yaml | 28 ------------------ .../400-config-br-default-channel.yaml | 1 - .../400-config-br-defaults.yaml | 1 - .../configmaps/default-broker.yaml | 28 ------------------ .../configmaps/default-imc.yaml | 23 --------------- 9 files changed, 28 insertions(+), 84 deletions(-) rename config/{brokers/channel-broker/configmaps/default-imc.yaml => 400-config-br-default-channel.yaml} (100%) mode change 120000 => 100644 config/400-config-br-defaults.yaml delete mode 120000 config/brokers/channel-broker/400-config-br-default-channel.yaml delete mode 120000 config/brokers/channel-broker/400-config-br-defaults.yaml delete mode 100644 config/brokers/channel-broker/configmaps/default-broker.yaml delete mode 120000 config/brokers/mt-channel-broker/400-config-br-default-channel.yaml delete mode 120000 config/brokers/mt-channel-broker/400-config-br-defaults.yaml delete mode 100644 config/brokers/mt-channel-broker/configmaps/default-broker.yaml delete mode 100644 config/brokers/mt-channel-broker/configmaps/default-imc.yaml diff --git a/config/brokers/channel-broker/configmaps/default-imc.yaml b/config/400-config-br-default-channel.yaml similarity index 100% rename from config/brokers/channel-broker/configmaps/default-imc.yaml rename to config/400-config-br-default-channel.yaml diff --git a/config/400-config-br-defaults.yaml b/config/400-config-br-defaults.yaml deleted file mode 120000 index f85262644b9..00000000000 --- a/config/400-config-br-defaults.yaml +++ /dev/null @@ -1 +0,0 @@ -brokers/channel-broker/configmaps/default-broker.yaml \ No newline at end of file diff --git a/config/400-config-br-defaults.yaml b/config/400-config-br-defaults.yaml new file mode 100644 index 00000000000..fb30122d119 --- /dev/null +++ b/config/400-config-br-defaults.yaml @@ -0,0 +1,28 @@ +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-br-defaults + namespace: knative-eventing +data: + # Configuration for defaulting channels that do not specify CRD implementations. + default-br-config: | + clusterDefault: + brokerClass: ChannelBasedBroker + apiVersion: v1 + kind: ConfigMap + name: config-br-default-channel + namespace: knative-eventing diff --git a/config/brokers/channel-broker/400-config-br-default-channel.yaml b/config/brokers/channel-broker/400-config-br-default-channel.yaml deleted file mode 120000 index a8c0c16d9dd..00000000000 --- a/config/brokers/channel-broker/400-config-br-default-channel.yaml +++ /dev/null @@ -1 +0,0 @@ -configmaps/default-imc.yaml \ No newline at end of file diff --git a/config/brokers/channel-broker/400-config-br-defaults.yaml b/config/brokers/channel-broker/400-config-br-defaults.yaml deleted file mode 120000 index 9c79342f941..00000000000 --- a/config/brokers/channel-broker/400-config-br-defaults.yaml +++ /dev/null @@ -1 +0,0 @@ -configmaps/default-broker.yaml \ No newline at end of file diff --git a/config/brokers/channel-broker/configmaps/default-broker.yaml b/config/brokers/channel-broker/configmaps/default-broker.yaml deleted file mode 100644 index fb30122d119..00000000000 --- a/config/brokers/channel-broker/configmaps/default-broker.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2020 The Knative Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-br-defaults - namespace: knative-eventing -data: - # Configuration for defaulting channels that do not specify CRD implementations. - default-br-config: | - clusterDefault: - brokerClass: ChannelBasedBroker - apiVersion: v1 - kind: ConfigMap - name: config-br-default-channel - namespace: knative-eventing diff --git a/config/brokers/mt-channel-broker/400-config-br-default-channel.yaml b/config/brokers/mt-channel-broker/400-config-br-default-channel.yaml deleted file mode 120000 index a8c0c16d9dd..00000000000 --- a/config/brokers/mt-channel-broker/400-config-br-default-channel.yaml +++ /dev/null @@ -1 +0,0 @@ -configmaps/default-imc.yaml \ No newline at end of file diff --git a/config/brokers/mt-channel-broker/400-config-br-defaults.yaml b/config/brokers/mt-channel-broker/400-config-br-defaults.yaml deleted file mode 120000 index 9c79342f941..00000000000 --- a/config/brokers/mt-channel-broker/400-config-br-defaults.yaml +++ /dev/null @@ -1 +0,0 @@ -configmaps/default-broker.yaml \ No newline at end of file diff --git a/config/brokers/mt-channel-broker/configmaps/default-broker.yaml b/config/brokers/mt-channel-broker/configmaps/default-broker.yaml deleted file mode 100644 index a655b8a6374..00000000000 --- a/config/brokers/mt-channel-broker/configmaps/default-broker.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2020 The Knative Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-br-defaults - namespace: knative-eventing -data: - # Configuration for defaulting channels that do not specify CRD implementations. - default-br-config: | - clusterDefault: - brokerClass: MTChannelBasedBroker - apiVersion: v1 - kind: ConfigMap - name: config-br-default-channel - namespace: knative-eventing diff --git a/config/brokers/mt-channel-broker/configmaps/default-imc.yaml b/config/brokers/mt-channel-broker/configmaps/default-imc.yaml deleted file mode 100644 index 2ea55278937..00000000000 --- a/config/brokers/mt-channel-broker/configmaps/default-imc.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2020 The Knative Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-br-default-channel - namespace: knative-eventing -data: - channelTemplateSpec: | - apiVersion: messaging.knative.dev/v1alpha1 - kind: InMemoryChannel From 2c1c5c2e2e7cbb36a716e6fca8802f71704775ff Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Wed, 8 Apr 2020 12:59:03 +0200 Subject: [PATCH 2/3] adding config to swap the defaults in the test run Signed-off-by: Matthias Wessendorf --- test/config/mt-channel-broker.yaml | 28 ++++++++++++++++++++++++++++ test/e2e-common.sh | 3 +++ 2 files changed, 31 insertions(+) create mode 100644 test/config/mt-channel-broker.yaml diff --git a/test/config/mt-channel-broker.yaml b/test/config/mt-channel-broker.yaml new file mode 100644 index 00000000000..a655b8a6374 --- /dev/null +++ b/test/config/mt-channel-broker.yaml @@ -0,0 +1,28 @@ +# Copyright 2020 The Knative Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-br-defaults + namespace: knative-eventing +data: + # Configuration for defaulting channels that do not specify CRD implementations. + default-br-config: | + clusterDefault: + brokerClass: MTChannelBasedBroker + apiVersion: v1 + kind: ConfigMap + name: config-br-default-channel + namespace: knative-eventing diff --git a/test/e2e-common.sh b/test/e2e-common.sh index 435af1110c7..105cbb1502f 100755 --- a/test/e2e-common.sh +++ b/test/e2e-common.sh @@ -35,6 +35,8 @@ readonly IN_MEMORY_CHANNEL_CRD_CONFIG_DIR="config/channels/in-memory-channel" # MT Channel Based Broker config. readonly MT_CHANNEL_BASED_BROKER_CONFIG_DIR="config/brokers/mt-channel-broker" +# MT Channel Based Broker config. +readonly MT_CHANNEL_BASED_BROKER_DEFAULT_CONFIG="test/config/mt-channel-broker.yaml" # Channel Based Broker Controller. readonly CHANNEL_BASED_BROKER_CONTROLLER="config/brokers/channel-broker" @@ -60,6 +62,7 @@ function install_broker() { } function install_mt_broker() { + ko apply --strict -f ${MT_CHANNEL_BASED_BROKER_DEFAULT_CONFIG} || return 1 ko apply --strict -f ${MT_CHANNEL_BASED_BROKER_CONFIG_DIR} || return 1 wait_until_pods_running knative-eventing || fail_test "Knative Eventing with MT Broker did not come up" } From bce59ecb35a711de62e55c9742789948846cca98 Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Wed, 8 Apr 2020 20:55:18 +0200 Subject: [PATCH 3/3] Comment from @aliok on assembling now just one release Signed-off-by: Matthias Wessendorf --- hack/release.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hack/release.sh b/hack/release.sh index e31bf9a5075..82d5618cfd4 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -33,8 +33,7 @@ readonly COMPONENTS declare -A RELEASES RELEASES=( - ["eventing.yaml"]="eventing-core.yaml channel-broker.yaml in-memory-channel.yaml" - ["eventing-mt.yaml"]="eventing-core.yaml mt-channel-broker.yaml in-memory-channel.yaml" + ["eventing.yaml"]="eventing-core.yaml channel-broker.yaml mt-channel-broker.yaml in-memory-channel.yaml" ) readonly RELEASES