Skip to content

Commit fc050c7

Browse files
(Documentation) Update ArangoDeploymentReplication and ArangoLocalStorage CR auto-generated docs (#1455)
1 parent 03da8ba commit fc050c7

14 files changed

+227
-129
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
- (Documentation) Update ArangoDeployment CR auto-generated docs
1010
- (Documentation) Update ArangoBackup and ArangoBackupPolicy CR auto-generated docs
1111
- (Bugfix) Fix missing Pod Status case in the RuntimeContainerImageUpdateAction
12+
- (Documentation) Update ArangoDeploymentReplication and ArangoLocalStorage CR auto-generated docs
1213
- (Feature) Member Memory Reservation
14+
- (Documentation) Update ArangoDeploymentReplication and ArangoLocalStorage CR auto-generated docs
1315

1416
## [1.2.34](https://github.com/arangodb/kube-arangodb/tree/1.2.34) (2023-10-16)
1517
- (Bugfix) Fix make manifests-crd-file command
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# API Reference for ArangoDeploymentReplication V1
2+
3+
## Spec
4+
5+
### .spec.cancellation.ensureInSync: bool
6+
7+
EnsureInSync if it is true then during cancellation process data consistency is required.
8+
Default value is true.
9+
10+
[Code Reference](/pkg/apis/replication/v1/replication_spec.go#L38)
11+
12+
### .spec.cancellation.sourceReadOnly: bool
13+
14+
SourceReadOnly if it true then after cancellation source data center should be in read-only mode.
15+
Default value is false.
16+
17+
[Code Reference](/pkg/apis/replication/v1/replication_spec.go#L41)
18+
19+
### .spec.destination.auth.keyfileSecretName: string
20+
21+
KeyfileSecretName holds the name of a Secret containing a client authentication
22+
certificate formatted at keyfile in a `tls.keyfile` field.
23+
If `userSecretName` has not been set,
24+
the client authentication certificate found in the secret with this name is also used to configure
25+
the synchronization and fetch the synchronization status.
26+
27+
[Code Reference](/pkg/apis/replication/v1/endpoint_authentication_spec.go#L37)
28+
29+
### .spec.destination.auth.userSecretName: string
30+
31+
UserSecretName holds the name of a Secret containing a `username` & `password`
32+
field used for basic authentication.
33+
The user identified by the username must have write access in the `_system` database
34+
of the ArangoDB cluster at the endpoint.
35+
36+
[Code Reference](/pkg/apis/replication/v1/endpoint_authentication_spec.go#L42)
37+
38+
### .spec.destination.deploymentName: string
39+
40+
DeploymentName holds the name of an ArangoDeployment resource.
41+
If set, this provides default values for masterEndpoint, auth & tls.
42+
43+
[Code Reference](/pkg/apis/replication/v1/endpoint_spec.go#L36)
44+
45+
### .spec.destination.masterEndpoint: []string
46+
47+
MasterEndpoint holds a list of URLs used to reach the syncmaster(s)
48+
Use this setting if the source cluster is not running inside a Kubernetes cluster
49+
that is reachable from the Kubernetes cluster the `ArangoDeploymentReplication` resource is deployed in.
50+
Specifying this setting and `deploymentName` at the same time is not allowed.
51+
52+
Default Value: []
53+
54+
[Code Reference](/pkg/apis/replication/v1/endpoint_spec.go#L42)
55+
56+
### .spec.destination.tls.caSecretName: string
57+
58+
CASecretName holds the name of a Secret containing a ca.crt public key for TLS validation.
59+
This setting is required, unless `deploymentName` has been set.
60+
61+
[Code Reference](/pkg/apis/replication/v1/endpoint_tls_spec.go#L34)
62+
63+
### .spec.source.auth.keyfileSecretName: string
64+
65+
KeyfileSecretName holds the name of a Secret containing a client authentication
66+
certificate formatted at keyfile in a `tls.keyfile` field.
67+
If `userSecretName` has not been set,
68+
the client authentication certificate found in the secret with this name is also used to configure
69+
the synchronization and fetch the synchronization status.
70+
71+
[Code Reference](/pkg/apis/replication/v1/endpoint_authentication_spec.go#L37)
72+
73+
### .spec.source.auth.userSecretName: string
74+
75+
UserSecretName holds the name of a Secret containing a `username` & `password`
76+
field used for basic authentication.
77+
The user identified by the username must have write access in the `_system` database
78+
of the ArangoDB cluster at the endpoint.
79+
80+
[Code Reference](/pkg/apis/replication/v1/endpoint_authentication_spec.go#L42)
81+
82+
### .spec.source.deploymentName: string
83+
84+
DeploymentName holds the name of an ArangoDeployment resource.
85+
If set, this provides default values for masterEndpoint, auth & tls.
86+
87+
[Code Reference](/pkg/apis/replication/v1/endpoint_spec.go#L36)
88+
89+
### .spec.source.masterEndpoint: []string
90+
91+
MasterEndpoint holds a list of URLs used to reach the syncmaster(s)
92+
Use this setting if the source cluster is not running inside a Kubernetes cluster
93+
that is reachable from the Kubernetes cluster the `ArangoDeploymentReplication` resource is deployed in.
94+
Specifying this setting and `deploymentName` at the same time is not allowed.
95+
96+
Default Value: []
97+
98+
[Code Reference](/pkg/apis/replication/v1/endpoint_spec.go#L42)
99+
100+
### .spec.source.tls.caSecretName: string
101+
102+
CASecretName holds the name of a Secret containing a ca.crt public key for TLS validation.
103+
This setting is required, unless `deploymentName` has been set.
104+
105+
[Code Reference](/pkg/apis/replication/v1/endpoint_tls_spec.go#L34)
106+
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# API Reference for ArangoLocalStorage V1Alpha
2+
3+
## Spec
4+
5+
### .spec.localPath: []string
6+
7+
LocalPath setting specifies one or more local directories (on the nodes) used to create persistent volumes in.
8+
9+
[Code Reference](/pkg/apis/storage/v1alpha/local_storage_spec.go#L36)
10+
11+
### .spec.nodeSelector: map[string]string
12+
13+
NodeSelector setting specifies which nodes the operator will provision persistent volumes on.
14+
15+
[Code Reference](/pkg/apis/storage/v1alpha/local_storage_spec.go#L43)
16+
17+
### .spec.podCustomization.priority: int32
18+
19+
Priority if defined, sets the priority for pods of storage provisioner
20+
21+
[Code Reference](/pkg/apis/storage/v1alpha/local_storage_pod_customization.go#L25)
22+
23+
### .spec.privileged: bool
24+
25+
Privileged if set, passes Privileged flag to SecurityContext for pods of storage provisioner
26+
27+
[Code Reference](/pkg/apis/storage/v1alpha/local_storage_spec.go#L45)
28+
29+
### .spec.storageClass.isDefault: bool
30+
31+
IsDefault setting specifies if the created `StorageClass` will
32+
be marked as default storage class.
33+
34+
Default Value: false
35+
36+
[Code Reference](/pkg/apis/storage/v1alpha/storage_class_spec.go#L42)
37+
38+
### .spec.storageClass.name: string
39+
40+
Name setting specifies the name of the storage class that
41+
created `PersistentVolume` will use.
42+
If empty, this field defaults to the name of the `ArangoLocalStorage` object.
43+
If a `StorageClass` with given name does not yet exist, it will be created.
44+
45+
Default Value: ""
46+
47+
[Code Reference](/pkg/apis/storage/v1alpha/storage_class_spec.go#L38)
48+
49+
### .spec.storageClass.reclaimPolicy: core.PersistentVolumeReclaimPolicy
50+
51+
ReclaimPolicy defines what happens to a persistent volume when released from its claim.
52+
53+
Links:
54+
* [Documentation of core.PersistentVolumeReclaimPolicy](https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming)
55+
56+
[Code Reference](/pkg/apis/storage/v1alpha/storage_class_spec.go#L46)
57+
58+
### .spec.tolerations: []core.Toleration
59+
60+
Tolerations specifies the tolerations added to pods of storage provisioner
61+
62+
Links:
63+
* [Documentation of core.Toleration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#toleration-v1-core)
64+
65+
[Code Reference](/pkg/apis/storage/v1alpha/local_storage_spec.go#L41)
66+

docs/api/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
- [ArangoBackup.V1](./ArangoBackup.V1.md)
44
- [ArangoBackupPolicy.V1](./ArangoBackupPolicy.V1.md)
55
- [ArangoDeployment.V1](./ArangoDeployment.V1.md)
6+
- [ArangoDeploymentReplication.V1](./ArangoDeploymentReplication.V1.md)
7+
- [ArangoLocalStorage.V1Alpha](./ArangoLocalStorage.V1Alpha.md)
68
- [ArangoMember.V1](./ArangoMember.V1.md)
79

docs/deployment-replication-resource-reference.md

Lines changed: 1 addition & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#### Enterprise Edition only
44

5+
[Full CustomResourceDefinition reference ->](./api/ArangoDeploymentReplication.V1.md)
56

67
The ArangoDB Replication Operator creates and maintains ArangoDB
78
`arangosync` configurations in a Kubernetes cluster, given a replication specification.
@@ -183,95 +184,6 @@ running in Kubernetes:
183184
As soon as the replication is configured, the `Add collection` button in the `Collections`
184185
page of the web interface (of the destination cluster) will be grayed out.
185186

186-
## Specification reference
187-
188-
Below you'll find all settings of the `ArangoDeploymentReplication` custom resource.
189-
190-
### `spec.source.deploymentName: string`
191-
192-
This setting specifies the name of an `ArangoDeployment` resource that runs a cluster
193-
with sync enabled.
194-
195-
This cluster configured as the replication source.
196-
197-
### `spec.source.masterEndpoint: []string`
198-
199-
This setting specifies zero or more master endpoint URLs of the source cluster.
200-
201-
Use this setting if the source cluster is not running inside a Kubernetes cluster
202-
that is reachable from the Kubernetes cluster the `ArangoDeploymentReplication` resource is deployed in.
203-
204-
Specifying this setting and `spec.source.deploymentName` at the same time is not allowed.
205-
206-
### `spec.source.auth.keyfileSecretName: string`
207-
208-
This setting specifies the name of a `Secret` containing a client authentication certificate called `tls.keyfile` used to authenticate
209-
with the SyncMaster at the specified source.
210-
211-
If `spec.source.auth.userSecretName` has not been set,
212-
the client authentication certificate found in the secret with this name is also used to configure
213-
the synchronization and fetch the synchronization status.
214-
215-
This setting is required.
216-
217-
### `spec.source.auth.userSecretName: string`
218-
219-
This setting specifies the name of a `Secret` containing a `username` & `password` used to authenticate
220-
with the SyncMaster at the specified source in order to configure synchronization and fetch synchronization status.
221-
222-
The user identified by the username must have write access in the `_system` database of the source ArangoDB cluster.
223-
224-
### `spec.source.tls.caSecretName: string`
225-
226-
This setting specifies the name of a `Secret` containing a TLS CA certificate `ca.crt` used to verify
227-
the TLS connection created by the SyncMaster at the specified source.
228-
229-
This setting is required, unless `spec.source.deploymentName` has been set.
230-
231-
### `spec.destination.deploymentName: string`
232-
233-
This setting specifies the name of an `ArangoDeployment` resource that runs a cluster
234-
with sync enabled.
235-
236-
This cluster configured as the replication destination.
237-
238-
### `spec.destination.masterEndpoint: []string`
239-
240-
This setting specifies zero or more master endpoint URLs of the destination cluster.
241-
242-
Use this setting if the destination cluster is not running inside a Kubernetes cluster
243-
that is reachable from the Kubernetes cluster the `ArangoDeploymentReplication` resource is deployed in.
244-
245-
Specifying this setting and `spec.destination.deploymentName` at the same time is not allowed.
246-
247-
### `spec.destination.auth.keyfileSecretName: string`
248-
249-
This setting specifies the name of a `Secret` containing a client authentication certificate called `tls.keyfile` used to authenticate
250-
with the SyncMaster at the specified destination.
251-
252-
If `spec.destination.auth.userSecretName` has not been set,
253-
the client authentication certificate found in the secret with this name is also used to configure
254-
the synchronization and fetch the synchronization status.
255-
256-
This setting is required, unless `spec.destination.deploymentName` or `spec.destination.auth.userSecretName` has been set.
257-
258-
Specifying this setting and `spec.destination.userSecretName` at the same time is not allowed.
259-
260-
### `spec.destination.auth.userSecretName: string`
261-
262-
This setting specifies the name of a `Secret` containing a `username` & `password` used to authenticate
263-
with the SyncMaster at the specified destination in order to configure synchronization and fetch synchronization status.
264-
265-
The user identified by the username must have write access in the `_system` database of the destination ArangoDB cluster.
266-
267-
Specifying this setting and `spec.destination.keyfileSecretName` at the same time is not allowed.
268-
269-
### `spec.destination.tls.caSecretName: string`
270-
271-
This setting specifies the name of a `Secret` containing a TLS CA certificate `ca.crt` used to verify
272-
the TLS connection created by the SyncMaster at the specified destination.
273-
274-
This setting is required, unless `spec.destination.deploymentName` has been set.
275187

276188
## Authentication details
277189

docs/storage-resource.md

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ArangoLocalStorage Custom Resource
22

3+
[Full CustomResourceDefinition reference ->](./api/ArangoLocalStorage.V1Alpha.md)
4+
35
The ArangoDB Storage Operator creates and maintains ArangoDB
46
storage resources in a Kubernetes cluster, given a storage specification.
57
This storage specification is a `CustomResource` following
@@ -31,33 +33,3 @@ This definition results in:
3133

3234
The provisioned volumes will have a capacity that matches
3335
the requested capacity of volume claims.
34-
35-
## Specification reference
36-
37-
Below you'll find all settings of the `ArangoLocalStorage` custom resource.
38-
39-
### `spec.storageClass.name: string`
40-
41-
This setting specifies the name of the storage class that
42-
created `PersistentVolume` will use.
43-
44-
If empty, this field defaults to the name of the `ArangoLocalStorage`
45-
object.
46-
47-
If a `StorageClass` with given name does not yet exist, it
48-
will be created.
49-
50-
### `spec.storageClass.isDefault: bool`
51-
52-
This setting specifies if the created `StorageClass` will
53-
be marked as default storage class. (default is `false`)
54-
55-
### `spec.localPath: stringList`
56-
57-
This setting specifies one of more local directories
58-
(on the nodes) used to create persistent volumes in.
59-
60-
### `spec.nodeSelector: nodeSelector`
61-
62-
This setting specifies which nodes the operator will
63-
provision persistent volumes on.

internal/docs_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ import (
4040

4141
backupApi "github.com/arangodb/kube-arangodb/pkg/apis/backup/v1"
4242
deploymentApi "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
43+
replicationApi "github.com/arangodb/kube-arangodb/pkg/apis/replication/v1"
44+
storageApi "github.com/arangodb/kube-arangodb/pkg/apis/storage/v1alpha"
4345
"github.com/arangodb/kube-arangodb/pkg/util"
4446
)
4547

@@ -167,6 +169,16 @@ func Test_GenerateAPIDocs(t *testing.T) {
167169
"Status": backupApi.ArangoBackupPolicy{}.Status,
168170
},
169171
},
172+
fmt.Sprintf("%s/pkg/apis/replication/v1", root): {
173+
"ArangoDeploymentReplication.V1": {
174+
"Spec": replicationApi.ArangoDeploymentReplication{}.Spec,
175+
},
176+
},
177+
fmt.Sprintf("%s/pkg/apis/storage/v1alpha", root): {
178+
"ArangoLocalStorage.V1Alpha": {
179+
"Spec": storageApi.ArangoLocalStorage{}.Spec,
180+
},
181+
},
170182
}
171183

172184
resultPaths := make(map[string]string)

pkg/apis/replication/v1/endpoint_authentication_spec.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ import (
3131
type EndpointAuthenticationSpec struct {
3232
// KeyfileSecretName holds the name of a Secret containing a client authentication
3333
// certificate formatted at keyfile in a `tls.keyfile` field.
34+
// If `userSecretName` has not been set,
35+
// the client authentication certificate found in the secret with this name is also used to configure
36+
// the synchronization and fetch the synchronization status.
3437
KeyfileSecretName *string `json:"keyfileSecretName,omitempty"`
3538
// UserSecretName holds the name of a Secret containing a `username` & `password`
3639
// field used for basic authentication.

pkg/apis/replication/v1/endpoint_spec.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ import (
3232
// in either source or destination mode.
3333
type EndpointSpec struct {
3434
// DeploymentName holds the name of an ArangoDeployment resource.
35-
// If set this provides default values for masterEndpoint, auth & tls.
35+
// If set, this provides default values for masterEndpoint, auth & tls.
3636
DeploymentName *string `json:"deploymentName,omitempty"`
37-
// MasterEndpoint holds a list of URLs used to reach the syncmaster(s).
37+
// MasterEndpoint holds a list of URLs used to reach the syncmaster(s)
38+
// Use this setting if the source cluster is not running inside a Kubernetes cluster
39+
// that is reachable from the Kubernetes cluster the `ArangoDeploymentReplication` resource is deployed in.
40+
// Specifying this setting and `deploymentName` at the same time is not allowed.
41+
// +doc/default: []
3842
MasterEndpoint []string `json:"masterEndpoint,omitempty"`
3943
// Authentication holds settings needed to authentication at the syncmaster.
4044
Authentication EndpointAuthenticationSpec `json:"auth"`

pkg/apis/replication/v1/endpoint_tls_spec.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030
// in either source or destination endpoint.
3131
type EndpointTLSSpec struct {
3232
// CASecretName holds the name of a Secret containing a ca.crt public key for TLS validation.
33+
// This setting is required, unless `deploymentName` has been set.
3334
CASecretName *string `json:"caSecretName,omitempty"`
3435
}
3536

0 commit comments

Comments
 (0)