-
Notifications
You must be signed in to change notification settings - Fork 68
/
300-kafkasource.yaml
420 lines (419 loc) · 17.6 KB
/
300-kafkasource.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
# Copyright 2022 TriggerMesh Inc.
#
# 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.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: kafkasources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
triggermesh.io/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "io.triggermesh.kafka.event" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: KafkaSource
plural: kafkasources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
description: TriggerMesh event source for Kafka.
type: object
properties:
spec:
description: Desired state of the event source.
type: object
properties:
topic:
description: Topic name to stream the target events to.
type: string
bootstrapServers:
description: Array of Kafka servers used to bootstrap the connection.
type: array
items:
type: string
minLength: 1
groupID:
description: The ID of the kafka group.
type: string
auth:
description: Authentication method used to interact with Kafka.
type: object
properties:
saslEnable:
description: Boolean to indicate if SASL is enabled.
type: boolean
tlsEnable:
description: Boolean to indicate if TLS is enabled.
type: boolean
securityMechanism:
description: securityMechanism attribute indicate which mechanism to use.
type: string
enum: [GSSAPI, PLAIN, SCRAM-SHA-256, SCRAM-SHA-512]
username:
description: Kafka account username.
type: string
password:
description: Kafka account password.
type: object
properties:
value:
description: Plain text password.
type: string
valueFromSecret:
description: A reference to a Kubernetes Secret object containing the password.
type: object
properties:
name:
type: string
key:
type: string
required:
- name
- key
oneOf:
- required: [value]
- required: [valueFromSecret]
kerberos:
description: Kerberos Authentication method to interact with Kafka.
type: object
properties:
realm:
description: The name of the Kerberos Realm.
type: string
serviceName:
description: The primary name of the Kafka server configured.
type: string
username:
description: Kerberos username or Kerberos Principal Name. The Username or the Principal doesn't require
the Realm in it.
type: string
password:
description: Kerberos Password.
type: object
properties:
value:
description: Plain text password.
type: string
valueFromSecret:
description: A reference to a Kubernetes Secret object containing the password.
type: object
properties:
name:
type: string
key:
type: string
required:
- name
- key
oneOf:
- required: [value]
- required: [valueFromSecret]
config:
type: object
properties:
valueFromSecret:
description: A reference to a Kubernetes Secret object containing the kerberos configuration file
(krb5.conf).
type: object
properties:
name:
type: string
key:
type: string
required:
- name
- key
required:
- valueFromSecret
keytab:
type: object
properties:
valueFromSecret:
description: A reference to a Kubernetes Secret object containing the kerberos keytab file contents.
type: object
properties:
name:
type: string
key:
type: string
required:
- name
- key
required:
- valueFromSecret
tls:
description: TLS Authentication method to interact with Kafka.
type: object
properties:
ca:
description: The value to the configured CA.
type: object
properties:
valueFromSecret:
description: A reference to a Kubernetes Secret object containing the CA content.
type: object
properties:
name:
type: string
key:
type: string
required:
- name
- key
required:
- valueFromSecret
clientCert:
description: The value of the Client Cert.
type: object
properties:
valueFromSecret:
description: A reference to a Kubernetes Secret object containing the Client Cert content.
type: object
properties:
name:
type: string
key:
type: string
required:
- name
- key
required:
- valueFromSecret
clientKey:
description: The value of the Client Key.
type: object
properties:
valueFromSecret:
description: A reference to a Kubernetes Secret object containing the Client Key content.
type: object
properties:
name:
type: string
key:
type: string
required:
- name
- key
required:
- valueFromSecret
skipVerify:
description: SkipVerify controls whether a client verifies the server's certificate chain and host
name. If skipVerify is true, crypto/tls accepts any certificate presented by the server and any
host name in that certificate. In this mode, TLS is susceptible to machine-in-the-middle attacks
unless custom verification is used. This should be used only for testing.
type: boolean
required:
- saslEnable
sink:
description: The destination of events sourced from Kafka Kafka.
type: object
properties:
ref:
description: Reference to an addressable Kubernetes object to be used as the destination of events.
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
description: URI to use as the destination of events.
type: string
format: uri
anyOf:
- required: [ref]
- required: [uri]
adapterOverrides:
description: Kubernetes object parameters to apply on top of default adapter values.
type: object
properties:
annotations:
description: Adapter annotations.
type: object
additionalProperties:
type: string
labels:
description: Adapter labels.
type: object
additionalProperties:
type: string
env:
description: Adapter environment variables.
type: array
items:
type: object
properties:
name:
type: string
value:
type: string
resources:
description: Compute Resources required by the adapter. More info at https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: Limits describes the maximum amount of compute resources allowed. More info at https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: Requests describes the minimum amount of compute resources required. If Requests is omitted
for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined
value. More info at https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
tolerations:
description: Pod tolerations, as documented at https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
Tolerations require additional configuration for Knative-based deployments - https://knative.dev/docs/serving/configuration/feature-flags/
type: array
items:
type: object
properties:
key:
description: Taint key that the toleration applies to.
type: string
operator:
description: Key's relationship to the value.
type: string
enum: [Exists, Equal]
value:
description: Taint value the toleration matches to.
type: string
effect:
description: Taint effect to match.
type: string
enum: [NoSchedule, PreferNoSchedule, NoExecute]
tolerationSeconds:
description: Period of time a toleration of effect NoExecute tolerates the taint.
type: integer
format: int64
nodeSelector:
description: NodeSelector only allow the object pods to be created at nodes where all selector labels
are present, as documented at https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector.
NodeSelector require additional configuration for Knative-based deployments - https://knative.dev/docs/serving/configuration/feature-flags/
type: object
additionalProperties:
type: string
affinity:
description: Scheduling constraints of the pod. More info at https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity.
Affinity require additional configuration for Knative-based deployments - https://knative.dev/docs/serving/configuration/feature-flags/
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- bootstrapServers
- topic
- groupID
- sink
status:
description: Reported status of the event source.
type: object
properties:
sinkUri:
description: URI of the sink where events are currently sent to.
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
address:
description: Public address of the HTTP/S endpoint exposing the source.
type: object
properties:
url:
type: string
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: URL
type: string
jsonPath: .status.address.url
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp