Skip to content

Commit 536019d

Browse files
authored
document the thing (#765)
1 parent 5720573 commit 536019d

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

docs/modules/zookeeper/pages/index.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ The Stackable Operator for Apache ZooKeeper is a Kubernetes Operator for deployi
66
https://zookeeper.apache.org/[Apache ZooKeeper] ensembles. Apache ZooKeeper is an open-source distributed coordination
77
service that facilitates synchronization, configuration management and leader election in distributed systems. ZooKeeper
88
is often used for these tasks in the Apache Hadoop ecosystem. Within the Stackable Platform, the Stackable Operators for
9-
xref:hbase:index.adoc[Apache HBase], xref:hdfs:index.adoc[Apache Hadoop HDFS], xref:kafka:index.adoc[Apache Kafka] and
10-
xref:nifi:index.adoc[Apache NiFi] depend on the ZooKeeper Operator.
9+
xref:hbase:index.adoc[Apache HBase], xref:hdfs:index.adoc[Apache Hadoop HDFS], xref:kafka:index.adoc[Apache Kafka],
10+
xref:nifi:index.adoc[Apache NiFi] and xref:druid:index.adoc[Apache Druid] depend on the ZooKeeper Operator.
1111

1212
== Getting started
1313

@@ -29,7 +29,7 @@ role group is accessible through its own Service, and there is a Service for the
2929

3030
The Operator creates a xref:concepts:service_discovery.adoc[service discovery ConfigMap] for the ZooKeeper instance, as
3131
well as for each ZNode. The discovery ConfigMaps contain information on how to connect to ZooKeeper. The ZNode discovery
32-
ConfigMap give access information for the ZNode. xref:zookeeper:znodes.adoc[learn more about ZNodes].
32+
ConfigMap give access information for the ZNode. xref:zookeeper:znodes.adoc[Learn more about ZNodes].
3333

3434
== Dependencies
3535

docs/modules/zookeeper/pages/znodes.adoc

+21-5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@ as it sees fit. This can be thought of like a namespace for that client, and pre
88

99
The Stackable Operator for Apache ZooKeeper manages ZNodes using the _ZookeeperZnode_ resource.
1010

11+
IMPORTANT: The Operator connects directly to ZooKeeper to manage the ZNodes inside of the ZooKeeper ensemble. This means that network access to the ZooKeeper pods is necessary. If your Kubernetes cluster restricts network acess, you need to configure a NetworkPolicy to allow the operator to connect to ZooKeeper.
12+
13+
== Configuring ZNodes
14+
15+
ZNodes are configured with the ZookeeperZnode CustomResource.
16+
If a ZookeeperZnode resource is created, the operator will create the respective tree in ZooKeeper.
17+
Also, if the resource in Kubernetes is deleted, so is the data in ZooKeeper.
18+
19+
CAUTION: The operator automatically deletes the ZNode from the ZooKeeper cluster if the Kubernetes `ZookeeperZnode` object is deleted. Recreating the
20+
`ZookeeperZnode` object will not restore access to the data.
21+
22+
Here is an example of a ZookeeperZnode:
23+
1124
[source,yaml]
1225
----
1326
include::example$example-znode.yaml[]
@@ -16,14 +29,17 @@ include::example$example-znode.yaml[]
1629
<2> Reference to the `ZookeeperCluster` object where the ZNode should be created.
1730
<3> The namespace of the `ZookeeperCluster`. Can be omitted and will default to the namespace of the ZNode object.
1831

19-
NOTE: It is the responsibility of the user to ensure that ZNodes are not shared between products. For example, a Kafka and a Hadoop cluster should not share the same ZNode.
20-
2132
When a ZNode is created, the operator creates the required tree in ZooKeeper and a xref:concepts:service_discovery.adoc[discovery ConfigMap] with a xref:discovery.adoc[] for this ZNode. This discovery ConfigMap is used by other operators to configure clients with access to the ZNode.
2233

2334
The operator _does not_ manage the contents of the ZNode.
2435

25-
CAUTION: The operator automatically deletes the ZNode from the ZooKeeper cluster if the Kubernetes `ZookeeperZnode` object is deleted. Recreating the
26-
`ZookeeperZnode` object will not restore access to the data.
36+
37+
== Creating a ZNode per dependant
38+
39+
To ensure that a product that uses ZooKeeper is running smoothly, you should make sure that each Stacklet or product instance is operating with its own ZNode.
40+
For example, a Kafka and a Hadoop cluster should not share the same ZNode. Also no two Kafka instances should share the same ZNode.
41+
42+
Have a look at the xref:usage_guide/isolating_clients_with_znodes.adoc[] guide for hands-on instructions on how to set up multiple ZNodes for different Stacklets.
2743

2844
== Split responsibilities for ZooKeeper and ZNodes
2945

@@ -35,4 +51,4 @@ ZNodes however are product specific and need to be managed by product teams that
3551

3652
== What's next
3753

38-
Have a look at the usage guide for ZNodes: xref:usage_guide/isolating_clients_with_znodes.adoc[]
54+
Have a look at the usage guide for ZNodes: xref:usage_guide/isolating_clients_with_znodes.adoc[] or the CRD reference for the {crd-docs}/zookeeper.stackable.tech/zookeeperznode/v1alpha1/[ZookeeperZnode {external-link-icon}^] CustomResource.

0 commit comments

Comments
 (0)