From 6f8afd53ea590828fcb99ee26c20f7b8d668c4c5 Mon Sep 17 00:00:00 2001 From: Lukas Berk Date: Thu, 10 Dec 2020 12:29:43 -0500 Subject: [PATCH] Add documentation to sinkbinding modes Update docs/eventing/sources/sinkbinding.md As suggested Co-authored-by: Ashleigh Brennan --- docs/eventing/sources/sinkbinding.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/eventing/sources/sinkbinding.md b/docs/eventing/sources/sinkbinding.md index 27639b53c40..bfd3423c3bc 100644 --- a/docs/eventing/sources/sinkbinding.md +++ b/docs/eventing/sources/sinkbinding.md @@ -18,6 +18,13 @@ For example, `Deployment`, `Job`, `DaemonSet`, or `StatefulSet` objects, or Knat Sink binding injects environment variables into the `PodTemplateSpec` of the event sink, so that the application code does not need to interact directly with the Kubernetes API to locate the event destination. +Sink binding operates in one of two modes; `Inclusion` or `Exclusion`. +You can set the mode by modifying the `SINK_BINDING_SELECTION_MODE` of the `eventing-webhook` deployment accordingly. The mode determines the default scope of the webhook. + +By default, the webhook is set to `exclusion` mode, which means that any namespace that does not have the label `bindings.knative.dev/exclude: true` will be subject to mutation evalutation. + +If `SINK_BINDING_SELECTION_MODE` is set to `inclusion`, only the resources in a namespace labelled with `bindings.knative.dev/include: true` will be considered. In `inclusion` mode, any SinkBinding resource created will automatically label the `subject` namespace with `bindings.knative.dev/include: true` for inclusion in the potential environment variable inclusions. + ## Getting started The following procedures show how you can create a sink binding and connect it to a service and event source in your cluster.