Skip to content

Commit 33ef204

Browse files
authored
Merge pull request #104 from arangodb/title-case-enums
BREAKING CHANGE: Renamed all enum values to title case
2 parents bb2daf8 + d5cd274 commit 33ef204

File tree

15 files changed

+51
-50
lines changed

15 files changed

+51
-50
lines changed

docs/Manual/GettingStarted/kube-arangodb/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ kind: "ArangoDeployment"
6161
metadata:
6262
name: "single-server"
6363
spec:
64-
mode: single
64+
mode: Single
6565
```
6666
6767
Now insert this resource in your Kubernetes cluster using:
@@ -164,7 +164,7 @@ kind: "ArangoDeployment"
164164
metadata:
165165
name: "cluster"
166166
spec:
167-
mode: cluster
167+
mode: Cluster
168168
```
169169

170170
Now insert this resource in your Kubernetes cluster using:

docs/Manual/Programs/kube-arangodb/config_and_secrets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ kind: "Cluster"
3434
metadata:
3535
name: "example-arangodb-cluster"
3636
spec:
37-
mode: cluster
37+
mode: Cluster
3838
auth:
3939
jwtSecretName: <name-of-JWT-token-secret>
4040
```

docs/Manual/Programs/kube-arangodb/deployment_resource.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ kind: "ArangoDeployment"
1313
metadata:
1414
name: "example-arangodb-cluster"
1515
spec:
16-
mode: cluster
16+
mode: Cluster
1717
```
1818
1919
Example more elaborate deployment definition:
@@ -24,7 +24,8 @@ kind: "ArangoDeployment"
2424
metadata:
2525
name: "example-arangodb-cluster"
2626
spec:
27-
mode: cluster
27+
mode: Cluster
28+
environment: Production
2829
agents:
2930
count: 3
3031
args:
@@ -50,21 +51,21 @@ Below you'll find all settings of the `ArangoDeployment` custom resource.
5051
Several settings are for various groups of servers. These are indicated
5152
with `<group>` where `<group>` can be any of:
5253

53-
- `agents` for all agents of a `cluster` or `resilientsingle` pair.
54-
- `dbservers` for all dbservers of a `cluster`.
55-
- `coordinators` for all coordinators of a `cluster`.
56-
- `single` for all single servers of a `single` instance or `resilientsingle` pair.
57-
- `syncmasters` for all syncmasters of a `cluster`.
58-
- `syncworkers` for all syncworkers of a `cluster`.
54+
- `agents` for all agents of a `Cluster` or `ResilientSingle` pair.
55+
- `dbservers` for all dbservers of a `Cluster`.
56+
- `coordinators` for all coordinators of a `Cluster`.
57+
- `single` for all single servers of a `Single` instance or `ResilientSingle` pair.
58+
- `syncmasters` for all syncmasters of a `Cluster`.
59+
- `syncworkers` for all syncworkers of a `Cluster`.
5960

6061
### `spec.mode: string`
6162

6263
This setting specifies the type of deployment you want to create.
6364
Possible values are:
6465

65-
- `cluster` (default) Full cluster. Defaults to 3 agents, 3 dbservers & 3 coordinators.
66-
- `resilientsingle` Resilient single pair. Defaults to 3 agents and 2 single servers.
67-
- `single` Single server only (note this does not provide high availability or reliability).
66+
- `Cluster` (default) Full cluster. Defaults to 3 agents, 3 dbservers & 3 coordinators.
67+
- `ResilientSingle` Resilient single pair. Defaults to 3 agents and 2 single servers.
68+
- `Single` Single server only (note this does not provide high availability or reliability).
6869

6970
This setting cannot be changed after the deployment has been created.
7071

@@ -73,9 +74,9 @@ This setting cannot be changed after the deployment has been created.
7374
This setting specifies the type of environment in which the deployment is created.
7475
Possible values are:
7576

76-
- `development` (default) This value optimizes the deployment for development
77+
- `Development` (default) This value optimizes the deployment for development
7778
use. It is possible to run a deployment on a small number of nodes (e.g. minikube).
78-
- `production` This value optimizes the deployment for production use.
79+
- `Production` This value optimizes the deployment for production use.
7980
It puts required affinity constraints on all pods to avoid agents & dbservers
8081
from running on the same machine.
8182

@@ -101,8 +102,8 @@ This setting specifies the type of storage engine used for all servers
101102
in the cluster.
102103
Possible values are:
103104

104-
- `mmfiles` To use the MMfiles storage engine.
105-
- `rocksdb` (default) To use the RocksDB storage engine.
105+
- `MMFiles` To use the MMfiles storage engine.
106+
- `RocksDB` (default) To use the RocksDB storage engine.
106107

107108
This setting cannot be changed after the cluster has been created.
108109

@@ -211,7 +212,7 @@ The default value is empty.
211212
This setting sets the type of message queue used by ArangoSync.
212213
Possible values are:
213214

214-
- `direct` (default) for direct HTTP connections between the 2 data centers.
215+
- `Direct` (default) for direct HTTP connections between the 2 data centers.
215216

216217
### `spec.sync.tls.caSecretName: string`
217218

docs/Manual/Programs/kube-arangodb/storage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SSD storage.
2424

2525
To accomplish this, one must create `PersistentVolumes` for all servers that
2626
need persistent storage (single, agents & dbservers).
27-
E.g. for a `cluster` with 3 agents and 5 dbservers, you must create 8 volumes.
27+
E.g. for a `Cluster` with 3 agents and 5 dbservers, you must create 8 volumes.
2828

2929
Note that each volume must have a capacity that is equal to or higher than the
3030
capacity needed for each server.

examples/simple-cluster-no-tls.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ kind: "ArangoDeployment"
33
metadata:
44
name: "example-simple-cluster-no-tls"
55
spec:
6-
mode: cluster
6+
mode: Cluster
77
tls:
88
caSecretName: None

examples/simple-cluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: "ArangoDeployment"
33
metadata:
44
name: "example-simple-cluster"
55
spec:
6-
mode: cluster
6+
mode: Cluster
77
image: arangodb/arangodb:3.3.4
88
tls:
99
altNames: ["kube-01", "kube-02", "kube-03"]

examples/single-server-no-auth.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: "ArangoDeployment"
33
metadata:
44
name: "example-simple-single-no-auth"
55
spec:
6-
mode: single
6+
mode: Single
77
auth:
88
jwtSecretName: None
99

examples/single-server.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ kind: "ArangoDeployment"
33
metadata:
44
name: "example-simple-single"
55
spec:
6-
mode: single
6+
mode: Single
77
single:
88
storageClassName: my-local-ssd

pkg/apis/deployment/v1alpha/deployment_mode.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ type DeploymentMode string
3131

3232
const (
3333
// DeploymentModeSingle yields a single server
34-
DeploymentModeSingle DeploymentMode = "single"
34+
DeploymentModeSingle DeploymentMode = "Single"
3535
// DeploymentModeResilientSingle yields an agency and a resilient-single server pair
36-
DeploymentModeResilientSingle DeploymentMode = "resilientsingle"
36+
DeploymentModeResilientSingle DeploymentMode = "ResilientSingle"
3737
// DeploymentModeCluster yields an full cluster (agency, dbservers & coordinators)
38-
DeploymentModeCluster DeploymentMode = "cluster"
38+
DeploymentModeCluster DeploymentMode = "Cluster"
3939
)
4040

4141
// Validate the mode.
@@ -49,22 +49,22 @@ func (m DeploymentMode) Validate() error {
4949
}
5050
}
5151

52-
// HasSingleServers returns true when the given mode is "single" or "resilientsingle".
52+
// HasSingleServers returns true when the given mode is "Single" or "ResilientSingle".
5353
func (m DeploymentMode) HasSingleServers() bool {
5454
return m == DeploymentModeSingle || m == DeploymentModeResilientSingle
5555
}
5656

57-
// HasAgents returns true when the given mode is "resilientsingle" or "cluster".
57+
// HasAgents returns true when the given mode is "ResilientSingle" or "Cluster".
5858
func (m DeploymentMode) HasAgents() bool {
5959
return m == DeploymentModeResilientSingle || m == DeploymentModeCluster
6060
}
6161

62-
// HasDBServers returns true when the given mode is "cluster".
62+
// HasDBServers returns true when the given mode is "Cluster".
6363
func (m DeploymentMode) HasDBServers() bool {
6464
return m == DeploymentModeCluster
6565
}
6666

67-
// HasCoordinators returns true when the given mode is "cluster".
67+
// HasCoordinators returns true when the given mode is "Cluster".
6868
func (m DeploymentMode) HasCoordinators() bool {
6969
return m == DeploymentModeCluster
7070
}

pkg/apis/deployment/v1alpha/deployment_mode_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ import (
3030

3131
func TestDeploymentModeValidate(t *testing.T) {
3232
// Valid
33-
assert.Nil(t, DeploymentMode("single").Validate())
34-
assert.Nil(t, DeploymentMode("resilientsingle").Validate())
35-
assert.Nil(t, DeploymentMode("cluster").Validate())
33+
assert.Nil(t, DeploymentMode("Single").Validate())
34+
assert.Nil(t, DeploymentMode("ResilientSingle").Validate())
35+
assert.Nil(t, DeploymentMode("Cluster").Validate())
3636

3737
// Not valid
3838
assert.Error(t, DeploymentMode("").Validate())
3939
assert.Error(t, DeploymentMode(" cluster").Validate())
4040
assert.Error(t, DeploymentMode("singles").Validate())
41-
assert.Error(t, DeploymentMode("Single").Validate())
42-
assert.Error(t, DeploymentMode("Resilientsingle").Validate())
43-
assert.Error(t, DeploymentMode("Cluster").Validate())
41+
assert.Error(t, DeploymentMode("single").Validate())
42+
assert.Error(t, DeploymentMode("resilientsingle").Validate())
43+
assert.Error(t, DeploymentMode("cluster").Validate())
4444
}
4545

4646
func TestDeploymentModeHasX(t *testing.T) {

0 commit comments

Comments
 (0)