mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
(Documentation) Improvements and fixes for rendered documentation (GH pages) (#1477)
This commit is contained in:
parent
562cb5ec6d
commit
b80bfb7423
20 changed files with 1031 additions and 1006 deletions
|
@ -1,6 +1,7 @@
|
|||
# Change Log
|
||||
|
||||
## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
|
||||
- (Documentation) Improvements and fixes for rendered documentation (GH pages)
|
||||
|
||||
## [1.2.35](https://github.com/arangodb/kube-arangodb/tree/1.2.35) (2023-11-06)
|
||||
- (Maintenance) Update go-driver to v1.6.0, update IsNotFound() checks
|
||||
|
|
|
@ -6,25 +6,25 @@
|
|||
|
||||
Iterations defines number of iterations before reaching MaxDelay. Default to 5
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec_backoff.go#L31)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec_backoff.go#L31)
|
||||
|
||||
### .spec.backoff.max_delay: integer
|
||||
|
||||
MaxDelay defines maximum delay in seconds. Default to 600
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec_backoff.go#L29)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec_backoff.go#L29)
|
||||
|
||||
### .spec.backoff.max_iterations: integer
|
||||
|
||||
MaxIterations defines maximum number of iterations after backoff will be disabled. Default to nil (no limit)
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec_backoff.go#L33)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec_backoff.go#L33)
|
||||
|
||||
### .spec.backoff.min_delay: integer
|
||||
|
||||
MinDelay defines minimum delay in seconds. Default to 30
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec_backoff.go#L27)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec_backoff.go#L27)
|
||||
|
||||
### .spec.deployment.name: string
|
||||
|
||||
|
@ -32,7 +32,7 @@ Name of the ArangoDeployment Custom Resource within same namespace as ArangoBack
|
|||
|
||||
This field is **immutable**: can't be changed after backup creation
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec.go#L54)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec.go#L54)
|
||||
|
||||
### .spec.download.credentialsSecretName: string
|
||||
|
||||
|
@ -43,7 +43,7 @@ Links:
|
|||
|
||||
This field is **immutable**: can't be changed after backup creation
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec.go#L81)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec.go#L81)
|
||||
|
||||
### .spec.download.id: string
|
||||
|
||||
|
@ -51,7 +51,7 @@ ID of the ArangoBackup to be downloaded
|
|||
|
||||
This field is **immutable**: can't be changed after backup creation
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec.go#L89)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec.go#L89)
|
||||
|
||||
### .spec.download.repositoryURL: string
|
||||
|
||||
|
@ -70,34 +70,34 @@ azure://test
|
|||
|
||||
This field is **immutable**: can't be changed after backup creation
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec.go#L77)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec.go#L77)
|
||||
|
||||
### .spec.lifetime: integer
|
||||
|
||||
Lifetime is the time after which the backup will be deleted. Format: "1.5h" or "2h45m".
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec.go#L47)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec.go#L47)
|
||||
|
||||
### .spec.options.allowInconsistent: boolean
|
||||
|
||||
AllowInconsistent flag for Backup creation request.
|
||||
If this value is set to true, backup is taken even if we are not able to acquire lock.
|
||||
|
||||
Default Value: false
|
||||
Default Value: `false`
|
||||
|
||||
This field is **immutable**: can't be changed after backup creation
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec.go#L66)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec.go#L66)
|
||||
|
||||
### .spec.options.timeout: number
|
||||
|
||||
Timeout for Backup creation request in seconds.
|
||||
|
||||
Default Value: 30
|
||||
Default Value: `30`
|
||||
|
||||
This field is **immutable**: can't be changed after backup creation
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec.go#L61)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec.go#L61)
|
||||
|
||||
### .spec.policyName: string
|
||||
|
||||
|
@ -105,7 +105,7 @@ PolicyName name of the ArangoBackupPolicy which created this Custom Resource
|
|||
|
||||
This field is **immutable**: can't be changed after backup creation
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec.go#L42)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec.go#L42)
|
||||
|
||||
### .spec.upload.credentialsSecretName: string
|
||||
|
||||
|
@ -116,7 +116,7 @@ Links:
|
|||
|
||||
This field is **immutable**: can't be changed after backup creation
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec.go#L81)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec.go#L81)
|
||||
|
||||
### .spec.upload.repositoryURL: string
|
||||
|
||||
|
@ -135,7 +135,7 @@ azure://test
|
|||
|
||||
This field is **immutable**: can't be changed after backup creation
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec.go#L77)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec.go#L77)
|
||||
|
||||
## Status
|
||||
|
||||
|
@ -143,67 +143,67 @@ This field is **immutable**: can't be changed after backup creation
|
|||
|
||||
Available Determines if we can restore from ArangoBackup
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_status.go#L36)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_status.go#L36)
|
||||
|
||||
### .status.backoff.iterations: integer
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_status_backoff.go#L30)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_status_backoff.go#L30)
|
||||
|
||||
### .status.backup.downloaded: boolean
|
||||
|
||||
Downloaded Determines if ArangoBackup has been downloaded.
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_status.go#L66)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_status.go#L66)
|
||||
|
||||
### .status.backup.id: string
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_status.go#L56)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_status.go#L56)
|
||||
|
||||
### .status.backup.imported: boolean
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_status.go#L67)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_status.go#L67)
|
||||
|
||||
### .status.backup.keys: array
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_status.go#L70)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_status.go#L70)
|
||||
|
||||
### .status.backup.numberOfDBServers: integer
|
||||
|
||||
NumberOfDBServers Cluster size of the Backup in ArangoDB
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_status.go#L62)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_status.go#L62)
|
||||
|
||||
### .status.backup.potentiallyInconsistent: boolean
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_status.go#L58)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_status.go#L58)
|
||||
|
||||
### .status.backup.sizeInBytes: integer
|
||||
|
||||
SizeInBytes Size of the Backup in ArangoDB.
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_status.go#L60)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_status.go#L60)
|
||||
|
||||
### .status.backup.uploaded: boolean
|
||||
|
||||
Uploaded Determines if ArangoBackup has been uploaded
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_status.go#L64)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_status.go#L64)
|
||||
|
||||
### .status.backup.version: string
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_status.go#L57)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_status.go#L57)
|
||||
|
||||
### .status.message: string
|
||||
|
||||
Message for the state this object is in.
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_state.go#L86)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_state.go#L86)
|
||||
|
||||
### .status.progress.jobID: string
|
||||
|
||||
JobID ArangoDB job ID for uploading or downloading
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_state.go#L109)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_state.go#L109)
|
||||
|
||||
### .status.progress.progress: string
|
||||
|
||||
|
@ -214,7 +214,7 @@ Example:
|
|||
90%
|
||||
```
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_state.go#L112)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_state.go#L112)
|
||||
|
||||
### .status.state: string
|
||||
|
||||
|
@ -235,5 +235,5 @@ Possible Values:
|
|||
* Failed - state for failure
|
||||
* Unavailable - state when Backup is not available on the ArangoDB. It can happen in case of upgrades, node restarts etc.
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_state.go#L80)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_state.go#L80)
|
||||
|
||||
|
|
|
@ -6,25 +6,25 @@
|
|||
|
||||
AllowConcurrent if false, ArangoBackup will not be created when previous Backups are not finished
|
||||
|
||||
Default Value: true
|
||||
Default Value: `true`
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_policy_spec.go#L35)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_policy_spec.go#L35)
|
||||
|
||||
### .spec.maxBackups: integer
|
||||
|
||||
MaxBackups defines how many backups should be kept in history (per deployment). Oldest healthy Backups will be deleted.
|
||||
If not specified or 0 then no limit is applied
|
||||
|
||||
Default Value: 0
|
||||
Default Value: `0`
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_policy_spec.go#L43)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_policy_spec.go#L43)
|
||||
|
||||
### .spec.schedule: string
|
||||
|
||||
Schedule is cron-compatible specification of backup schedule
|
||||
Parsed by https://godoc.org/github.com/robfig/cron
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_policy_spec.go#L32)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_policy_spec.go#L32)
|
||||
|
||||
### .spec.selector: meta.LabelSelector
|
||||
|
||||
|
@ -33,58 +33,58 @@ DeploymentSelector Selector definition for selecting matching ArangoBackup Custo
|
|||
Links:
|
||||
* [Kubernetes Documentation](https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#LabelSelector)
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_policy_spec.go#L39)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_policy_spec.go#L39)
|
||||
|
||||
### .spec.template.backoff.iterations: integer
|
||||
|
||||
Iterations defines number of iterations before reaching MaxDelay. Default to 5
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec_backoff.go#L31)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec_backoff.go#L31)
|
||||
|
||||
### .spec.template.backoff.max_delay: integer
|
||||
|
||||
MaxDelay defines maximum delay in seconds. Default to 600
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec_backoff.go#L29)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec_backoff.go#L29)
|
||||
|
||||
### .spec.template.backoff.max_iterations: integer
|
||||
|
||||
MaxIterations defines maximum number of iterations after backoff will be disabled. Default to nil (no limit)
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec_backoff.go#L33)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec_backoff.go#L33)
|
||||
|
||||
### .spec.template.backoff.min_delay: integer
|
||||
|
||||
MinDelay defines minimum delay in seconds. Default to 30
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec_backoff.go#L27)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec_backoff.go#L27)
|
||||
|
||||
### .spec.template.lifetime: integer
|
||||
|
||||
Lifetime is the time after which the backup will be deleted. Format: "1.5h" or "2h45m".
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_policy_spec.go#L61)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_policy_spec.go#L61)
|
||||
|
||||
### .spec.template.options.allowInconsistent: boolean
|
||||
|
||||
AllowInconsistent flag for Backup creation request.
|
||||
If this value is set to true, backup is taken even if we are not able to acquire lock.
|
||||
|
||||
Default Value: false
|
||||
Default Value: `false`
|
||||
|
||||
This field is **immutable**: can't be changed after backup creation
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec.go#L66)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec.go#L66)
|
||||
|
||||
### .spec.template.options.timeout: number
|
||||
|
||||
Timeout for Backup creation request in seconds.
|
||||
|
||||
Default Value: 30
|
||||
Default Value: `30`
|
||||
|
||||
This field is **immutable**: can't be changed after backup creation
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec.go#L61)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec.go#L61)
|
||||
|
||||
### .spec.template.upload.credentialsSecretName: string
|
||||
|
||||
|
@ -95,7 +95,7 @@ Links:
|
|||
|
||||
This field is **immutable**: can't be changed after backup creation
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec.go#L81)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec.go#L81)
|
||||
|
||||
### .spec.template.upload.repositoryURL: string
|
||||
|
||||
|
@ -114,7 +114,7 @@ azure://test
|
|||
|
||||
This field is **immutable**: can't be changed after backup creation
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_spec.go#L77)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_spec.go#L77)
|
||||
|
||||
## Status
|
||||
|
||||
|
@ -122,11 +122,11 @@ This field is **immutable**: can't be changed after backup creation
|
|||
|
||||
Message from the operator in case of failures - schedule not valid, ArangoBackupPolicy not valid
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_policy_status.go#L33)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_policy_status.go#L33)
|
||||
|
||||
### .status.scheduled: meta.Time
|
||||
|
||||
Scheduled Next scheduled time in UTC
|
||||
|
||||
[Code Reference](/pkg/apis/backup/v1/backup_policy_status.go#L31)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/backup/v1/backup_policy_status.go#L31)
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -7,14 +7,14 @@
|
|||
EnsureInSync if it is true then during cancellation process data consistency is required.
|
||||
Default value is true.
|
||||
|
||||
[Code Reference](/pkg/apis/replication/v1/replication_spec.go#L38)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/replication/v1/replication_spec.go#L38)
|
||||
|
||||
### .spec.cancellation.sourceReadOnly: boolean
|
||||
|
||||
SourceReadOnly if it true then after cancellation source data center should be in read-only mode.
|
||||
Default value is false.
|
||||
|
||||
[Code Reference](/pkg/apis/replication/v1/replication_spec.go#L41)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/replication/v1/replication_spec.go#L41)
|
||||
|
||||
### .spec.destination.auth.keyfileSecretName: string
|
||||
|
||||
|
@ -24,7 +24,7 @@ If `userSecretName` has not been set,
|
|||
the client authentication certificate found in the secret with this name is also used to configure
|
||||
the synchronization and fetch the synchronization status.
|
||||
|
||||
[Code Reference](/pkg/apis/replication/v1/endpoint_authentication_spec.go#L37)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/replication/v1/endpoint_authentication_spec.go#L37)
|
||||
|
||||
### .spec.destination.auth.userSecretName: string
|
||||
|
||||
|
@ -33,14 +33,14 @@ field used for basic authentication.
|
|||
The user identified by the username must have write access in the `_system` database
|
||||
of the ArangoDB cluster at the endpoint.
|
||||
|
||||
[Code Reference](/pkg/apis/replication/v1/endpoint_authentication_spec.go#L42)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/replication/v1/endpoint_authentication_spec.go#L42)
|
||||
|
||||
### .spec.destination.deploymentName: string
|
||||
|
||||
DeploymentName holds the name of an ArangoDeployment resource.
|
||||
If set, this provides default values for masterEndpoint, auth & tls.
|
||||
|
||||
[Code Reference](/pkg/apis/replication/v1/endpoint_spec.go#L36)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/replication/v1/endpoint_spec.go#L36)
|
||||
|
||||
### .spec.destination.masterEndpoint: array
|
||||
|
||||
|
@ -49,16 +49,16 @@ Use this setting if the source cluster is not running inside a Kubernetes cluste
|
|||
that is reachable from the Kubernetes cluster the `ArangoDeploymentReplication` resource is deployed in.
|
||||
Specifying this setting and `deploymentName` at the same time is not allowed.
|
||||
|
||||
Default Value: []
|
||||
Default Value: `[]`
|
||||
|
||||
[Code Reference](/pkg/apis/replication/v1/endpoint_spec.go#L42)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/replication/v1/endpoint_spec.go#L42)
|
||||
|
||||
### .spec.destination.tls.caSecretName: string
|
||||
|
||||
CASecretName holds the name of a Secret containing a ca.crt public key for TLS validation.
|
||||
This setting is required, unless `deploymentName` has been set.
|
||||
|
||||
[Code Reference](/pkg/apis/replication/v1/endpoint_tls_spec.go#L34)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/replication/v1/endpoint_tls_spec.go#L34)
|
||||
|
||||
### .spec.source.auth.keyfileSecretName: string
|
||||
|
||||
|
@ -68,7 +68,7 @@ If `userSecretName` has not been set,
|
|||
the client authentication certificate found in the secret with this name is also used to configure
|
||||
the synchronization and fetch the synchronization status.
|
||||
|
||||
[Code Reference](/pkg/apis/replication/v1/endpoint_authentication_spec.go#L37)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/replication/v1/endpoint_authentication_spec.go#L37)
|
||||
|
||||
### .spec.source.auth.userSecretName: string
|
||||
|
||||
|
@ -77,14 +77,14 @@ field used for basic authentication.
|
|||
The user identified by the username must have write access in the `_system` database
|
||||
of the ArangoDB cluster at the endpoint.
|
||||
|
||||
[Code Reference](/pkg/apis/replication/v1/endpoint_authentication_spec.go#L42)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/replication/v1/endpoint_authentication_spec.go#L42)
|
||||
|
||||
### .spec.source.deploymentName: string
|
||||
|
||||
DeploymentName holds the name of an ArangoDeployment resource.
|
||||
If set, this provides default values for masterEndpoint, auth & tls.
|
||||
|
||||
[Code Reference](/pkg/apis/replication/v1/endpoint_spec.go#L36)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/replication/v1/endpoint_spec.go#L36)
|
||||
|
||||
### .spec.source.masterEndpoint: array
|
||||
|
||||
|
@ -93,14 +93,14 @@ Use this setting if the source cluster is not running inside a Kubernetes cluste
|
|||
that is reachable from the Kubernetes cluster the `ArangoDeploymentReplication` resource is deployed in.
|
||||
Specifying this setting and `deploymentName` at the same time is not allowed.
|
||||
|
||||
Default Value: []
|
||||
Default Value: `[]`
|
||||
|
||||
[Code Reference](/pkg/apis/replication/v1/endpoint_spec.go#L42)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/replication/v1/endpoint_spec.go#L42)
|
||||
|
||||
### .spec.source.tls.caSecretName: string
|
||||
|
||||
CASecretName holds the name of a Secret containing a ca.crt public key for TLS validation.
|
||||
This setting is required, unless `deploymentName` has been set.
|
||||
|
||||
[Code Reference](/pkg/apis/replication/v1/endpoint_tls_spec.go#L34)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/replication/v1/endpoint_tls_spec.go#L34)
|
||||
|
||||
|
|
|
@ -6,34 +6,34 @@
|
|||
|
||||
LocalPath setting specifies one or more local directories (on the nodes) used to create persistent volumes in.
|
||||
|
||||
[Code Reference](/pkg/apis/storage/v1alpha/local_storage_spec.go#L36)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/storage/v1alpha/local_storage_spec.go#L36)
|
||||
|
||||
### .spec.nodeSelector: object
|
||||
|
||||
NodeSelector setting specifies which nodes the operator will provision persistent volumes on.
|
||||
|
||||
[Code Reference](/pkg/apis/storage/v1alpha/local_storage_spec.go#L43)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/storage/v1alpha/local_storage_spec.go#L43)
|
||||
|
||||
### .spec.podCustomization.priority: integer
|
||||
|
||||
Priority if defined, sets the priority for pods of storage provisioner
|
||||
|
||||
[Code Reference](/pkg/apis/storage/v1alpha/local_storage_pod_customization.go#L25)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/storage/v1alpha/local_storage_pod_customization.go#L25)
|
||||
|
||||
### .spec.privileged: boolean
|
||||
|
||||
Privileged if set, passes Privileged flag to SecurityContext for pods of storage provisioner
|
||||
|
||||
[Code Reference](/pkg/apis/storage/v1alpha/local_storage_spec.go#L45)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/storage/v1alpha/local_storage_spec.go#L45)
|
||||
|
||||
### .spec.storageClass.isDefault: boolean
|
||||
|
||||
IsDefault setting specifies if the created `StorageClass` will
|
||||
be marked as default storage class.
|
||||
|
||||
Default Value: false
|
||||
Default Value: `false`
|
||||
|
||||
[Code Reference](/pkg/apis/storage/v1alpha/storage_class_spec.go#L42)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/storage/v1alpha/storage_class_spec.go#L42)
|
||||
|
||||
### .spec.storageClass.name: string
|
||||
|
||||
|
@ -42,9 +42,9 @@ created `PersistentVolume` will use.
|
|||
If empty, this field defaults to the name of the `ArangoLocalStorage` object.
|
||||
If a `StorageClass` with given name does not yet exist, it will be created.
|
||||
|
||||
Default Value: ""
|
||||
Default Value: `""`
|
||||
|
||||
[Code Reference](/pkg/apis/storage/v1alpha/storage_class_spec.go#L38)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/storage/v1alpha/storage_class_spec.go#L38)
|
||||
|
||||
### .spec.storageClass.reclaimPolicy: core.PersistentVolumeReclaimPolicy
|
||||
|
||||
|
@ -53,7 +53,7 @@ ReclaimPolicy defines what happens to a persistent volume when released from its
|
|||
Links:
|
||||
* [Documentation of core.PersistentVolumeReclaimPolicy](https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming)
|
||||
|
||||
[Code Reference](/pkg/apis/storage/v1alpha/storage_class_spec.go#L46)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/storage/v1alpha/storage_class_spec.go#L46)
|
||||
|
||||
### .spec.tolerations: []core.Toleration
|
||||
|
||||
|
@ -62,5 +62,5 @@ Tolerations specifies the tolerations added to pods of storage provisioner
|
|||
Links:
|
||||
* [Documentation of core.Toleration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#toleration-v1-core)
|
||||
|
||||
[Code Reference](/pkg/apis/storage/v1alpha/local_storage_spec.go#L41)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/storage/v1alpha/local_storage_spec.go#L41)
|
||||
|
||||
|
|
|
@ -8,23 +8,23 @@ DeletionPriority define Deletion Priority.
|
|||
Higher value means higher priority. Default is 0.
|
||||
Example: set 1 for Coordinator which should be deleted first and scale down coordinators by one.
|
||||
|
||||
[Code Reference](/pkg/apis/deployment/v1/arango_member_spec.go#L47)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/deployment/v1/arango_member_spec.go#L47)
|
||||
|
||||
### .spec.deploymentUID: string
|
||||
|
||||
DeploymentUID define Deployment UID.
|
||||
|
||||
[Code Reference](/pkg/apis/deployment/v1/arango_member_spec.go#L36)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/deployment/v1/arango_member_spec.go#L36)
|
||||
|
||||
### .spec.group: integer
|
||||
|
||||
Group define Member Groups.
|
||||
|
||||
[Code Reference](/pkg/apis/deployment/v1/arango_member_spec.go#L31)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/deployment/v1/arango_member_spec.go#L31)
|
||||
|
||||
### .spec.id: string
|
||||
|
||||
[Code Reference](/pkg/apis/deployment/v1/arango_member_spec.go#L33)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/deployment/v1/arango_member_spec.go#L33)
|
||||
|
||||
### .spec.overrides.resources: core.ResourceRequirements
|
||||
|
||||
|
@ -33,7 +33,7 @@ Resources holds resource requests & limits. Overrides template provided on the g
|
|||
Links:
|
||||
* [Documentation of core.ResourceRequirements](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#resourcerequirements-v1-core)
|
||||
|
||||
[Code Reference](/pkg/apis/deployment/v1/arango_member_spec_overrides.go#L38)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/deployment/v1/arango_member_spec_overrides.go#L38)
|
||||
|
||||
### .spec.overrides.volumeClaimTemplate: core.PersistentVolumeClaim
|
||||
|
||||
|
@ -42,19 +42,19 @@ VolumeClaimTemplate specifies a template for volume claims. Overrides template p
|
|||
Links:
|
||||
* [Documentation of core.PersistentVolumeClaim](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#persistentvolumeclaim-v1-core)
|
||||
|
||||
[Code Reference](/pkg/apis/deployment/v1/arango_member_spec_overrides.go#L33)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/deployment/v1/arango_member_spec_overrides.go#L33)
|
||||
|
||||
### .spec.template.checksum: string
|
||||
|
||||
Checksum keep the Pod Spec Checksum (with ignored fields).
|
||||
|
||||
[Code Reference](/pkg/apis/deployment/v1/arango_member_pod_template.go#L60)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/deployment/v1/arango_member_pod_template.go#L60)
|
||||
|
||||
### .spec.template.endpoint: string
|
||||
|
||||
Deprecated: Endpoint is not saved into the template
|
||||
|
||||
[Code Reference](/pkg/apis/deployment/v1/arango_member_pod_template.go#L63)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/deployment/v1/arango_member_pod_template.go#L63)
|
||||
|
||||
### .spec.template.podSpec: core.PodTemplateSpec
|
||||
|
||||
|
@ -63,11 +63,11 @@ PodSpec specifies the Pod Spec used for this Member.
|
|||
Links:
|
||||
* [Documentation of core.PodTemplateSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#podtemplatespec-v1-core)
|
||||
|
||||
[Code Reference](/pkg/apis/deployment/v1/arango_member_pod_template.go#L54)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/deployment/v1/arango_member_pod_template.go#L54)
|
||||
|
||||
### .spec.template.podSpecChecksum: string
|
||||
|
||||
PodSpecChecksum keep the Pod Spec Checksum (without ignored fields).
|
||||
|
||||
[Code Reference](/pkg/apis/deployment/v1/arango_member_pod_template.go#L57)
|
||||
[Code Reference](https://github.com/arangodb/kube-arangodb/blob/1.2.35/pkg/apis/deployment/v1/arango_member_pod_template.go#L57)
|
||||
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
- [Enable maintenance mode](maintenance.md)
|
||||
- [Override detected total memory](override_detected_memory.md)
|
||||
- [Manually recover cluster if you still have volumes with data](recovery.md)
|
||||
- [How to rotate Pod](rotate-pod.md)
|
||||
- [Rotate Pod](rotate-pod.md)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Additional configuration
|
||||
# How to pass additional params to operator
|
||||
|
||||
It is possible to additionally fine-tune operator behavior by
|
||||
providing arguments via `operator.args` chart template value.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Architecture change
|
||||
# How to change architecture / enable ARM support
|
||||
|
||||
Currently `AMD64` is a default architecture in the operator
|
||||
To enable `ARM64` support in operator add following config in kube-arangodb chart:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Configuring timezone
|
||||
# How to configure timezone
|
||||
|
||||
To set timezone for cluster components, mount the required timezone into container
|
||||
by adjusting `spec.<group>` of ArangoDeployment resource:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Collecting debug data
|
||||
# How to collect debug data
|
||||
|
||||
## Agency dump
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Logging configuration
|
||||
# How to configure logging
|
||||
|
||||
## Operator logging
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Maintenance mode
|
||||
# How to use maintenance mode
|
||||
|
||||
## ArangoDeployment maintenance
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Override detected total memory
|
||||
# How to override detected total memory
|
||||
|
||||
## overrideDetectedTotalMemory
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Manual Recovery
|
||||
# How to recover a destroyed deployment
|
||||
|
||||
## Overview
|
||||
Let's consider a situation where we had a ArangoDeployment in Cluster mode (3 DbServers, 3 Coordinators, 3 Agents)
|
||||
Let's consider a situation where we had an ArangoDeployment in Cluster mode (3 DbServers, 3 Coordinators, 3 Agents)
|
||||
with Local storage attached (only one K8s Node in the K8s cluster).
|
||||
|
||||
Due to some reason the ArangoDeployment was deleted (e.g. ETCD storage has been wiped out) and we want to recover it.
|
||||
|
@ -75,6 +75,7 @@ EOF
|
|||
## Create PV and PVC
|
||||
|
||||
1. We need to create ArangoLocalStorage first:
|
||||
|
||||
```yaml
|
||||
cat <<EOF | kubectl apply -f -
|
||||
apiVersion: "storage.arangodb.com/v1alpha"
|
||||
|
@ -89,113 +90,124 @@ EOF
|
|||
- /mnt/data
|
||||
EOF
|
||||
```
|
||||
2. Now create PV and PVC for every directory listed above
|
||||
- Agents - here is an example for `AGNT-pntg5yc8`(`f9rs2htwc9e0bzme` directory)
|
||||
- PV
|
||||
```yaml
|
||||
cat <<EOF | kubectl apply -f -
|
||||
apiVersion: "v1"
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
labels:
|
||||
arango_deployment: cluster
|
||||
role: agent
|
||||
name: agent-pntg5yc8-f9rs2htwc9e0bzme
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
local:
|
||||
path: /mnt/data/f9rs2htwc9e0bzme
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: my-local-ssd
|
||||
volumeMode: Filesystem
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- minikube
|
||||
EOF
|
||||
```
|
||||
- PVC
|
||||
```yaml
|
||||
cat <<EOF | kubectl apply -f -
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
labels:
|
||||
app: arangodb
|
||||
arango_deployment: cluster
|
||||
role: agent
|
||||
name: agent-pntg5yc8
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
|
||||
3. Now create PV and PVC for every directory listed above
|
||||
|
||||
- **Agents** - here is an example for `AGNT-pntg5yc8`(`f9rs2htwc9e0bzme` directory)
|
||||
|
||||
- PV
|
||||
|
||||
```yaml
|
||||
cat <<EOF | kubectl apply -f -
|
||||
apiVersion: "v1"
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
labels:
|
||||
arango_deployment: cluster
|
||||
role: agent
|
||||
name: agent-pntg5yc8-f9rs2htwc9e0bzme
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
storageClassName: my-local-ssd
|
||||
volumeMode: Filesystem
|
||||
volumeName: agent-pntg5yc8-f9rs2htwc9e0bzme
|
||||
EOF
|
||||
```
|
||||
- DbServers - here is an example for `PRMR-9xztmg4t` (`vka6ic19qcl1y3ec` directory)
|
||||
- PV
|
||||
```yaml
|
||||
cat <<EOF | kubectl apply -f -
|
||||
apiVersion: "v1"
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
labels:
|
||||
arango_deployment: cluster
|
||||
role: dbserver
|
||||
name: dbserver-9xztmg4t-vka6ic19qcl1y3ec
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
local:
|
||||
path: /mnt/data/vka6ic19qcl1y3ec
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: my-local-ssd
|
||||
volumeMode: Filesystem
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- minikube
|
||||
EOF
|
||||
```
|
||||
- PVC
|
||||
```yaml
|
||||
cat <<EOF | kubectl apply -f -
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
labels:
|
||||
app: arangodb
|
||||
arango_deployment: cluster
|
||||
role: dbserver
|
||||
name: dbserver-9xztmg4t
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
local:
|
||||
path: /mnt/data/f9rs2htwc9e0bzme
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: my-local-ssd
|
||||
volumeMode: Filesystem
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- minikube
|
||||
EOF
|
||||
```
|
||||
|
||||
- PVC
|
||||
|
||||
```yaml
|
||||
cat <<EOF | kubectl apply -f -
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
labels:
|
||||
app: arangodb
|
||||
arango_deployment: cluster
|
||||
role: agent
|
||||
name: agent-pntg5yc8
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: my-local-ssd
|
||||
volumeMode: Filesystem
|
||||
volumeName: agent-pntg5yc8-f9rs2htwc9e0bzme
|
||||
EOF
|
||||
```
|
||||
|
||||
- **DbServers** - here is an example for `PRMR-9xztmg4t` (`vka6ic19qcl1y3ec` directory)
|
||||
|
||||
- PV
|
||||
|
||||
```yaml
|
||||
cat <<EOF | kubectl apply -f -
|
||||
apiVersion: "v1"
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
labels:
|
||||
arango_deployment: cluster
|
||||
role: dbserver
|
||||
name: dbserver-9xztmg4t-vka6ic19qcl1y3ec
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
storageClassName: my-local-ssd
|
||||
volumeMode: Filesystem
|
||||
volumeName: dbserver-9xztmg4t-vka6ic19qcl1y3ec
|
||||
EOF
|
||||
```
|
||||
local:
|
||||
path: /mnt/data/vka6ic19qcl1y3ec
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: my-local-ssd
|
||||
volumeMode: Filesystem
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- minikube
|
||||
EOF
|
||||
```
|
||||
|
||||
- PVC
|
||||
|
||||
```yaml
|
||||
cat <<EOF | kubectl apply -f -
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
labels:
|
||||
app: arangodb
|
||||
arango_deployment: cluster
|
||||
role: dbserver
|
||||
name: dbserver-9xztmg4t
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: my-local-ssd
|
||||
volumeMode: Filesystem
|
||||
volumeName: dbserver-9xztmg4t-vka6ic19qcl1y3ec
|
||||
EOF
|
||||
```
|
||||
|
||||
### Create ArangoDeployment with previously created PVC
|
||||
|
||||
|
@ -264,7 +276,7 @@ status:
|
|||
persistentVolumeClaim:
|
||||
name: cluster-dbserver-31akmzrp
|
||||
persistentVolumeClaimName: cluster-dbserver-31akmzrp
|
||||
EOF
|
||||
EOF
|
||||
```
|
||||
|
||||
That's it! Now you can use ArangoDB with restored data.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Set root user password
|
||||
# How to set root user password
|
||||
|
||||
1) Create a kubernetes [Secret](https://kubernetes.io/docs/tasks/configmap-secret/managing-secret-using-kubectl/) with root password:
|
||||
```bash
|
||||
|
|
1
go.mod
1
go.mod
|
@ -31,6 +31,7 @@ require (
|
|||
//github.com/arangodb/rebalancer v0.1.1
|
||||
//github.com/arangodb/go-agency-helper v0.3.0
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible
|
||||
github.com/coreos/go-semver v0.3.1
|
||||
github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9
|
||||
github.com/gin-gonic/gin v1.9.1
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible
|
||||
|
|
7
go.sum
7
go.sum
|
@ -136,6 +136,8 @@ github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkE
|
|||
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
|
||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4=
|
||||
github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec=
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
|
@ -190,7 +192,6 @@ github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vb
|
|||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
||||
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
|
||||
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
|
||||
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
|
||||
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
|
@ -1008,8 +1009,6 @@ google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEc
|
|||
google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
|
||||
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
|
||||
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
|
||||
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w=
|
||||
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
|
||||
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A=
|
||||
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
|
@ -1039,8 +1038,6 @@ google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD
|
|||
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
||||
google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc=
|
||||
google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw=
|
||||
google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc=
|
||||
google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
||||
|
|
|
@ -28,10 +28,12 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/go-semver/semver"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
backupApi "github.com/arangodb/kube-arangodb/pkg/apis/backup/v1"
|
||||
|
@ -41,7 +43,7 @@ import (
|
|||
"github.com/arangodb/kube-arangodb/pkg/util"
|
||||
)
|
||||
|
||||
func (d DocDefinitions) RenderMarkdown(t *testing.T) []byte {
|
||||
func (d DocDefinitions) RenderMarkdown(t *testing.T, repositoryPath string) []byte {
|
||||
out := bytes.NewBuffer(nil)
|
||||
|
||||
for _, el := range d {
|
||||
|
@ -105,7 +107,7 @@ func (d DocDefinitions) RenderMarkdown(t *testing.T) []byte {
|
|||
write(t, out, "\n")
|
||||
} else {
|
||||
if d := el.Default; d != nil {
|
||||
write(t, out, "Default Value: %s\n\n", *d)
|
||||
write(t, out, "Default Value: `%s`\n\n", *d)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -113,7 +115,7 @@ func (d DocDefinitions) RenderMarkdown(t *testing.T) []byte {
|
|||
write(t, out, "This field is **immutable**: %s\n\n", *d)
|
||||
}
|
||||
|
||||
write(t, out, "[Code Reference](/%s#L%d)\n\n", el.File, el.Line)
|
||||
write(t, out, "[Code Reference](%s/%s#L%d)\n\n", repositoryPath, el.File, el.Line)
|
||||
}
|
||||
|
||||
return out.Bytes()
|
||||
|
@ -163,12 +165,24 @@ func Test_GenerateAPIDocs(t *testing.T) {
|
|||
generateIndex(t, resultPaths)
|
||||
}
|
||||
|
||||
func prepareGitHubTreePath(t *testing.T, root string) string {
|
||||
vStr, err := os.ReadFile(filepath.Join(root, "VERSION"))
|
||||
require.NoError(t, err, "failed to read VERSION file")
|
||||
opVersion, err := semver.NewVersion(string(vStr))
|
||||
require.NoError(t, err)
|
||||
|
||||
ref := fmt.Sprintf("%d.%d.%d", opVersion.Major, opVersion.Minor, opVersion.Patch)
|
||||
return fmt.Sprintf("https://github.com/arangodb/kube-arangodb/blob/%s", ref)
|
||||
}
|
||||
|
||||
func generateDocs(t *testing.T, objects map[string]map[string]interface{}, fields map[string]*ast.Field, fs *token.FileSet) map[string]string {
|
||||
root := os.Getenv("ROOT")
|
||||
require.NotEmpty(t, root)
|
||||
|
||||
outPaths := make(map[string]string)
|
||||
|
||||
repositoryPath := prepareGitHubTreePath(t, root)
|
||||
|
||||
for objectName, sections := range objects {
|
||||
t.Run(objectName, func(t *testing.T) {
|
||||
renderSections := map[string][]byte{}
|
||||
|
@ -180,7 +194,7 @@ func generateDocs(t *testing.T, objects map[string]map[string]interface{}, field
|
|||
defs := parseDocDefinitions(t, sectionParsed, fs)
|
||||
defs.Sort()
|
||||
|
||||
renderSections[section] = defs.RenderMarkdown(t)
|
||||
renderSections[section] = defs.RenderMarkdown(t, repositoryPath)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue