Skip to content

Commit 069f32b

Browse files
authored
Update docs for v2 release (FoundationDB#2219)
* Update docs for v2 release * Update docs/manual/customization.md
1 parent 44e2efd commit 069f32b

10 files changed

+86
-138
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,6 @@ The makefile supports environment variables that allow you to customize your bui
111111

112112
## Known Limitations
113113

114-
1. Support for backups in the operator is still in development, and there are significant missing features.
114+
1. Support for backups in the operator is still in development, and there are some missing features.
115115
1. Additional limitations can be found under [Warnings](docs/manual/warnings.md).
116116
1. The created FoundationDB cluster is only reachable from within the Kubernetes cluster. Except if the assigned IP addresses for the Pods are also reachable outside of the Kubernetes cluster.

docs/changelog/v2.0.0.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# v2.0.0
2+
3+
## Changes
4+
5+
### Action Required
6+
7+
Please read the required steps before upgrading in the [compatibility guide](https://github.com/FoundationDB/fdb-kubernetes-operator/blob/v0.51.1/docs/compatibility.md#preparing-for-a-major-release).
8+
9+
### Breaking Changes
10+
11+
* Dropped support for the `v1beta1` CRD [#2212](https://github.com/FoundationDB/fdb-kubernetes-operator/pull/2212)
12+
* Use locality-based exclusions per default [#2212](https://github.com/FoundationDB/fdb-kubernetes-operator/pull/2212)
13+
* Use DNS in cluster files per default [#2212](https://github.com/FoundationDB/fdb-kubernetes-operator/pull/2212)
14+
* Use the unified image per default [#2212](https://github.com/FoundationDB/fdb-kubernetes-operator/pull/2212)
15+
* Drop support for FDB 6.2 and 6.3 [#2212](https://github.com/FoundationDB/fdb-kubernetes-operator/pull/2212)
16+
* Drop support for custom PVC names [#2213](https://github.com/FoundationDB/fdb-kubernetes-operator/pull/2213)
17+
* Drop support for custom ConfigMap names [#2215](https://github.com/FoundationDB/fdb-kubernetes-operator/pull/2215)
18+
19+
### Operator
20+
21+
* Changes for the operator v2 release [#2212](https://github.com/FoundationDB/fdb-kubernetes-operator/pull/2212)
22+
* Ensure operator uses static names for PVC [#2213](https://github.com/FoundationDB/fdb-kubernetes-operator/pull/2213)
23+
* Ensure that the ConfigMap name for the cluster can't be modified [#2215](https://github.com/FoundationDB/fdb-kubernetes-operator/pull/2215)

docs/compatibility.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,18 @@ published for each major version.
2727
|------------------|---------------------|--------------------------|------------------------|-------------------------------|
2828
| 0.x | 0.51.1 | v1beta1 | 6.1.12+ | 1.15.0+ |
2929
| 1.x | - | v1beta1,v1beta2 | 6.2.20+ | 1.19.0+ |
30+
| 2.x | - | v1beta2 | 7.1.0+ | 1.19.0+ |
3031

31-
Note that the base operator image only supports a single version of FoundationDB. For more information about using different versions of FoundationDB, see the [Operator Customization](/docs/manual/operator_customization.md) guide in the user manual.
32+
Note that the base operator image only supports a single version of FoundationDB.
33+
For more information about using different versions of FoundationDB, see the [Operator Customization](/docs/manual/operator_customization.md) guide in the user manual.
3234

3335
## Preparing for a Major Release
3436

3537
Before you upgrade to a new major version, you should first update the operator
3638
and the CRD to the most recent release for the major version you are currently
3739
running. You can find that release in the table above. This will ensure that you
3840
can opt in to new behavior and move to the latest supported fields in the spec
39-
in advance of the upgrade, through whatever process you need to update your
40-
clusters safely.
41+
in advance of the upgrade, through whatever process you need to update your clusters safely.
4142
After you updated the operator you should ensure that all clusters are in a reconciled state and all changes are applied.
4243

4344
At this point, you can use the `kubectl-fdb` plugin to check your cluster specs for deprecated fields or defaults.

docs/manual/backup.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ You can restore to any point in time after the end of the first snapshot.
66

77
You can find more information about the backup feature in the [FoundationDB Backup documentation](https://apple.github.io/foundationdb/backups.html).
88

9-
**Warning**: Support for backups in the operator is still in development, and there are significant missing features.
9+
**Warning**: Support for backups in the operator is still in development, and there are some missing features.
1010

1111
## Example Backup
1212

docs/manual/customization.md

+16-88
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22

33
This document covers some of the options the operator provides for customizing your FoundationDB deployment.
44

5-
Many of these customizations involve the `processes` field in the cluster spec, which we will refer to as the "process settings". This field is a dictionary, mapping a process class to a process settings object. This also supports a special key called `general` which is applied to all process classes. If a value is specified for a specific process class, the `general` value will be ignored. These values are merged at the top level of the process settings object. If you specify a `volumeClaimTemplate` object in the `storage` settings and a `podTemplate` object in the `general` settings, the storage processes will use both the custom `volumeClaimTemplate` and the general `podTemplate`. If you specify a `podTemplate` object in the `storage` settings and `podTemplate` object in the `general` settings, the storage processes will only use the values given in the `storage` settings, and will ignore the pod template from the `general` settings completely.
5+
Many of these customizations involve the `processes` field in the cluster spec, which we will refer to as the "process settings".
6+
This field is a dictionary, mapping a process class to a process settings object.
7+
This also supports a special key called `general` which is applied to all process classes.
8+
If a value is specified for a specific process class, the `general` value will be ignored.
9+
These values are merged at the top level of the process settings object.
10+
If you specify a `volumeClaimTemplate` object in the `storage` settings and a `podTemplate` object in the `general` settings, the storage processes will use both the custom `volumeClaimTemplate` and the general `podTemplate`.
11+
If you specify a `podTemplate` object in the `storage` settings and `podTemplate` object in the `general` settings, the storage processes will only use the values given in the `storage` settings, and will ignore the pod template from the `general` settings completely.
612

713
## Running Multiple Storage Servers per Pod
814

9-
Since FoundationDB is limited to a single core it can make sense to run multiple storage server per disk. You can change the number of storage server per Pod with the `storageServersPerPod` setting. This will start multiple FDB processes inside of a single container, under a single `fdbmonitor` process.
15+
Since FoundationDB is limited to a single core it can make sense to run multiple storage server per disk.
16+
You can change the number of storage server per Pod with the `storageServersPerPod` setting.
17+
This will start multiple FDB processes inside of a single container, under a single `fdbmonitor` process.
1018

1119
```yaml
1220
apiVersion: apps.foundationdb.org/v1beta2
@@ -19,7 +27,7 @@ spec:
1927
storageServersPerPod: 2
2028
```
2129
22-
A change to the `storageServersPerPod` will replace all of the storage pods. For more information about this feature read the [multiple storage servers per pod](/docs/design/implemented/multiple_storage_per_disk.md) design doc.
30+
A change to the `storageServersPerPod` will replace all the storage pods. For more information about this feature read the [multiple storage servers per pod](/docs/design/implemented/multiple_storage_per_disk.md) design doc.
2331

2432
## Customizing the Volumes
2533

@@ -244,88 +252,6 @@ Using service IPs presents its own challenges:
244252
* We currently only support services with the ClusterIP type. These IPs may not be routable from outside the Kubernetes cluster.
245253
* The Service IP space is often more limited than the pod IP space, which could cause you to run out of service IPs.
246254

247-
## Using DNS
248-
249-
Using Pod IPs has the limitation that Pods might get a new IP address if they are recreated and sometimes using service IPs is not the right approach.
250-
FDB supports to use DNS in the cluster file since 7.1 and the operator can make use of that.
251-
252-
*Note*: This requires the following customization to inject the 7.1 library and use it as primary library (see code example below).
253-
As an alternative you can build the operator image by yourself that contains the 7.1 library as the primary library.
254-
Building the operator by yourself can be achieved with `docker build --build-arg FDB_VERSION=7.1.26 -t foundationdb/fdb-kubernetes-operator .`.
255-
256-
```yaml
257-
initContainers:
258-
...
259-
# Install this library in a special location to force the operator to
260-
# use it as the primary library.
261-
- name: foundationdb-kubernetes-init-7-1-primary
262-
image: foundationdb/foundationdb-kubernetes-sidecar:7.1.26-1
263-
args:
264-
- "--copy-library"
265-
- "7.1"
266-
- "--output-dir"
267-
- "/var/output-files/primary"
268-
- "--init-mode"
269-
volumeMounts:
270-
- name: fdb-binaries
271-
mountPath: /var/output-files
272-
containers:
273-
- name: manager
274-
imagePullPolicy: IfNotPresent
275-
env:
276-
- name: LD_LIBRARY_PATH
277-
value: /usr/bin/fdb/primary/lib
278-
```
279-
280-
The important part here is to add an additional init container with the 7.1 version and copy the library into `.../primary`, this library will be used by the operator as primary library.
281-
Once you set `useDNSInClusterFile` to true the operator will make the required changes to use DNS instead of IPs in the cluster file.
282-
283-
```yaml
284-
apiVersion: apps.foundationdb.org/v1beta2
285-
kind: FoundationDBCluster
286-
metadata:
287-
name: sample-cluster
288-
spec:
289-
version: 7.1.26
290-
routing:
291-
useDNSInClusterFile: true
292-
```
293-
294-
The generated connection string will look like this:
295-
296-
```bash
297-
$ kubectl get cm test-cluster-config -o jsonpath='{.data.cluster-file}'
298-
test_cluster:YeA03hA3hSC9vRnc2snrHf9o3rOZHe8o@test-cluster-storage-1.test-cluster.default.svc.cluster.local:4501,test-cluster-storage-2.test-cluster.default.svc.cluster.local:4501,test-cluster-storage-3.test-cluster.default.svc.cluster.local:4501
299-
```
300-
301-
and the status command will show that the coordianators are resolved using the DNS names:
302-
303-
```bash
304-
$ fdbcli --exec 'status details'
305-
Using cluster file `/var/dynamic-conf/fdb.cluster'.
306-
307-
Configuration:
308-
...
309-
310-
Coordination servers:
311-
test-cluster-storage-1.test-cluster.default.svc.cluster.local:4501 (reachable)
312-
test-cluster-storage-2.test-cluster.default.svc.cluster.local:4501 (reachable)
313-
test-cluster-storage-3.test-cluster.default.svc.cluster.local:4501 (reachable)
314-
```
315-
316-
The operator will add a special locality to the fdbserver processes called `dns_name` which stores the dns name for this process:
317-
318-
```json
319-
"locality" : {
320-
"dns_name" : "test-cluster-storage-3.test-cluster.default.svc.cluster.local",
321-
"instance_id" : "storage-3",
322-
"machineid" : "test-cluster-storage-3",
323-
"processid" : "fb1980fe9c2a6aef589ea0fd5c6131a2",
324-
"zoneid" : "test-cluster-storage-3"
325-
},
326-
327-
```
328-
329255
## Using Multiple Namespaces
330256

331257
Our [sample deployment](../../config/samples/deployment.yaml) configures the operator to run in single-namespace mode, where it only manages resources in the namespace where the operator itself is running. If you want a single deployment of the operator to manage your FDB clusters across all of your namespaces, you will need to run it in global mode. Which mode is appropriate will depend on the constraints of your environment.
@@ -508,8 +434,8 @@ kubectl label pod,pvc,configmap,service -l foundationdb.org/fdb-cluster-name=sam
508434
The operator currently supports two different image types: a split image and a unified image.
509435
The split image provides two different images for the `foundationdb` container and the `foundationdb-kubernetes-sidecar` container.
510436
The unified image provides a single image which handles launching `fdbserver` processes as well as providing feedback to the operator on locality information and updates to dynamic conf.
511-
The default behavior in the operator is to use the split image.
512-
To switch to the unified image, set the flag in the cluster spec as follows:
437+
The default behavior in the operator is to use the unified image.
438+
To switch to the split image, set the flag in the cluster spec as follows:
513439

514440
```yaml
515441
apiVersion: apps.foundationdb.org/v1beta2
@@ -518,9 +444,11 @@ metadata:
518444
name: sample-cluster
519445
spec:
520446
version: 7.1.26
521-
imageType: "unified"
447+
imageType: "split"
522448
```
523449

450+
**NOTE**: The split image is deprecated and new features will only be implemented in the unified image.
451+
524452
For more information on how the interaction between the operator and these images works, see the [technical design](technical_design.md#interaction-between-the-operator-and-the-pods).
525453

526454
## Next

docs/manual/fault_domains.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ Once that change is fully reconciled, you can clear the deny list from the spec.
379379

380380
[Pod disruption budgets](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)
381381
are a good idea to prevent simultaneous disruption to many components in a
382-
cluster, particularly during the upgrade of nodepools in public clouds. The
382+
cluster, particularly during the upgrade of node pools in public clouds. The
383383
operator does not yet create these automatically. To aid in creation of PDBs the
384384
operator preferentially selects coordinators from just storage pods, then if
385385
there are not enough storage pods, or the storage pods are not spread across

docs/manual/getting_started.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ As an example, we are going to deploy a [Kubernetes Job](https://kubernetes.io/d
6767
The `cluster file` is available through the exposed `ConfigMap` that can be used as follows:
6868

6969
```yaml
70+
# TODO update this example with the unified image
71+
72+
7073
apiVersion: batch/v1
7174
kind: CronJob
7275
metadata:
@@ -83,19 +86,22 @@ spec:
8386
# can write too. This ensures that long-running applications will keep the cluster-file updated
8487
# if the coordinators change.
8588
- name: init-cluster-file
86-
image: foundationdb/foundationdb-kubernetes-sidecar:7.1.26-1
89+
image: foundationdb/fdb-kubernetes-monitor:7.1.26
8790
args:
8891
# Make sure the sidecar exits when the file is not empty and was successfully copied.
89-
- --init-mode
92+
- --mode
93+
- init
9094
- --input-dir
9195
- /mnt/config-volume
96+
- --output-dir
97+
- /out-dir
9298
# Only copy the cluster-file that is provided by the ConfigMap
9399
- --copy-file
94100
- cluster-file
95101
# Make sure the cluster-file is not empty.
96102
- --require-not-empty
97103
- cluster-file
98-
volumeMounts:
104+
volumeMounts:
99105
- name: config-volume
100106
mountPath: /mnt/config-volume
101107
- name: shared-volume

docs/manual/operations.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ The operator uses the `locality_instance_id` to identify the process from the [m
1717

1818
## Replacing a Process
1919

20-
If you delete a pod, the operator will automatically create a new pod to replace it. If there is a volume available for re-use, we will create a new pod to match that volume. This means that in general you can replace a bad process just by deleting the pod. This may not be desirable in all situations, as it creates a loss of fault tolerance until the replacement pod is created. This also requires that the original volume be available, which may not be possible in some failure scenarios.
20+
If you delete a pod, the operator will automatically create a new pod to replace it. If there is a volume available for re-use, we will create a new pod to match that volume.
21+
This means that in general you can replace a bad process just by deleting the pod.
22+
This may not be desirable in all situations, as it creates a loss of fault tolerance until the replacement pod is created.
23+
This also requires that the original volume be available, which may not be possible in some failure scenarios.
2124

2225
As an alternative, you can replace a pod by explicitly placing it in the `processGroupsToRemove` list:
2326

@@ -98,13 +101,13 @@ spec:
98101
```
99102

100103
The default value for the log group of the operator is `fdb-kubernetes-operator` but can be changed by setting the environment variable `FDB_NETWORK_OPTION_TRACE_LOG_GROUP`.
101-
The operator version `v1.19.0` and never sets this value as a default and those changes are not required.
104+
The operator version `v1.19.0` and newer sets this value as a default and those changes are not required.
102105

103106
The upgrade process is described in more detail in [upgrades](./upgrades.md).
104107

105108
## Renaming a Cluster
106109

107-
The name of a cluster is immutable, and it is included in the names of all of the dependent resources, as well as in labels on the resources.
110+
The name of a cluster is immutable, and it is included in the names of all the dependent resources, as well as in labels on the resources.
108111
If you want to change the name later on, you can do so with the following steps.
109112
This example assumes you are renaming the cluster `sample-cluster` to `sample-cluster-2`.
110113

0 commit comments

Comments
 (0)