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
Copy file name to clipboardExpand all lines: modules/configuration/pages/about.adoc
+89Lines changed: 89 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,95 @@ input:
111
111
112
112
This is very useful for sharing configuration files across different deployment environments.
113
113
114
+
== Labels
115
+
116
+
Labels are unique, user-defined identifiers used throughout Redpanda Connect configurations. They serve two purposes:
117
+
118
+
- **Reference:** Allow different parts of your pipeline to refer to specific components or resources.
119
+
- **Readability:** Make your configuration more understandable for humans, especially in complex deployments.
120
+
121
+
You can assign labels to most pipeline components, including resources, inputs, outputs, processors, and entire pipelines. Using clear, descriptive labels improves both maintainability and clarity.
122
+
123
+
Labels are commonly applied to the following components:
124
+
125
+
=== Resources
126
+
127
+
Labels identify <<reuse, reusable resources>> such as processors, caches, and rate limiters, making them easy to reference elsewhere in your pipeline.
When running in xref:guides:streams_mode/about.adoc[streams mode] with the Streams API, labels serve as pipeline names. This enables you to create and reference pipelines by their label through the API.
150
+
151
+
[source,bash]
152
+
----
153
+
# Create a pipeline labeled "data-processor"
154
+
curl -X POST http://localhost:4195/streams/data-processor \
155
+
-H "Content-Type: application/yaml" \
156
+
-d @pipeline-config.yaml
157
+
158
+
# Reference a pipeline by its label
159
+
curl http://localhost:4195/streams/data-processor
160
+
----
161
+
162
+
=== Component labeling for clarity
163
+
164
+
You can also use labels on inputs, outputs, processors, and other components to improve the human-readability of your configuration and make troubleshooting easier. For example:
165
+
166
+
[source,yaml]
167
+
----
168
+
input:
169
+
label: ingest_api
170
+
http_server: {}
171
+
172
+
pipeline:
173
+
label: user_data_ingest
174
+
processors:
175
+
- label: sanitize_fields
176
+
mapping: 'root = this.trim()'
177
+
- resource: my-transformer
178
+
----
179
+
180
+
== Label naming requirements
181
+
182
+
Labels must meet the following criteria:
183
+
184
+
* *Length*: 3-128 characters
185
+
* *Allowed characters*: Alphanumeric, hyphens, and underscores (`A-Za-z0-9-_`)
0 commit comments