Skip to content

Commit 2c2c332

Browse files
authored
[Bugfix] [Platform] Ensure Inventory uses the serving group for license generation (#1988)
1 parent 753d739 commit 2c2c332

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- (Feature) (Platform) Registry Secret
1515
- (Bugfix) (Platform) Ensure Inventory picks active leader
1616
- (Bugfix) (Platform) Reload Config on Inventory Change
17+
- (Bugfix) (Platform) Ensure Inventory uses the serving group for license generation
1718

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

pkg/apis/shared/validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636

3737
var (
3838
resourceNameRE = regexp.MustCompile(`^([0-9\-\.a-z])+$`)
39-
apiPathRE = regexp.MustCompile(`^(/[_A-Za-z0-9\-]+)*/?$`)
39+
apiPathRE = regexp.MustCompile(`^(/[_\.A-Za-z0-9\-]+)*/?$`)
4040
)
4141

4242
const (

pkg/apis/shared/validate_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// DISCLAIMER
33
//
4-
// Copyright 2023-2024 ArangoDB GmbH, Cologne, Germany
4+
// Copyright 2023-2025 ArangoDB GmbH, Cologne, Germany
55
//
66
// Licensed under the Apache License, Version 2.0 (the "License");
77
// you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@ func Test_ValidateAPIPath(t *testing.T) {
3737
require.NoError(t, ValidateAPIPath("/"))
3838
require.Error(t, ValidateAPIPath("//"))
3939
require.NoError(t, ValidateAPIPath("/api/zz"))
40+
require.NoError(t, ValidateAPIPath("/api/zz.22"))
4041
require.NoError(t, ValidateAPIPath("/api/"))
4142
require.NoError(t, ValidateAPIPath("/api/test/qw/"))
4243
require.NoError(t, ValidateAPIPath("/api/test/2/"))

pkg/deployment/reconcile/plan_builder_license.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ func (r *Reconciler) updateClusterLicenseDiscover(spec api.DeploymentSpec, conte
118118
return "", errors.Errorf("Unable to discover License mode")
119119
}
120120

121-
func (r *Reconciler) updateClusterLicenseMember(status api.DeploymentStatus) (api.DeploymentStatusMemberElement, bool) {
122-
members := status.Members.AsListInGroups(arangod.GroupsWithLicenseV2()...).Filter(func(a api.DeploymentStatusMemberElement) bool {
121+
func (r *Reconciler) updateClusterLicenseMember(status api.DeploymentStatus, groups ...api.ServerGroup) (api.DeploymentStatusMemberElement, bool) {
122+
members := status.Members.AsListInGroups(groups...).Filter(func(a api.DeploymentStatusMemberElement) bool {
123123
i := a.Member.Image
124124
if i == nil {
125125
return false
@@ -153,7 +153,7 @@ func (r *Reconciler) updateClusterLicenseKey(ctx context.Context, spec api.Deplo
153153
return nil
154154
}
155155

156-
member, ok := r.updateClusterLicenseMember(status)
156+
member, ok := r.updateClusterLicenseMember(status, arangod.GroupsWithLicenseV2()...)
157157

158158
if !ok {
159159
// No member found to take this action
@@ -202,7 +202,7 @@ func (r *Reconciler) updateClusterLicenseAPI(ctx context.Context, spec api.Deplo
202202
return nil
203203
}
204204

205-
member, ok := r.updateClusterLicenseMember(status)
205+
member, ok := r.updateClusterLicenseMember(status, spec.Mode.ServingGroup())
206206

207207
if !ok {
208208
// No member found to take this action

0 commit comments

Comments
 (0)