Skip to content

Commit cb0cab5

Browse files
committed
Documented service discovery (#367)
## Description closes #342 Co-authored-by: Malte Sander <malte.sander.it@gmail.com>
1 parent 05140d1 commit cb0cab5

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

docs/modules/ROOT/nav.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
* xref:installation.adoc[]
33
* xref:configuration.adoc[]
44
* xref:usage.adoc[]
5-
5+
* Concepts
6+
** xref:discovery.adoc[]
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
:clusterName: simple-kafka
2+
:namespace: stackable
3+
:brokerPort: 9092
4+
5+
= Discovery
6+
7+
The Stackable Operator for Apache Kafka publishes a discovery https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#configmap-v1-core[`ConfigMap`], which exposes a client configuration bundle that allows access to the Apache Kafka cluster.
8+
9+
The bundle includes a thrift connection string to access the Kafka broker service. This string may be used by other operators or tools to configure their products with access to Kafka. This is limited to internal cluster access.
10+
11+
== Example
12+
13+
Given the following Kafka cluster:
14+
15+
[source,yaml,subs="normal,callouts"]
16+
----
17+
apiVersion: kafka.stackable.tech/v1alpha1
18+
kind: KafkaCluster
19+
metadata:
20+
name: {clusterName} # <1>
21+
namespace: {namespace} # <2>
22+
spec:
23+
[...]
24+
----
25+
<1> The name of the Kafka cluster, which is also the name of the created discovery `ConfigMap`.
26+
<2> The namespace of the discovery `ConfigMap`.
27+
28+
The resulting discovery `ConfigMap` is `{namespace}/{clusterName}`.
29+
30+
== Contents
31+
32+
The `{namespace}/{clusterName}` discovery `ConfigMap` contains the following fields where `{clusterName}` represents the name and `{namespace}` the namespace of the cluster:
33+
34+
`KAFKA`::
35+
====
36+
Contains the thrift protocol connection string for the Kafka cluster:
37+
[subs="normal"]
38+
{clusterName}.{namespace}.svc.cluster.local:{brokerPort}
39+
====

0 commit comments

Comments
 (0)