You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit adds support for a more concise syntax for TriggerBindings embedded
in a Trigger or EventListener:
NEW SYNTAX:
```
bindings:
- ref: some-name
- name: commit_id # embedded binding
value: "$(body.head_commit_id)
```
OLD SYNTAX
```
bindings:
- name: some-name
spec:
params:
- name: commit_id # embedded binding
value: "$(body.head_commit_id)
```
The old embedded syntax is deprecated and Triggers will convert any old style
embedded bindings to the new syntax via the MutatingAdmissionWebhook.
BREAKING CHANGE: With this change, users cannot specify both `name` and `ref`
for a single binding. Use `ref` to refer to a TriggerBinding resource and
`name` for embedded bindings.
Fixes#617
Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
Copy file name to clipboardexpand all lines: docs/triggers.md
+3-2
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,8 @@ weight: 9
8
8
9
9
A `Trigger` is resource that combines `TriggerTemplate`, `TriggerBindings` and `interceptors`. The `Trigger` is processed by EventListener which referenced it when it receives an incoming.
10
10
11
-
-[Syntax](#syntax)
11
+
-[Triggers](#triggers)
12
+
-[Syntax](#syntax)
12
13
13
14
## Syntax
14
15
@@ -24,7 +25,7 @@ the following fields:
24
25
`Trigger` resource object, for example a `name`.
25
26
-[`spec`][kubernetes-overview] - Specifies the configuration information for
26
27
your Trigger resource object. The spec include:
27
-
-[`bindings`] - A list of `TriggerBindings`reference to use or embedded TriggerBindingsSpecs to use
28
+
-[`bindings`] - (Optional) A list of bindings to use. Can either be a reference to existing `TriggerBinding` resources or embedded name/value pairs.
28
29
-[`template`] - The name of `TriggerTemplate` to use
29
30
-[`interceptors`](./eventlisteners.md#interceptors) - (Optional) list of interceptors to use
30
31
-[`serviceAccountName`] - (Optional) Specifies the ServiceAccount provided to EventListener by Trigger to create resources
0 commit comments