Skip to content

Commit 05f043b

Browse files
committed
[Feature] [Platform] Install multi type support
1 parent b690631 commit 05f043b

File tree

17 files changed

+450
-99
lines changed

17 files changed

+450
-99
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ kustomize_test/
1919
tools/codegen/boilerplate.go.txt
2020

2121
.checksum.code
22-
.checksum.mod
22+
.checksum.mod
23+
24+
cache/

docs/cli/arangodb_operator_platform.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Available Commands:
1919
2020
Flags:
2121
-h, --help help for arangodb_operator_platform
22-
--kubeconfig string Kubernetes Config File
22+
--kubeconfig string Kubernetes Config File (default "/Users/adam/.kube/devstack")
2323
-n, --namespace string Kubernetes Namespace (default "default")
2424
2525
Use "arangodb_operator_platform [command] --help" for more information about a command.
@@ -46,7 +46,7 @@ Flags:
4646
-h, --help help for package
4747
4848
Global Flags:
49-
--kubeconfig string Kubernetes Config File
49+
--kubeconfig string Kubernetes Config File (default "/Users/adam/.kube/devstack")
5050
-n, --namespace string Kubernetes Namespace (default "default")
5151
5252
Use "arangodb_operator_platform package [command] --help" for more information about a command.
@@ -67,7 +67,7 @@ Flags:
6767
--platform.name string Kubernetes Platform Name (name of the ArangoDeployment)
6868
6969
Global Flags:
70-
--kubeconfig string Kubernetes Config File
70+
--kubeconfig string Kubernetes Config File (default "/Users/adam/.kube/devstack")
7171
-n, --namespace string Kubernetes Namespace (default "default")
7272
```
7373
[END_INJECT]: # (arangodb_operator_platform_package_dump_cmd)
@@ -91,7 +91,7 @@ Flags:
9191
--registry.docker.insecure strings List of insecure registries
9292
9393
Global Flags:
94-
--kubeconfig string Kubernetes Config File
94+
--kubeconfig string Kubernetes Config File (default "/Users/adam/.kube/devstack")
9595
-n, --namespace string Kubernetes Namespace (default "default")
9696
```
9797
[END_INJECT]: # (arangodb_operator_platform_package_install_cmd)
@@ -115,7 +115,7 @@ Flags:
115115
-h, --help help for license
116116
117117
Global Flags:
118-
--kubeconfig string Kubernetes Config File
118+
--kubeconfig string Kubernetes Config File (default "/Users/adam/.kube/devstack")
119119
-n, --namespace string Kubernetes Namespace (default "default")
120120
121121
Use "arangodb_operator_platform license [command] --help" for more information about a command.
@@ -142,7 +142,7 @@ Flags:
142142
--telemetry Enables Telemetry (default true)
143143
144144
Global Flags:
145-
--kubeconfig string Kubernetes Config File
145+
--kubeconfig string Kubernetes Config File (default "/Users/adam/.kube/devstack")
146146
-n, --namespace string Kubernetes Namespace (default "default")
147147
```
148148
[END_INJECT]: # (arangodb_operator_platform_license_inventory_cmd)
@@ -171,7 +171,7 @@ Flags:
171171
--telemetry Enables Telemetry (default true)
172172
173173
Global Flags:
174-
--kubeconfig string Kubernetes Config File
174+
--kubeconfig string Kubernetes Config File (default "/Users/adam/.kube/devstack")
175175
-n, --namespace string Kubernetes Namespace (default "default")
176176
```
177177
[END_INJECT]: # (arangodb_operator_platform_license_activate_cmd)
@@ -194,7 +194,7 @@ Flags:
194194
--license.endpoint string LicenseManager Endpoint (default "license.arango.ai")
195195
196196
Global Flags:
197-
--kubeconfig string Kubernetes Config File
197+
--kubeconfig string Kubernetes Config File (default "/Users/adam/.kube/devstack")
198198
-n, --namespace string Kubernetes Namespace (default "default")
199199
```
200200
[END_INJECT]: # (arangodb_operator_platform_license_generate_cmd)
@@ -216,7 +216,7 @@ Flags:
216216
--secret string Kubernetes Secret Name
217217
218218
Global Flags:
219-
--kubeconfig string Kubernetes Config File
219+
--kubeconfig string Kubernetes Config File (default "/Users/adam/.kube/devstack")
220220
-n, --namespace string Kubernetes Namespace (default "default")
221221
```
222222
[END_INJECT]: # (arangodb_operator_platform_license_secret_cmd)

docs/platform.install.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
layout: page
3+
parent: ArangoDBPlatform
4+
title: Platform Installation File Schema
5+
---
6+
7+
# Installation Definition
8+
9+
## Example
10+
11+
```yaml
12+
packages:
13+
nginx: # OCI
14+
chart: "oci://ghcr.io/nginx/charts/nginx-ingress:2.3.1"
15+
version: 2.3.1
16+
prometheus: # Helm Index
17+
chart: "index://prometheus-community.github.io/helm-charts"
18+
version: 1.3.1
19+
alertmanager: # Remote Chart
20+
chart: "https://github.com/prometheus-community/helm-charts/releases/download/alertmanager-0.1.0/alertmanager-0.1.0.tgz"
21+
version: "0.1.0"
22+
local: # Local File
23+
chart: "file:///tmp/local-0.1.0.tgz"
24+
version: "0.1.0"
25+
inline: # Inline
26+
chart: "<base64 string>"
27+
version: "0.2.5"
28+
platform: # Platform LicenseManager
29+
version: v3.0.11
30+
```
31+
32+
## Package
33+
34+
### .package.packages.\<string\>.chart
35+
36+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.3.1/pkg/util/k8sutil/helm/package.go#L87)</sup>
37+
38+
Chart defines override of the PackageSpec
39+
It supports multiple modes:
40+
- If undefined, LicenseManager OCI Repository is used
41+
- If starts with `file://` chart is fetched from local FileSystem
42+
- If starts with `http://` or `https://` chart is fetched from the remote URL
43+
- If starts with `index://` chart is fetched using Helm YAML Index File stricture (using version and name)
44+
- If Starts with `oci://` chart is fetched from Registry Compatible OCI Repository
45+
- If none above match, chart is decoded using Base64 encoding
46+
47+
***
48+
49+
### .package.packages.\<string\>.overrides
50+
51+
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.3.1/pkg/util/k8sutil/helm/package.go#L90)</sup>
52+
53+
Overrides defines Values to override the Helm Chart Defaults (merged with Service Overrides)
54+
55+
***
56+
57+
### .package.packages.\<string\>.stage
58+
59+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.3.1/pkg/util/k8sutil/helm/package.go#L74)</sup>
60+
61+
Stage defines stage used in the fetch from LicenseManager
62+
63+
***
64+
65+
### .package.packages.\<string\>.version
66+
67+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.3.1/pkg/util/k8sutil/helm/package.go#L77)</sup>
68+
69+
Version keeps the version of the PackageSpec
70+
71+
***
72+
73+
### .package.releases.\<string\>.overrides
74+
75+
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.3.1/pkg/util/k8sutil/helm/package.go#L169)</sup>
76+
77+
Overrides defines Values to override the Helm Chart Defaults during installation
78+
79+
***
80+
81+
### .package.releases.\<string\>.package
82+
83+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.3.1/pkg/util/k8sutil/helm/package.go#L166)</sup>
84+
85+
Package keeps the name of the Chart used from the installation script.
86+
References to value provided in Packages
87+

go.mod

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ require (
5353
github.com/prometheus/prom2json v1.3.3
5454
github.com/robfig/cron v1.2.0
5555
github.com/rs/zerolog v1.33.0
56-
github.com/spf13/cobra v1.9.1
57-
github.com/spf13/pflag v1.0.6
56+
github.com/spf13/cobra v1.10.1
57+
github.com/spf13/pflag v1.0.10
5858
github.com/stretchr/testify v1.10.0
5959
golang.org/x/sync v0.17.0
60-
golang.org/x/sys v0.37.0
60+
golang.org/x/sys v0.38.0
6161
golang.org/x/text v0.30.0
6262
golang.org/x/time v0.11.0
6363
google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8
@@ -84,7 +84,7 @@ require (
8484
github.com/golang-jwt/jwt/v5 v5.2.2
8585
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1
8686
github.com/jedib0t/go-pretty/v6 v6.6.5
87-
github.com/regclient/regclient v0.8.3
87+
github.com/regclient/regclient v0.10.0
8888
golang.org/x/oauth2 v0.30.0
8989
google.golang.org/api v0.235.0
9090
google.golang.org/genproto/googleapis/api v0.0.0-20250804133106-a7a43d27e69b
@@ -181,7 +181,7 @@ require (
181181
github.com/josharian/intern v1.0.0 // indirect
182182
github.com/json-iterator/go v1.1.12 // indirect
183183
github.com/kkdai/maglev v0.2.0 // indirect
184-
github.com/klauspost/compress v1.18.0 // indirect
184+
github.com/klauspost/compress v1.18.1 // indirect
185185
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
186186
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
187187
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
@@ -223,7 +223,7 @@ require (
223223
github.com/stretchr/objx v0.5.2 // indirect
224224
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
225225
github.com/ugorji/go/codec v1.2.11 // indirect
226-
github.com/ulikunitz/xz v0.5.12 // indirect
226+
github.com/ulikunitz/xz v0.5.15 // indirect
227227
github.com/x448/float16 v0.8.4 // indirect
228228
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
229229
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect

go.sum

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ github.com/kkdai/maglev v0.2.0 h1:w6DCW0kAA6fstZqXkrBrlgIC3jeIRXkjOYea/m6EK/Y=
328328
github.com/kkdai/maglev v0.2.0/go.mod h1:d+mt8Lmt3uqi9aRb/BnPjzD0fy+ETs1vVXiGRnqHVZ4=
329329
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
330330
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
331+
github.com/klauspost/compress v1.18.1 h1:bcSGx7UbpBqMChDtsF28Lw6v/G94LPrrbMbdC3JH2co=
332+
github.com/klauspost/compress v1.18.1/go.mod h1:ZQFFVG+MdnR0P+l6wpXgIL4NTtwiKIdBnrBd8Nrxr+0=
331333
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
332334
github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk=
333335
github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
@@ -456,6 +458,8 @@ github.com/prometheus/prom2json v1.3.3 h1:IYfSMiZ7sSOfliBoo89PcufjWO4eAR0gznGcET
456458
github.com/prometheus/prom2json v1.3.3/go.mod h1:Pv4yIPktEkK7btWsrUTWDDDrnpUrAELaOCj+oFwlgmc=
457459
github.com/regclient/regclient v0.8.3 h1:AFAPu/vmOYGyY22AIgzdBUKbzH+83lEpRioRYJ/reCs=
458460
github.com/regclient/regclient v0.8.3/go.mod h1:gjQh5uBVZoo/CngchghtQh9Hx81HOMKRRDd5WPcPkbk=
461+
github.com/regclient/regclient v0.10.0 h1:V+mbcd/PBwQkd89M2KAPAAC1qMyrw9f5BKvCtPgw/C8=
462+
github.com/regclient/regclient v0.10.0/go.mod h1:fDYvRK2yFUE7pyEXKj+jKzTAtuwXsGQ6Tr0KPvxwP00=
459463
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
460464
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
461465
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
@@ -480,8 +484,13 @@ github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w=
480484
github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
481485
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
482486
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
487+
github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s=
488+
github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0=
483489
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
484490
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
491+
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
492+
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
493+
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
485494
github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE=
486495
github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g=
487496
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -496,6 +505,8 @@ github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4d
496505
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
497506
github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc=
498507
github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
508+
github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY=
509+
github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
499510
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
500511
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
501512
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
@@ -588,6 +599,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
588599
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
589600
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
590601
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
602+
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
603+
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
591604
golang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q=
592605
golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss=
593606
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

0 commit comments

Comments
 (0)