From 190a4d7f81b700a2000cd4e5051b5033ab6ba079 Mon Sep 17 00:00:00 2001 From: Al Zargarpur Date: Thu, 5 Mar 2020 13:09:16 -0800 Subject: [PATCH 1/3] Use updated config to specify PubSub channel for Brokers --- config/default-broker-channel.yaml | 23 +++++++++++++++++++ .../install-broker-with-pubsub-channel.md | 8 +++---- .../patch-config-br-defaults-with-pubsub.yaml | 22 ++++++++++++++++++ 3 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 config/default-broker-channel.yaml create mode 100644 docs/install/patch-config-br-defaults-with-pubsub.yaml diff --git a/config/default-broker-channel.yaml b/config/default-broker-channel.yaml new file mode 100644 index 0000000000..ec085f82b7 --- /dev/null +++ b/config/default-broker-channel.yaml @@ -0,0 +1,23 @@ +# 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: cloud-run-events +data: + channelTemplateSpec: | + apiVersion: messaging.cloud.google.com/v1alpha1 + kind: Channel diff --git a/docs/install/install-broker-with-pubsub-channel.md b/docs/install/install-broker-with-pubsub-channel.md index fe4ba2a3e8..e60143c98c 100644 --- a/docs/install/install-broker-with-pubsub-channel.md +++ b/docs/install/install-broker-with-pubsub-channel.md @@ -17,12 +17,12 @@ Channel. 1. Patch the configmap in the `knative-eventing` namespace to use the Pub/Sub `Channel` as the - [default channel](https://knative.dev/docs/eventing/channels/default-channels/) - with - [patch-default-ch-config-with-pubsub.yaml](./patch-default-ch-config-with-pubsub.yaml). + [default channel](https://knative.dev/docs/eventing/channel-based-broker/) + for Brokers with + [patch-config-br-defaults-with-pubsub.yaml](./patch-config-br-defaults-with-pubsub.yaml). ```shell - kubectl patch configmap default-ch-webhook -n knative-eventing --patch "$(cat patch-default-ch-config-with-pubsub.yaml)" + kubectl patch configmap config-br-defaults -n knative-eventing --patch "$(cat patch-config-br-defaults-with-pubsub.yaml)" ``` 1. Add the `knative-eventing-injection` label to your namespace with the diff --git a/docs/install/patch-config-br-defaults-with-pubsub.yaml b/docs/install/patch-config-br-defaults-with-pubsub.yaml new file mode 100644 index 0000000000..4ff3ce3fa8 --- /dev/null +++ b/docs/install/patch-config-br-defaults-with-pubsub.yaml @@ -0,0 +1,22 @@ +# Copyright 2020 Google LLC +# +# 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 +# +# http://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. + +data: + # Configuration for defaulting channels that do not specify CRD implementations. + default-br-config: | + clusterDefault: + apiVersion: v1 + kind: ConfigMap + name: config-br-default-channel + namespace: cloud-run-events \ No newline at end of file From 21f00996ce47619ae498afbb6da75e483948a9d6 Mon Sep 17 00:00:00 2001 From: Al Zargarpur Date: Fri, 6 Mar 2020 08:59:26 -0800 Subject: [PATCH 2/3] Move & Rename & Symlink & Newline --- config/400-config-br-default-channel.yaml | 1 + .../configmaps/config-br-default-channel.yaml} | 0 docs/install/patch-config-br-defaults-with-pubsub.yaml | 2 +- 3 files changed, 2 insertions(+), 1 deletion(-) create mode 120000 config/400-config-br-default-channel.yaml rename config/{default-broker-channel.yaml => core/configmaps/config-br-default-channel.yaml} (100%) diff --git a/config/400-config-br-default-channel.yaml b/config/400-config-br-default-channel.yaml new file mode 120000 index 0000000000..533c2de070 --- /dev/null +++ b/config/400-config-br-default-channel.yaml @@ -0,0 +1 @@ +config/core/configmaps/config-br-default-channel.yaml \ No newline at end of file diff --git a/config/default-broker-channel.yaml b/config/core/configmaps/config-br-default-channel.yaml similarity index 100% rename from config/default-broker-channel.yaml rename to config/core/configmaps/config-br-default-channel.yaml diff --git a/docs/install/patch-config-br-defaults-with-pubsub.yaml b/docs/install/patch-config-br-defaults-with-pubsub.yaml index 4ff3ce3fa8..c4ef34945f 100644 --- a/docs/install/patch-config-br-defaults-with-pubsub.yaml +++ b/docs/install/patch-config-br-defaults-with-pubsub.yaml @@ -19,4 +19,4 @@ data: apiVersion: v1 kind: ConfigMap name: config-br-default-channel - namespace: cloud-run-events \ No newline at end of file + namespace: cloud-run-events From 0e538e96923188ff2dc037b37db1111e6067eea3 Mon Sep 17 00:00:00 2001 From: Al Zargarpur Date: Fri, 6 Mar 2020 09:01:44 -0800 Subject: [PATCH 3/3] Move Symlink inside config/ --- config/400-config-br-default-channel.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/400-config-br-default-channel.yaml b/config/400-config-br-default-channel.yaml index 533c2de070..3950ef9ec2 120000 --- a/config/400-config-br-default-channel.yaml +++ b/config/400-config-br-default-channel.yaml @@ -1 +1 @@ -config/core/configmaps/config-br-default-channel.yaml \ No newline at end of file +core/configmaps/config-br-default-channel.yaml \ No newline at end of file