Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 15. GenericKafkaListenerConfigurationBootstrap schema reference
Used in: GenericKafkaListenerConfiguration
Full list of GenericKafkaListenerConfigurationBootstrap
schema properties
Broker service equivalents of nodePort
, host
, loadBalancerIP
and annotations
properties are configured in the GenericKafkaListenerConfigurationBroker
schema.
15.1. alternativeNames
You can specify alternative names for the bootstrap service. The names are added to the broker certificates and can be used for TLS hostname verification. The alternativeNames
property is applicable to all types of listeners.
Example of an external route
listener configured with an additional bootstrap address
listeners: #... - name: external1 port: 9094 type: route tls: true authentication: type: tls configuration: bootstrap: alternativeNames: - example.hostname1 - example.hostname2 # ...
15.2. host
The host
property is used with route
and ingress
listeners to specify the hostnames used by the bootstrap and per-broker services.
A host
property value is mandatory for ingress
listener configuration, as the Ingress controller does not assign any hostnames automatically. Make sure that the hostnames resolve to the Ingress endpoints. Streams for Apache Kafka will not perform any validation that the requested hosts are available and properly routed to the Ingress endpoints.
Example of host configuration for an ingress listener
listeners: #... - name: external2 port: 9094 type: ingress tls: true authentication: type: tls configuration: bootstrap: host: bootstrap.myingress.com brokers: - broker: 0 host: broker-0.myingress.com - broker: 1 host: broker-1.myingress.com - broker: 2 host: broker-2.myingress.com # ...
By default, route
listener hosts are automatically assigned by OpenShift. However, you can override the assigned route hosts by specifying hosts.
Streams for Apache Kafka does not perform any validation that the requested hosts are available. You must ensure that they are free and can be used.
Example of host configuration for a route listener
# ... listeners: #... - name: external1 port: 9094 type: route tls: true authentication: type: tls configuration: bootstrap: host: bootstrap.myrouter.com brokers: - broker: 0 host: broker-0.myrouter.com - broker: 1 host: broker-1.myrouter.com - broker: 2 host: broker-2.myrouter.com # ...
15.3. nodePort
By default, the port numbers used for the bootstrap and broker services are automatically assigned by OpenShift. You can override the assigned node ports for nodeport
listeners by specifying the requested port numbers.
Streams for Apache Kafka does not perform any validation on the requested ports. You must ensure that they are free and available for use.
Example of an external listener configured with overrides for node ports
# ... listeners: #... - name: external4 port: 9094 type: nodeport tls: true authentication: type: tls configuration: bootstrap: nodePort: 32100 brokers: - broker: 0 nodePort: 32000 - broker: 1 nodePort: 32001 - broker: 2 nodePort: 32002 # ...
15.4. loadBalancerIP
Use the loadBalancerIP
property to request a specific IP address when creating a loadbalancer. Use this property when you need to use a loadbalancer with a specific IP address. The loadBalancerIP
field is ignored if the cloud provider does not support the feature.
Example of an external listener of type loadbalancer
with specific loadbalancer IP address requests
# ... listeners: #... - name: external3 port: 9094 type: loadbalancer tls: true authentication: type: tls configuration: bootstrap: loadBalancerIP: 172.29.3.10 brokers: - broker: 0 loadBalancerIP: 172.29.3.1 - broker: 1 loadBalancerIP: 172.29.3.2 - broker: 2 loadBalancerIP: 172.29.3.3 # ...
15.5. annotations
Use the annotations
property to add annotations to OpenShift resources related to the listeners. You can use these annotations, for example, to instrument DNS tooling such as External DNS, which automatically assigns DNS names to the loadbalancer services.
Example of an external listener of type loadbalancer
using annotations
# ... listeners: #... - name: external3 port: 9094 type: loadbalancer tls: true authentication: type: tls configuration: bootstrap: annotations: external-dns.alpha.kubernetes.io/hostname: kafka-bootstrap.mydomain.com. external-dns.alpha.kubernetes.io/ttl: "60" brokers: - broker: 0 annotations: external-dns.alpha.kubernetes.io/hostname: kafka-broker-0.mydomain.com. external-dns.alpha.kubernetes.io/ttl: "60" - broker: 1 annotations: external-dns.alpha.kubernetes.io/hostname: kafka-broker-1.mydomain.com. external-dns.alpha.kubernetes.io/ttl: "60" - broker: 2 annotations: external-dns.alpha.kubernetes.io/hostname: kafka-broker-2.mydomain.com. external-dns.alpha.kubernetes.io/ttl: "60" # ...
15.6. GenericKafkaListenerConfigurationBootstrap
schema properties
Property | Property type | Description |
---|---|---|
alternativeNames | string array | Additional alternative names for the bootstrap service. The alternative names will be added to the list of subject alternative names of the TLS certificates. |
host | string |
The bootstrap host. This field will be used in the Ingress resource or in the Route resource to specify the desired hostname. This field can be used only with |
nodePort | integer |
Node port for the bootstrap service. This field can be used only with |
loadBalancerIP | string |
The loadbalancer is requested with the IP address specified in this field. This feature depends on whether the underlying cloud provider supports specifying the |
annotations | map |
Annotations that will be added to the |
labels | map |
Labels that will be added to the |