You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2023. It is now read-only.
Override Cassandra configuration and launch Cassandra directly
* Bypass the entrypoint script of the chosen Docker image.
* Instead, make direct changes to the Cassandra.yaml file.
* And execute ``cassandra`` directly.
* Add a pilot integration test
Copy file name to clipboardExpand all lines: docs/cassandra.rst
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ All the C* nodes (pods) in a ``nodepool`` have the same configuration and the fo
25
25
26
26
.. include:: configure-scheduler.rst
27
27
28
+
.. _availability-zones-cassandra:
29
+
28
30
Cassandra Across Multiple Availability Zones
29
31
--------------------------------------------
30
32
@@ -240,6 +242,37 @@ Navigator will add C* nodes, one at a time, until the desired number of nodes is
240
242
241
243
You can look at ``CassandraCluster.Status.NodePools[<nodepoolname>].ReadyReplicas`` to see the current number of healthy C* nodes in each ``nodepool``.
242
244
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 and the corresponding values will be removed from the default configuration.
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 removed.
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/bin/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.
0 commit comments