Skip to content

Commit 013a2ce

Browse files
(Documentation) Use Jekyll-compatible markers for section injection (#1462)
1 parent fc050c7 commit 013a2ce

File tree

4 files changed

+32
-17
lines changed

4 files changed

+32
-17
lines changed

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ The ArangoDB Kubernetes Operator is Production ready.
1616

1717
### Limits
1818

19-
<!-- START(limits) -->
19+
[START_INJECT]: # (limits)
20+
2021
| Limit | Description | Community | Enterprise |
2122
|:-------------------|:-----------------------------------------------------------------------------|:----------|:-----------|
2223
| Cluster size limit | Limits of the nodes (DBServers & Coordinators) supported in the Cluster mode | 64 | 1024 |
2324

24-
<!-- END(limits) -->
25+
[END_INJECT]: # (limits)
2526

2627
### Production readiness state
2728

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

41-
<!-- START(kubernetesVersionsTable) -->
42+
[START_INJECT]: # (kubernetesVersionsTable)
43+
4244
| Platform | Kubernetes Version | ArangoDB Version | State | Remarks | Provider Remarks |
4345
|:--------------------|:-------------------|:-----------------|:-----------|:------------------------------------------|:-----------------------------------|
4446
| Google GKE | 1.21-1.26 | >= 3.6.0 | Production | Don't use micro nodes | |
@@ -53,11 +55,12 @@ covers individual newer features separately.
5355
| Minikube | 1.21-1.27 | >= 3.6.0 | Devel Only | | |
5456
| Other | 1.21-1.27 | >= 3.6.0 | Devel Only | | |
5557

56-
<!-- END(kubernetesVersionsTable) -->
58+
[END_INJECT]: # (kubernetesVersionsTable)
5759

5860
#### Operator Features
5961

60-
<!-- START(featuresCommunityTable) -->
62+
[START_INJECT]: # (featuresCommunityTable)
63+
6164
| Feature | Operator Version | Introduced | ArangoDB Version | ArangoDB Edition | State | Enabled | Flag | Remarks |
6265
|:------------------------------------------------------------------------------|:-----------------|:-----------|:-----------------|:----------------------|:-------------|:--------|:------------------------------------------------------|:-----------------------------------------------------------------------------------|
6366
| 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 |
@@ -86,21 +89,22 @@ covers individual newer features separately.
8689
| Volume Claim Templates | 0.3.11 | 0.3.10 | >= 3.8.0 | Community, Enterprise | Production | True | N/A | N/A |
8790
| Volume Resizing | 0.3.11 | 0.3.10 | >= 3.8.0 | Community, Enterprise | Production | True | N/A | N/A |
8891

89-
<!-- END(featuresCommunityTable) -->
92+
[END_INJECT]: # (featuresCommunityTable)
9093

9194
#### Operator Enterprise Only Features
9295

9396
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.
9497

95-
<!-- START(featuresEnterpriseTable) -->
98+
[START_INJECT]: # (featuresEnterpriseTable)
99+
96100
| Feature | Operator Version | Introduced | ArangoDB Version | ArangoDB Edition | State | Enabled | Flag | Remarks |
97101
|:-------------------------------------------------------|:-----------------|:-----------|:-----------------|:-----------------|:-----------|:--------|:-----|:----------------------------------------------------------------------------|
98102
| 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) |
99103
| Member Maintenance Support | 1.2.25 | 1.2.16 | >= 3.8.0 | Enterprise | Production | True | N/A | Enable Member Maintenance during planned restarts |
100104
| [Rebalancer](docs/features/rebalancer.md) | 1.2.15 | 1.2.5 | >= 3.8.0 | Enterprise | Production | True | N/A | N/A |
101105
| [TopologyAwareness](docs/design/topology_awareness.md) | 1.2.4 | 1.2.4 | >= 3.8.0 | Enterprise | Production | True | N/A | N/A |
102106

103-
<!-- END(featuresEnterpriseTable) -->
107+
[END_INJECT]: # (featuresEnterpriseTable)
104108

105109
## Installation and Usage
106110

docs/generated/actions.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# ArangoDB Operator Metrics
1+
# ArangoDB Operator Actions
22

33
## List
44

5-
<!-- START(actionsTable) -->
5+
[START_INJECT]: # (actionsTable)
6+
67
| Action | Internal | Timeout | Optional | Edition | Description |
78
|:----------------------------------:|:--------:|:-------:|:--------:|:----------------------:|:------------------------------------------------------------------------------------------------------------------:|
89
| AddMember | no | 10m0s | no | Community & Enterprise | Adds new member to the Member list |
@@ -90,11 +91,12 @@
9091
| WaitForMemberReady | no | 30m0s | no | Community & Enterprise | Wait for member Ready condition |
9192
| WaitForMemberUp | no | 30m0s | no | Community & Enterprise | Wait for member to be responsive |
9293

93-
<!-- END(actionsTable) -->
94+
[END_INJECT]: # (actionsTable)
9495

9596
## ArangoDeployment spec
9697

97-
<!-- START(actionsModYaml) -->
98+
[START_INJECT]: # (actionsModYaml)
99+
98100
```yaml
99101
spec:
100102
timeouts:
@@ -185,4 +187,5 @@ spec:
185187
WaitForMemberUp: 30m0s
186188

187189
```
188-
<!-- END(actionsModYaml) -->
190+
191+
[END_INJECT]: # (actionsModYaml)

docs/generated/metrics/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## List of the Operator metrics
44

5-
<!-- START(metricsTable) -->
5+
[START_INJECT]: # (metricsTable)
6+
67
| Name | Namespace | Group | Type | Description |
78
|:-------------------------------------------------------------------------------------------------------------------------------------:|:-----------------:|:-----------------:|:-------:|:--------------------------------------------------------------------------------------|
89
| [arangodb_operator_agency_errors](./arangodb_operator_agency_errors.md) | arangodb_operator | agency | Counter | Current count of agency cache fetch errors |
@@ -35,4 +36,4 @@
3536
| [arangodb_operator_resources_arangodeploymentreplication_active](./arangodb_operator_resources_arangodeploymentreplication_active.md) | arangodb_operator | resources | Gauge | Defines if ArangoDeploymentReplication is configured and running |
3637
| [arangodb_operator_resources_arangodeploymentreplication_failed](./arangodb_operator_resources_arangodeploymentreplication_failed.md) | arangodb_operator | resources | Gauge | Defines if ArangoDeploymentReplication is in Failed phase |
3738

38-
<!-- END(metricsTable) -->
39+
[END_INJECT]: # (metricsTable)

internal/md/sections.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func ReplaceSections(in string, sections map[string]string) (string, error) {
5656
}
5757

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

6161
b := bytes.NewBuffer(nil)
6262

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

7979
endID := strings.Index(in, end)
8080
if endID == -1 {
81-
return "", errors.Newf("END sections is missing")
81+
return "", errors.Newf("END_INJECT sections is missing for section %s. Note that newline is required at the end and before tag", section)
82+
}
83+
84+
if strings.HasSuffix(replace, "\n\n") {
85+
// if section ends with empty line, we don't need to write newline for END marker
86+
end = strings.TrimLeft(end, "\n")
87+
} else {
88+
end = "\n" + end
8289
}
8390

8491
b.WriteString(end)

0 commit comments

Comments
 (0)