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
streams kubernetes objects for one or more configured watches
4
4
5
5
**Examples**
6
+
6
7
```yaml
7
8
input:
8
9
type: kubernetes
@@ -34,61 +35,144 @@ input:
34
35
owns:
35
36
- version: v1
36
37
kind: Pod
38
+
result:
39
+
requeue: meta().exists("requeue")
40
+
requeue_after: ${!meta("requeue_after).or("")}
37
41
```
38
42
39
43
## Fields
40
44
41
-
`group`
45
+
### `result`
46
+
47
+
Customize the result of a reconciliation request via [synchronous responses](https://www.benthos.dev/docs/guides/sync_responses).
48
+
49
+
Type: `object`
42
50
43
-
resource group
51
+
### `result.requeue`
52
+
53
+
A [Bloblang query](https://www.benthos.dev/docs/guides/bloblang/about/) that should return a boolean value indicating whether the input resource should be requeued. An empty string disables this functionality.
44
54
45
55
Type: `string`
46
56
Default: `""`
47
57
48
-
`kind`
58
+
### `result.requeue_after`
49
59
50
-
resource kind
60
+
Specify a duration after which the input resource should be requeued. This is a string value, which allows you to customize it based on resulting payloads and their metadata using [interpolation functions](https://www.benthos.dev/docs/configuration/interpolation#bloblang-queries). An empty string disables this functionality.
51
61
52
62
Type: `string`
53
63
Default: `""`
54
64
55
-
`version`
65
+
### `watches[]`
66
+
67
+
A list of watch configurations that specify the set of kubernetes objects to target.
68
+
69
+
Type: `list(object)`
70
+
Default: `[]`
71
+
Required: `true`
56
72
57
-
resource version
73
+
### `watches[].group`
74
+
75
+
Resource group selector
58
76
59
77
Type: `string`
60
78
Default: `""`
61
79
62
-
`namespaces`
80
+
### `watches[].kind`
81
+
82
+
Resource kind selector
83
+
84
+
Type: `string`
85
+
Default: `""`
86
+
Required: `true`
63
87
64
-
optional namespace filter
88
+
### `watches[].namespaces`
65
89
66
-
Type: `[]string`
90
+
Resource namespace selector. An empty array here indicates cluster scope.
@@ -102,7 +186,3 @@ This input adds the following metadata fields to each message:
102
186
- namespace
103
187
- version
104
188
```
105
-
106
-
## Synchronous Responses
107
-
108
-
Additionally, this input will check for a `requeue_after` metadata entry on [synchronous response](https://www.benthos.dev/docs/guides/sync_responses) messages, and if found, will requeue the object for reconciliation.
Specifies the [deletion propagation policy](https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/#controlling-how-the-garbage-collector-deletes-dependents) when performing `delete` operations.
46
+
47
+
Type: `string`
48
+
Default: `Background`
49
+
Options: `Background`, `Foreground`, `Orphan`
50
+
51
+
### `max_in_flight`
52
+
53
+
The maximum number of messages to have in flight at a given time. Increase this to improve throughput.
Copy file name to clipboardExpand all lines: doc/kubernetes_processor.md
+26-3Lines changed: 26 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,32 @@ performs operations against a kubernetes cluster
4
4
5
5
## Fields
6
6
7
-
`operator`
7
+
### `deletion_propagation`
8
8
9
-
specifies the kubernetes client operation to perform
9
+
Specifies the [deletion propagation policy](https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/#controlling-how-the-garbage-collector-deletes-dependents) used with the `delete` operator.
10
10
11
11
Type: `string`
12
-
Options: `create`, `delete`, `get`, `update`
12
+
Default: `Background`
13
+
Options: `Background`, `Foreground`, `Orphan`
14
+
15
+
### `operator`
16
+
17
+
Specifies the kubernetes client operation to perform.
A [Bloblang mapping](https://www.benthos.dev/docs/guides/bloblang/about/) that resolves to valid operator.
25
+
26
+
Type: `string`
27
+
28
+
### `parts[]`
29
+
30
+
An optional array of message indexes of a batch that the processor should apply to. If left empty all messages are processed. This field is only applicable when batching messages at the input level.
31
+
32
+
Indexes can be negative, and if so the part will be selected from the end counting backwards starting from -1.
0 commit comments