Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 0616193

Browse files
committed
documentation
1 parent 7c6ac26 commit 0616193

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

docs/cassandra.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ All the C* nodes (pods) in a ``nodepool`` have the same configuration and the fo
2525

2626
.. include:: configure-scheduler.rst
2727

28+
.. _availability-zones-cassandra:
29+
2830
Cassandra Across Multiple Availability Zones
2931
--------------------------------------------
3032

@@ -240,6 +242,37 @@ Navigator will add C* nodes, one at a time, until the desired number of nodes is
240242

241243
You can look at ``CassandraCluster.Status.NodePools[<nodepoolname>].ReadyReplicas`` to see the current number of healthy C* nodes in each ``nodepool``.
242244

245+
Pilots and Cassandra Docker Images
246+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
247+
248+
By default, Navigator will use the `Cassandra Docker images from DockerHub <https://hub.docker.com/_/cassandra/>`_.
249+
It will use an image with a tag matching the supplied ``CassandraCluster.Spec.Version`` field.
250+
If you prefer to use your own container image you should configure the ``CassandraCluster.Spec.Image`` fields.
251+
252+
Navigator installs a ``navigator-pilot-cassandra`` executable into each Pod at the path ``/pilot``.
253+
This ``pilot`` process connects to the API server to:
254+
get extra configuration settings,
255+
report the status of this C* node, and to
256+
perform leader election of a single pilot in the cluster.
257+
258+
The ``pilot`` overrides the following keys in the default ``/etc/cassandra/cassandra.yaml`` file:
259+
260+
* ``cluster_name``: This will be set to match the name of the corresponding ``CassandraCluster`` resource in the API server.
261+
* ``listen_address`` / ``listen_interface`` / ``broadcast_address`` / ``rpc_address`` / ``broadcast_rpc_address``: These keys will be set to ``null``.
262+
This ensures that Cassandra process listens and communicates using the IP address currently associated with the fully qualified domain name of the Pod.
263+
This is important if the Pod is moved to another node and is assigned a different IP address.
264+
Removing these settings from the Configuration file ensures that Cassandra uses the most recent IP address that Kubernetes has assigned to the Pod and that other C* nodes in the cluster are notified of the change of IP address.
265+
* ``seed_provider``: This is set to ``io.jetstack.cassandra.KubernetesSeedProvider`` which allows Cassandra to look up the seed IP addresses from a Kubernetes service.
266+
The ``seed_provider.*.seeds`` sub key will be emptied.
267+
This is to avoid the risk of nodes mistakenly joining the cluster as seeds if the seed provider service is temporarily unavailable.
268+
269+
The ``pilot`` also overwrites ``cassandra-rackdc.properties`` with values derived from the ``CassandraCluster.Spec.Nodepools`` (see :ref:`availability-zones-cassandra`).
270+
271+
Finally the ``pilot`` executes ``/usr/sbin/cassandra`` directly.
272+
273+
.. note::
274+
The default entry point (e.g. `/docker-entrypoint.sh <https://github.com/docker-library/cassandra/blob/master/3.11/docker-entrypoint.sh>`_ is ignored.
275+
243276
Supported Versions
244277
------------------
245278

0 commit comments

Comments
 (0)