Skip to content

Commit dfabdb6

Browse files
committed
[Feature] ArangoDB Bootstrap
1 parent a2468b3 commit dfabdb6

22 files changed

+748
-208
lines changed

Makefile

+8-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ SOURCES := $(shell $(SOURCES_QUERY))
244244
NON_EE_SOURCES_QUERY := $(SOURCES_QUERY) ! -name '*.enterprise.go'
245245
NON_EE_SOURCES := $(shell $(NON_EE_SOURCES_QUERY))
246246

247-
YAML_EXCLUDE_DIRS := vendor .gobuild deps tools pkg/generated/clientset pkg/generated/informers pkg/generated/listers chart/kube-arangodb/templates chart/kube-arangodb-crd/templates chart/arangodb-ingress-proxy/templates
247+
YAML_EXCLUDE_DIRS := vendor .gobuild deps tools pkg/generated/clientset pkg/generated/informers pkg/generated/listers chart/kube-arangodb/templates chart/kube-arangodb-crd/templates chart/arangodb-ingress-proxy/templates chart/arangodb-bootstrap/templates
248248
YAML_EXCLUDE_FILES :=
249249
YAML_QUERY := find ./ -type f -name '*.yaml' $(foreach EXCLUDE_DIR,$(YAML_EXCLUDE_DIRS), ! -path "*/$(EXCLUDE_DIR)/*") $(foreach EXCLUDE_FILE,$(YAML_EXCLUDE_FILES), ! -path "*/$(EXCLUDE_FILE)")
250250
YAMLS := $(shell $(YAML_QUERY))
@@ -573,6 +573,13 @@ $(eval $(call manifest-generator, all, kube-arangodb, \
573573
--set "operator.features.k8sToK8sClusterSync=true" \
574574
--set "operator.features.backup=true"))
575575

576+
.PHONY: chart-bootstrap
577+
chart-bootstrap: export CHART_NAME := arangodb-bootstrap
578+
chart-bootstrap: helm
579+
@mkdir -p "$(ROOTDIR)/bin/charts"
580+
@$(HELM_PACKAGE_CMD)
581+
manifests: chart-bootstrap
582+
576583
.PHONY: chart-crd
577584
chart-crd: export CHART_NAME := kube-arangodb-crd
578585
chart-crd: helm

chart/arangodb-bootstrap/Chart.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# do not switch to V2 yet - we still need to support Helm 2
2+
apiVersion: v1
3+
name: arangodb-bootstrap
4+
version: 1.2.36
5+
description: "ArangoDB Kubernetes Bootstrap Job"

chart/arangodb-ingress-proxy/LICENSE chart/arangodb-bootstrap/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany
1+
Copyright 2024 ArangoDB GmbH, Cologne, Germany
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

chart/arangodb-bootstrap/README.md

+206
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
# Introduction
2+
3+
Kubernetes ArangoDB Bootstrap Helper.
4+
5+
# Chart Details
6+
7+
Chart will bootstrap ArangoDeployment with predefined Users, Databases, Collections and Permissions.
8+
9+
# Prerequisites
10+
11+
ArangoDeployment as the destination. Bootstrap will ensure that ArangoDeployment is Ready before starting deployment
12+
13+
# Installing the Chart
14+
15+
Chart can be installed in two methods:
16+
- With all Operators in single Helm Release
17+
- One Helm Release per Operator
18+
19+
Possible Operators:
20+
- `ArangoDeployment` - enabled by default
21+
- `ArangoDeploymentReplications` - enabled by default
22+
- `ArangoLocalStorage` - disabled by default
23+
- `ArangoBackup` - disabled by default
24+
- `ArangoJob` - disabled by default
25+
- `ArangoClusterSynchronization` - disabled by default
26+
27+
To install Operators in mode "One per Helm Release" we can use:
28+
29+
```
30+
helm install --name arango-deployment kube-arangodb.tar.gz \
31+
--set operator.features.deployment=true \
32+
--set operator.features.deploymentReplications=false \
33+
--set operator.features.storage=false \
34+
--set operator.features.backup=false \
35+
--set operator.features.apps=false \
36+
--set operator.features.k8sToK8sClusterSync=false
37+
```
38+
39+
40+
# Configuration
41+
42+
### `operator.image`
43+
44+
Image used for the ArangoDB Operator.
45+
46+
Default: `arangodb/kube-arangodb:latest`
47+
48+
### `operator.imagePullPolicy`
49+
50+
Image pull policy for Operator images.
51+
52+
Default: `IfNotPresent`
53+
54+
### `operator.imagePullSecrets`
55+
56+
List of the Image Pull Secrets for Operator images.
57+
58+
Default: `[]string`
59+
60+
### `operator.scope`
61+
62+
Scope on which Operator will be configured.
63+
64+
Default: `legacy`
65+
66+
Supported modes:
67+
- `legacy` - mode with limited cluster scope access
68+
- `namespaced` - mode with namespace access only
69+
70+
### `operator.service.type`
71+
72+
Type of the Operator service.
73+
74+
Default: `ClusterIP`
75+
76+
### `operator.annotations`
77+
78+
Annotations passed to the Operator Deployment definition.
79+
80+
Default: `[]string`
81+
82+
### `operator.resources.limits.cpu`
83+
84+
CPU limits for operator pods.
85+
86+
Default: `1`
87+
88+
### `operator.resources.limits.memory`
89+
90+
Memory limits for operator pods.
91+
92+
Default: `256Mi`
93+
94+
### `operator.resources.requested.cpu`
95+
96+
Requested CPI by Operator pods.
97+
98+
Default: `250m`
99+
100+
### `operator.resources.requested.memory`
101+
102+
Requested memory for operator pods.
103+
104+
Default: `256Mi`
105+
106+
### `operator.nodeSelector`
107+
108+
NodeSelector for Deployment pods.
109+
110+
Default: `{}`
111+
112+
### `operator.tolerations`
113+
114+
Tolerations for Deployment pods.
115+
116+
There is built in configuration (can not be changed):
117+
```yaml
118+
tolerations:
119+
- key: "node.kubernetes.io/unreachable"
120+
operator: "Exists"
121+
effect: "NoExecute"
122+
tolerationSeconds: 5
123+
- key: "node.kubernetes.io/not-ready"
124+
operator: "Exists"
125+
effect: "NoExecute"
126+
tolerationSeconds: 5
127+
```
128+
129+
which can be extended by additional entries e.g.:
130+
```yaml
131+
tolerations:
132+
- key: devops
133+
operator: Exists
134+
effect: NoSchedule
135+
```
136+
Default (empty): `[]`
137+
138+
### `operator.securityContext.runAsUser`
139+
140+
Controls which user ID the containers are run with.
141+
142+
Default: `1000`
143+
144+
### `operator.replicaCount`
145+
146+
Replication count for Operator deployment.
147+
148+
Default: `2`
149+
150+
### `operator.updateStrategy`
151+
152+
Update strategy for operator pod.
153+
154+
Default: `Recreate`
155+
156+
### `operator.features.deployment`
157+
158+
Define if ArangoDeployment Operator should be enabled.
159+
160+
Default: `true`
161+
162+
### `operator.features.deploymentReplications`
163+
164+
Define if ArangoDeploymentReplications Operator should be enabled.
165+
166+
Default: `true`
167+
168+
### `operator.features.storage`
169+
170+
Define if ArangoLocalStorage Operator should be enabled.
171+
172+
Default: `false`
173+
174+
### `operator.features.backup`
175+
176+
Define if ArangoBackup Operator should be enabled.
177+
178+
Default: `false`
179+
180+
### `operator.features.apps`
181+
182+
Define if ArangoJob Operator should be enabled.
183+
184+
Default: `false`
185+
186+
### `operator.features.k8sToK8sClusterSync`
187+
188+
Define if ArangoClusterSynchronization Operator should be enabled.
189+
190+
Default: `false`
191+
192+
### `rbac.enabled`
193+
194+
Define if RBAC should be enabled.
195+
196+
Default: `true`
197+
198+
### `operator.architectures`
199+
200+
List of supported architectures.
201+
202+
Default: `[]string{"amd64"}`
203+
204+
# Limitations
205+
206+
N/A

0 commit comments

Comments
 (0)