Skip to content

Commit 87a79e8

Browse files
alunguamuraru
andauthored
Add support for dedicated envoy deployment per brokerConfigGroup (#2)
* No LB on envoy * Add support for dedicated envoy deployment per brokerConfigGroup Use a different label for each envoy deployment Add support to bring your own Load Balancer LB will not be managed by Kafka-Operator. HostnameOverride should be mandatory with BringYourOwnLB Add external listeners per broker config group Create Envoy if all config groups define an EL Envoy ingress should be creted if there is a global External Listener define, or if each broker config group defines each own External Listener. The broker config group External Listener will always override the global External Listener. Reconcile External Listeners only if needed. Fix LoadBalancer overwrite for ExternalListener LB address / IP should be used if HostnameOverride is not used Cosmetic fixes Co-authored-by: Adi Muraru <[email protected]>
1 parent dd7f60b commit 87a79e8

25 files changed

+869
-164
lines changed

charts/kafka-operator/crds/operator-kafka-crd.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,54 @@ spec:
500500
type: string
501501
type: object
502502
type: array
503+
envoy:
504+
description: Custom properties for the dedicated envoy deployment
505+
for this broker configuration group.
506+
Applicable only if EnvoyConfig.dedicatedEnvoyPerBrokerGroup is
507+
set to true.
508+
properties:
509+
replicas:
510+
format: int32
511+
minimum: 1
512+
type: integer
513+
required:
514+
- replicas
515+
type: object
516+
listenersConfig:
517+
description: ListenersConfig defines the broker specific Kafka
518+
listener types. These will override the global ListenersConfig
519+
properties:
520+
externalListeners:
521+
items:
522+
description: ExternalListenerConfig defines the external listener
523+
config for Kafka
524+
properties:
525+
containerPort:
526+
format: int32
527+
type: integer
528+
externalStartingPort:
529+
format: int32
530+
type: integer
531+
description: The broker port is computed as the sum of the
532+
externalStartingPort and the broker id. For consistence,
533+
it is recommended that externalStartingPort has the same
534+
value across all the brokerConfigGroups.
535+
hostnameOverride:
536+
type: string
537+
name:
538+
type: string
539+
type:
540+
type: string
541+
required:
542+
- containerPort
543+
- externalStartingPort
544+
- name
545+
- type
546+
type: object
547+
type: array
548+
required:
549+
- externalListeners
550+
type: object
503551
type: object
504552
type: object
505553
brokers:
@@ -1131,6 +1179,16 @@ spec:
11311179
type: string
11321180
type: object
11331181
type: array
1182+
useExistingLoadBalancer:
1183+
description: Set this to true if you don't want the operator to create
1184+
a LoadBalancer service. This is recommended if you want to use your
1185+
own LoadBalancer.
1186+
type: boolean
1187+
dedicatedEnvoyPerBrokerGroup:
1188+
description: Set this to true if you don't want the operator to create
1189+
one Envoy deployment for each BrokerConifgGrop. This is recommended
1190+
if you want to keep the brokers and the envoy in the same group/rack.
1191+
type: boolean
11341192
loadBalancerSourceRanges:
11351193
items:
11361194
type: string
@@ -1401,6 +1459,8 @@ spec:
14011459
externalStartingPort:
14021460
format: int32
14031461
type: integer
1462+
description: The broker port is computed as the sum of the
1463+
externalStartingPort and the broker id.
14041464
hostnameOverride:
14051465
type: string
14061466
name:

config/base/crds/kafka.banzaicloud.io_kafkaclusters.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,54 @@ spec:
505505
type: string
506506
type: object
507507
type: array
508+
envoy:
509+
description: Custom properties for the dedicated envoy deployment
510+
for this broker configuration group.
511+
Applicable only if EnvoyConfig.dedicatedEnvoyPerBrokerGroup is
512+
set to true.
513+
properties:
514+
replicas:
515+
format: int32
516+
minimum: 1
517+
type: integer
518+
required:
519+
- replicas
520+
type: object
521+
listenersConfig:
522+
description: ListenersConfig defines the broker specific Kafka
523+
listener types. These will override the global ListenersConfig
524+
properties:
525+
externalListeners:
526+
items:
527+
description: ExternalListenerConfig defines the external listener
528+
config for Kafka
529+
properties:
530+
containerPort:
531+
format: int32
532+
type: integer
533+
externalStartingPort:
534+
format: int32
535+
type: integer
536+
description: The broker port is computed as the sum of the
537+
externalStartingPort and the broker id. For consistence,
538+
it is recommended that externalStartingPort has the same
539+
value across all the brokerConfigGroups.
540+
hostnameOverride:
541+
type: string
542+
name:
543+
type: string
544+
type:
545+
type: string
546+
required:
547+
- containerPort
548+
- externalStartingPort
549+
- name
550+
- type
551+
type: object
552+
type: array
553+
required:
554+
- externalListeners
555+
type: object
508556
type: object
509557
type: object
510558
brokers:
@@ -520,6 +568,14 @@ spec:
520568
type: object
521569
config:
522570
type: string
571+
dedicatedEnvoyDeployment:
572+
properties:
573+
enabled:
574+
type: boolean
575+
replicas:
576+
format: int32
577+
type: integer
578+
type: object
523579
image:
524580
type: string
525581
imagePullSecrets:
@@ -1126,6 +1182,11 @@ spec:
11261182
additionalProperties:
11271183
type: string
11281184
type: object
1185+
useExistingLBLoadBalancer:
1186+
description: Set this to true if you don't want the operator to create
1187+
a LoadBalancer service. This is recommended if you want to use your
1188+
own LoadBalancer.
1189+
type: boolean
11291190
image:
11301191
type: string
11311192
imagePullSecrets:
@@ -1513,6 +1574,8 @@ spec:
15131574
externalStartingPort:
15141575
format: int32
15151576
type: integer
1577+
description: The broker port is computed as the sum of the
1578+
externalStartingPort and the broker id.
15161579
hostnameOverride:
15171580
type: string
15181581
name:

0 commit comments

Comments
 (0)