Skip to content

Commit f7db115

Browse files
authored
[Feature] [Platform] Installer move to OCI (#1987)
1 parent 2c2c332 commit f7db115

22 files changed

+923
-395
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- (Bugfix) (Platform) Ensure Inventory picks active leader
1616
- (Bugfix) (Platform) Reload Config on Inventory Change
1717
- (Bugfix) (Platform) Ensure Inventory uses the serving group for license generation
18+
- (Bugfix) (Platform) Installer move to OCI
1819

1920
## [1.3.1](https://github.com/arangodb/kube-arangodb/tree/1.3.1) (2025-10-07)
2021
- (Documentation) Add ArangoPlatformStorage Docs & Examples

docs/cli/arangodb_operator_platform.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ Available Commands:
4141
import Imports the package from the ZIP format
4242
install Installs the specified setup of the platform
4343
merge Merges definitions into single file
44-
registry Points all images to the new registry
4544
4645
Flags:
4746
-h, --help help for package
@@ -83,9 +82,13 @@ Usage:
8382
arangodb_operator_platform package install [flags] ... packages
8483
8584
Flags:
86-
-h, --help help for install
87-
--platform.endpoint string Platform Repository URL (default "https://arangodb-platform-prd-chart-registry.s3.amazonaws.com")
88-
--platform.name string Kubernetes Platform Name (name of the ArangoDeployment)
85+
-h, --help help for install
86+
--license.client.id string LicenseManager Client ID (ENV: LICENSE_CLIENT_ID)
87+
--license.client.secret string LicenseManager Client Secret (ENV: LICENSE_CLIENT_SECRET)
88+
--license.endpoint string LicenseManager Endpoint (default "license.arango.ai")
89+
--platform.name string Kubernetes Platform Name (name of the ArangoDeployment)
90+
--registry.docker.credentials Use Docker Credentials
91+
--registry.docker.insecure strings List of insecure registries
8992
9093
Global Flags:
9194
--kubeconfig string Kubernetes Config File
@@ -161,9 +164,8 @@ Flags:
161164
--arango.insecure Arango Endpoint Insecure
162165
--arango.token string Arango JWT Token for Authentication
163166
-h, --help help for activate
164-
--license.client.id string LicenseManager Client ID
165-
--license.client.secret string LicenseManager Client Secret
166-
--license.client.stage strings LicenseManager Stages (default [prd])
167+
--license.client.id string LicenseManager Client ID (ENV: LICENSE_CLIENT_ID)
168+
--license.client.secret string LicenseManager Client Secret (ENV: LICENSE_CLIENT_SECRET)
167169
--license.endpoint string LicenseManager Endpoint (default "license.arango.ai")
168170
--license.interval duration Interval of the license synchronization
169171
--telemetry Enables Telemetry (default true)
@@ -187,9 +189,8 @@ Flags:
187189
--deployment.id string Deployment ID
188190
-h, --help help for generate
189191
--inventory string Path to the Inventory File
190-
--license.client.id string LicenseManager Client ID
191-
--license.client.secret string LicenseManager Client Secret
192-
--license.client.stage strings LicenseManager Stages (default [prd])
192+
--license.client.id string LicenseManager Client ID (ENV: LICENSE_CLIENT_ID)
193+
--license.client.secret string LicenseManager Client Secret (ENV: LICENSE_CLIENT_SECRET)
193194
--license.endpoint string LicenseManager Endpoint (default "license.arango.ai")
194195
195196
Global Flags:
@@ -209,9 +210,8 @@ Usage:
209210
210211
Flags:
211212
-h, --help help for secret
212-
--license.client.id string LicenseManager Client ID
213-
--license.client.secret string LicenseManager Client Secret
214-
--license.client.stage strings LicenseManager Stages (default [prd])
213+
--license.client.id string LicenseManager Client ID (ENV: LICENSE_CLIENT_ID)
214+
--license.client.secret string LicenseManager Client Secret (ENV: LICENSE_CLIENT_SECRET)
215215
--license.endpoint string LicenseManager Endpoint (default "license.arango.ai")
216216
--secret string Kubernetes Secret Name
217217

pkg/deployment/reconcile/action_license_generate.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ package reconcile
2222

2323
import (
2424
"context"
25+
"encoding/base64"
2526
"fmt"
2627
"math"
2728
"time"
@@ -32,6 +33,7 @@ import (
3233

3334
api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
3435
"github.com/arangodb/kube-arangodb/pkg/deployment/client"
36+
"github.com/arangodb/kube-arangodb/pkg/deployment/patch"
3537
"github.com/arangodb/kube-arangodb/pkg/deployment/pod"
3638
lmanager "github.com/arangodb/kube-arangodb/pkg/license_manager"
3739
"github.com/arangodb/kube-arangodb/pkg/platform/inventory"
@@ -216,6 +218,25 @@ func (a *actionLicenseGenerate) Start(ctx context.Context) (bool, error) {
216218
}
217219
}
218220

221+
if spec.Sync.IsEnabled() {
222+
if !spec.License.HasSecretName() {
223+
a.log.Debug("License Secret Gone")
224+
return true, nil
225+
}
226+
s, ok := cache.Secret().V1().GetSimple(spec.License.GetSecretName())
227+
if !ok {
228+
a.log.Debug("License Secret Gone")
229+
return true, nil
230+
}
231+
232+
if _, _, err := patcher.Patcher[*core.Secret](ctx, cache.Client().Kubernetes().CoreV1().Secrets(a.actionCtx.GetNamespace()), s, meta.PatchOptions{}, func(in *core.Secret) []patch.Item {
233+
return []patch.Item{patch.ItemReplace(patch.NewPath("data", utilConstants.SecretKeyToken), base64.StdEncoding.EncodeToString([]byte(generatedLicense.License)))}
234+
}); err != nil {
235+
a.log.Err(err).Debug("Failed to patch License Secret")
236+
return true, nil
237+
}
238+
}
239+
219240
if err := a.actionCtx.WithStatusUpdate(ctx, func(s *api.DeploymentStatus) bool {
220241
s.License = &api.DeploymentStatusLicense{
221242
ID: generatedLicense.ID,

pkg/deployment/reconcile/plan_builder_license.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ func (r *Reconciler) updateClusterLicenseDiscover(spec api.DeploymentSpec, conte
107107
return "", err
108108
}
109109

110-
if l.V2.IsV2Set() {
111-
return api.LicenseModeKey, nil
112-
}
113-
114110
if l.API != nil {
115111
return api.LicenseModeAPI, nil
116112
}
117113

114+
if l.V2.IsV2Set() {
115+
return api.LicenseModeKey, nil
116+
}
117+
118118
return "", errors.Errorf("Unable to discover License mode")
119119
}
120120

@@ -256,5 +256,12 @@ func (r *Reconciler) updateClusterLicenseAPI(ctx context.Context, spec api.Deplo
256256
return api.Plan{actions.NewClusterAction(api.ActionTypeLicenseClean, "Removing license reference - Registry Change Required")}
257257
}
258258

259+
if spec.Sync.IsEnabled() {
260+
// Feedback of the token is required
261+
if l.V2.V2Hash() != status.License.Hash {
262+
return api.Plan{actions.NewClusterAction(api.ActionTypeLicenseClean, "Removing license reference - Sync Token Required")}
263+
}
264+
}
265+
259266
return nil
260267
}

pkg/platform/chart_manager.go

Lines changed: 0 additions & 38 deletions
This file was deleted.

pkg/platform/flags.go

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,6 @@ var (
121121
},
122122
}
123123

124-
flagPlatformEndpoint = cli.Flag[string]{
125-
Name: "platform.endpoint",
126-
Description: "Platform Repository URL",
127-
Default: "https://arangodb-platform-prd-chart-registry.s3.amazonaws.com",
128-
Persistent: true,
129-
}
130-
131124
flagUpgradeVersions = cli.Flag[bool]{
132125
Name: "upgrade",
133126
Short: "u",
@@ -176,26 +169,7 @@ var (
176169
Default: true,
177170
}
178171

179-
flagRegistryUseCredentials = cli.Flag[bool]{
180-
Name: "registry.docker.credentials",
181-
Description: "Use Docker Credentials",
182-
Default: false,
183-
Check: func(in bool) error {
184-
return nil
185-
},
186-
}
187-
188-
flagRegistryInsecure = cli.Flag[[]string]{
189-
Name: "registry.docker.insecure",
190-
Description: "List of insecure registries",
191-
Default: nil,
192-
}
193-
194-
flagRegistryList = cli.Flag[[]string]{
195-
Name: "registry.docker.endpoint",
196-
Description: "List of boosted registries",
197-
Default: nil,
198-
}
172+
flagRegistry = cli.NewRegistry()
199173

200174
flagActivateInterval = cli.Flag[time.Duration]{
201175
Name: "license.interval",

0 commit comments

Comments
 (0)