Skip to content

Commit faa4199

Browse files
committed
Merge branch 'master' into feature/helm-chart
2 parents a02a7cb + 448f340 commit faa4199

File tree

2 files changed

+77
-4
lines changed

2 files changed

+77
-4
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Operator Dashboards
2+
3+
The ArangoDB Kubernetes Operator can create a dashboard for each type of
4+
resource it supports. These dashboards are intended to give an overview of
5+
the created resources, their state and instructions on how to modify those resources.
6+
7+
The dashboards do not provide direct means to modify the resources.
8+
All modifications are done using `kubectl` commands (which are provided by the dashboards)
9+
so the standard security of your Kubernetes cluster is not bypassed.
10+
11+
## Exposing the dashboards
12+
13+
For each resource type (deployment, deployment replication & local storage) operator
14+
a `Service` is created that serves the dashboard internally in the Kubernetes cluster.
15+
To expose a dashboard outside the Kubernetes cluster, run a `kubecty expose`
16+
command like this:
17+
18+
```bash
19+
kubectl expose service <service-name> --type=LoadBalancer \
20+
--port=8528 --target-port=8528 \
21+
--name=<your-exposed-service-name> --namespace=<the-namespace>
22+
```
23+
24+
Replace `<service-name>` with:
25+
26+
- `arango-deployment-operator` for the ArangoDeployment operator dashboard.
27+
- `arango-deployment-replication-operator` for the ArangoDeploymentReplication
28+
operator dashboard.
29+
- `arango-storage-operator` for the ArangoLocalStorage operator dashboard.
30+
(use 'kube-system' namespace)
31+
32+
Replace `<the-namespace>` with the name of the namespace that the operator is in.
33+
This will often be `default`.
34+
35+
This will create an additional `Service` of type `LoadBalancer` that copies
36+
the selector from the existing `Service`.
37+
If your Kubernetes cluster does not support loadbalancers,
38+
use `--type=NodePort` instead.
39+
40+
Run the following command to inspect your new service and look for the
41+
loadbalancer IP/host address (or nodeport).
42+
43+
```bash
44+
kubectl get service <your-exposed-service-name> --namespace=<the-namespace>
45+
```
46+
47+
This will result in something like this:
48+
49+
```bash
50+
$ kubectl get service arango-storage-operator-lb --namespace=kube-system
51+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
52+
arango-storage-operator-lb LoadBalancer 10.103.30.24 192.168.31.11 8528:30655/TCP 1d
53+
```
54+
55+
## Authentication
56+
57+
While the dashboards do not provide any means to directly modify resources,
58+
they still show sensitive information (e.g. TLS certificates).
59+
Therefore the dashboards require a username+password for authentications.
60+
61+
The username+password pair is configured in a generic Kubernetes `Secret` named `arangodb-operator-dashboard`, found in the namespace where the operator runs.
62+
63+
To create such a secret, run this:
64+
65+
```bash
66+
kubectl create secret generic \
67+
arangodb-operator-dashboard --namespace=<the-namespace> \
68+
--from-literal=username=<username> \
69+
--from-literal=password=<password>
70+
```
71+
72+
Until such a `Secret` is found, the operator will respond with a status `401`
73+
to any request related to the dashboard.

tests/member_resilience_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ func TestMemberResilienceDBServers(t *testing.T) {
278278
t.Fatalf("Failed to get deployment: %v", err)
279279
}
280280

281-
// Pick a coordinator to be deleted 5 times
281+
// Pick a dbserver to be deleted 5 times
282282
targetServer := apiObject.Status.Members.DBServers[0]
283283
for i := 0; i < 5; i++ {
284284
// Get current pod so we can compare UID later
@@ -301,8 +301,8 @@ func TestMemberResilienceDBServers(t *testing.T) {
301301
}
302302
return nil
303303
}
304-
if err := retry.Retry(op, time.Minute); err != nil {
305-
t.Fatalf("Pod did not restart: %v", err)
304+
if err := retry.Retry(op, time.Minute*2); err != nil {
305+
t.Fatalf("Pod %d did not restart: %v", i, err)
306306
}
307307
} else {
308308
// Wait for member to be replaced
@@ -316,7 +316,7 @@ func TestMemberResilienceDBServers(t *testing.T) {
316316
}
317317
return nil
318318
}
319-
if err := retry.Retry(op, time.Minute); err != nil {
319+
if err := retry.Retry(op, time.Minute*2); err != nil {
320320
t.Fatalf("Member failure did not succeed: %v", err)
321321
}
322322
}

0 commit comments

Comments
 (0)