Skip to content

Commit 0168b4f

Browse files
authored
Add additional documentation for the copied cluster-file (#1978)
1 parent 1bf9aad commit 0168b4f

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

docs/manual/getting_started.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,15 @@ processes in the cluster. In this example, each volume will be 128 GB.
5656
By default each pod will have two containers and one init container.
5757
The `foundationdb` container will run `fdbmonitor` and `fdbserver`, and is the main container for the pod. The `foundationdb-kubernetes-sidecar` container will run a sidecar image designed to help run FDB on Kubernetes.
5858
It is responsible for managing the `fdbmonitor` conf files and providing FDB binaries to the `foundationdb` container.
59-
The operator will create a config map that contains a template for the monitor conf file, and the sidecar will interpolate instance-specific fields into the conf and make it available to the fdbmonitor process through a shared volume.
60-
The "Upgrading a Cluster" has more detail on we manage binaries.
59+
The operator will create a `ConfigMap` that contains a template for the monitor conf file, and the sidecar will interpolate instance-specific fields into the conf and make it available to the `fdbmonitor` process through a shared volume.
60+
The [Upgrading a Cluster](upgrades.md) has more detail on we manage binaries.
6161
The init container will run the same sidecar image, and will ensure that the initial binaries and dynamic conf are ready before the `fdbmonitor` process starts.
6262

6363
## Accessing a Cluster
6464

65-
Now that your cluster is deployed, you can easily access the cluster. As an example, we are going to deploy a [Kubernetes Job](https://kubernetes.io/docs/tasks/job/) that will check the status of the cluster every minute. The `cluster file` is available through the exposed `config map` that can be mounted as follows:
65+
Now that your cluster is deployed, you can easily access the cluster.
66+
As an example, we are going to deploy a [Kubernetes Job](https://kubernetes.io/docs/tasks/job/) that will check the status of the cluster every minute.
67+
The `cluster file` is available through the exposed `ConfigMap` that can be used as follows:
6668

6769
```yaml
6870
apiVersion: batch/v1
@@ -77,14 +79,20 @@ spec:
7779
spec:
7880
restartPolicy: OnFailure
7981
initContainers:
82+
# See the note below this example. The cluster file is copied to a place where the application
83+
# can write too. This ensures that long-running applications will keep the cluster-file updated
84+
# if the coordinators change.
8085
- name: init-cluster-file
8186
image: foundationdb/foundationdb-kubernetes-sidecar:7.1.26-1
8287
args:
88+
# Make sure the sidecar exits when the file is not empty and was successfully copied.
8389
- --init-mode
8490
- --input-dir
8591
- /mnt/config-volume
92+
# Only copy the cluster-file that is provided by the ConfigMap
8693
- --copy-file
8794
- cluster-file
95+
# Make sure the cluster-file is not empty.
8896
- --require-not-empty
8997
- cluster-file
9098
volumeMounts:
@@ -116,7 +124,7 @@ spec:
116124

117125
Note that:
118126

119-
* The name of the config map will depend on the name of your cluster.
127+
* The name of the `ConfigMap` will depend on the name of your cluster.
120128
* For long-running applications you should ensure that your cluster file is writeable by your application. You can achieve this by using the init container and copying the cluster-file inside a shared `emptyDir`.
121129

122130
## Next

0 commit comments

Comments
 (0)