Skip to content

Commit

Permalink
(Documentation) Use Jekyll-compatible markers for section injection (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-vanyasin authored Oct 25, 2023
1 parent fc050c7 commit 013a2ce
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 17 deletions.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ The ArangoDB Kubernetes Operator is Production ready.

### Limits

<!-- START(limits) -->
[START_INJECT]: # (limits)

| Limit | Description | Community | Enterprise |
|:-------------------|:-----------------------------------------------------------------------------|:----------|:-----------|
| Cluster size limit | Limits of the nodes (DBServers & Coordinators) supported in the Cluster mode | 64 | 1024 |

<!-- END(limits) -->
[END_INJECT]: # (limits)

### Production readiness state

Expand All @@ -38,7 +39,8 @@ Kubernetes versions starting from 1.18 are supported and tested, charts and mani
The following table has the general readiness state, the table below
covers individual newer features separately.

<!-- START(kubernetesVersionsTable) -->
[START_INJECT]: # (kubernetesVersionsTable)

| Platform | Kubernetes Version | ArangoDB Version | State | Remarks | Provider Remarks |
|:--------------------|:-------------------|:-----------------|:-----------|:------------------------------------------|:-----------------------------------|
| Google GKE | 1.21-1.26 | >= 3.6.0 | Production | Don't use micro nodes | |
Expand All @@ -53,11 +55,12 @@ covers individual newer features separately.
| Minikube | 1.21-1.27 | >= 3.6.0 | Devel Only | | |
| Other | 1.21-1.27 | >= 3.6.0 | Devel Only | | |

<!-- END(kubernetesVersionsTable) -->
[END_INJECT]: # (kubernetesVersionsTable)

#### Operator Features

<!-- START(featuresCommunityTable) -->
[START_INJECT]: # (featuresCommunityTable)

| Feature | Operator Version | Introduced | ArangoDB Version | ArangoDB Edition | State | Enabled | Flag | Remarks |
|:------------------------------------------------------------------------------|:-----------------|:-----------|:-----------------|:----------------------|:-------------|:--------|:------------------------------------------------------|:-----------------------------------------------------------------------------------|
| Enforced ResignLeadership | 1.2.34 | 1.2.34 | >= 3.8.0 | Community, Enterprise | Production | True | --deployment.feature.enforced-resign-leadership | Enforce ResignLeadership and ensure that Leaders are moved from restarted DBServer |
Expand Down Expand Up @@ -86,21 +89,22 @@ covers individual newer features separately.
| Volume Claim Templates | 0.3.11 | 0.3.10 | >= 3.8.0 | Community, Enterprise | Production | True | N/A | N/A |
| Volume Resizing | 0.3.11 | 0.3.10 | >= 3.8.0 | Community, Enterprise | Production | True | N/A | N/A |

<!-- END(featuresCommunityTable) -->
[END_INJECT]: # (featuresCommunityTable)

#### Operator Enterprise Only Features

To upgrade to the Enterprise Edition, you need to get in touch with the ArangoDB team. [Contact us](https://www.arangodb.com/contact/) for more details.

<!-- START(featuresEnterpriseTable) -->
[START_INJECT]: # (featuresEnterpriseTable)

| Feature | Operator Version | Introduced | ArangoDB Version | ArangoDB Edition | State | Enabled | Flag | Remarks |
|:-------------------------------------------------------|:-----------------|:-----------|:-----------------|:-----------------|:-----------|:--------|:-----|:----------------------------------------------------------------------------|
| AgencyCache | 1.2.30 | 1.2.30 | >= 3.8.0 | Enterprise | Production | True | N/A | Enable Agency Cache mechanism in the Operator (Increase limit of the nodes) |
| Member Maintenance Support | 1.2.25 | 1.2.16 | >= 3.8.0 | Enterprise | Production | True | N/A | Enable Member Maintenance during planned restarts |
| [Rebalancer](docs/features/rebalancer.md) | 1.2.15 | 1.2.5 | >= 3.8.0 | Enterprise | Production | True | N/A | N/A |
| [TopologyAwareness](docs/design/topology_awareness.md) | 1.2.4 | 1.2.4 | >= 3.8.0 | Enterprise | Production | True | N/A | N/A |

<!-- END(featuresEnterpriseTable) -->
[END_INJECT]: # (featuresEnterpriseTable)

## Installation and Usage

Expand Down
13 changes: 8 additions & 5 deletions docs/generated/actions.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# ArangoDB Operator Metrics
# ArangoDB Operator Actions

## List

<!-- START(actionsTable) -->
[START_INJECT]: # (actionsTable)

| Action | Internal | Timeout | Optional | Edition | Description |
|:----------------------------------:|:--------:|:-------:|:--------:|:----------------------:|:------------------------------------------------------------------------------------------------------------------:|
| AddMember | no | 10m0s | no | Community & Enterprise | Adds new member to the Member list |
Expand Down Expand Up @@ -90,11 +91,12 @@
| WaitForMemberReady | no | 30m0s | no | Community & Enterprise | Wait for member Ready condition |
| WaitForMemberUp | no | 30m0s | no | Community & Enterprise | Wait for member to be responsive |

<!-- END(actionsTable) -->
[END_INJECT]: # (actionsTable)

## ArangoDeployment spec

<!-- START(actionsModYaml) -->
[START_INJECT]: # (actionsModYaml)

```yaml
spec:
timeouts:
Expand Down Expand Up @@ -185,4 +187,5 @@ spec:
WaitForMemberUp: 30m0s

```
<!-- END(actionsModYaml) -->

[END_INJECT]: # (actionsModYaml)
5 changes: 3 additions & 2 deletions docs/generated/metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## List of the Operator metrics

<!-- START(metricsTable) -->
[START_INJECT]: # (metricsTable)

| Name | Namespace | Group | Type | Description |
|:-------------------------------------------------------------------------------------------------------------------------------------:|:-----------------:|:-----------------:|:-------:|:--------------------------------------------------------------------------------------|
| [arangodb_operator_agency_errors](./arangodb_operator_agency_errors.md) | arangodb_operator | agency | Counter | Current count of agency cache fetch errors |
Expand Down Expand Up @@ -35,4 +36,4 @@
| [arangodb_operator_resources_arangodeploymentreplication_active](./arangodb_operator_resources_arangodeploymentreplication_active.md) | arangodb_operator | resources | Gauge | Defines if ArangoDeploymentReplication is configured and running |
| [arangodb_operator_resources_arangodeploymentreplication_failed](./arangodb_operator_resources_arangodeploymentreplication_failed.md) | arangodb_operator | resources | Gauge | Defines if ArangoDeploymentReplication is in Failed phase |

<!-- END(metricsTable) -->
[END_INJECT]: # (metricsTable)
11 changes: 9 additions & 2 deletions internal/md/sections.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func ReplaceSections(in string, sections map[string]string) (string, error) {
}

func ReplaceSection(in, replace, section string) (string, error) {
start, end := fmt.Sprintf("<!-- START(%s) -->", section), fmt.Sprintf("<!-- END(%s) -->", section)
start, end := fmt.Sprintf("\n[START_INJECT]: # (%s)\n", section), fmt.Sprintf("[END_INJECT]: # (%s)\n", section)

b := bytes.NewBuffer(nil)

Expand All @@ -78,7 +78,14 @@ func ReplaceSection(in, replace, section string) (string, error) {

endID := strings.Index(in, end)
if endID == -1 {
return "", errors.Newf("END sections is missing")
return "", errors.Newf("END_INJECT sections is missing for section %s. Note that newline is required at the end and before tag", section)
}

if strings.HasSuffix(replace, "\n\n") {
// if section ends with empty line, we don't need to write newline for END marker
end = strings.TrimLeft(end, "\n")
} else {
end = "\n" + end
}

b.WriteString(end)
Expand Down

0 comments on commit 013a2ce

Please sign in to comment.