diff --git a/CHANGELOG.md b/CHANGELOG.md index 52339d574..4b7f6e330 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - (Feature) (Platform) Registry Secret - (Bugfix) (Platform) Ensure Inventory picks active leader - (Bugfix) (Platform) Reload Config on Inventory Change +- (Bugfix) (Platform) Ensure Inventory uses the serving group for license generation ## [1.3.1](https://github.com/arangodb/kube-arangodb/tree/1.3.1) (2025-10-07) - (Documentation) Add ArangoPlatformStorage Docs & Examples diff --git a/pkg/apis/shared/validate.go b/pkg/apis/shared/validate.go index 35481f622..420e76a2a 100644 --- a/pkg/apis/shared/validate.go +++ b/pkg/apis/shared/validate.go @@ -36,7 +36,7 @@ import ( var ( resourceNameRE = regexp.MustCompile(`^([0-9\-\.a-z])+$`) - apiPathRE = regexp.MustCompile(`^(/[_A-Za-z0-9\-]+)*/?$`) + apiPathRE = regexp.MustCompile(`^(/[_\.A-Za-z0-9\-]+)*/?$`) ) const ( diff --git a/pkg/apis/shared/validate_test.go b/pkg/apis/shared/validate_test.go index 263e7032b..5d1302153 100644 --- a/pkg/apis/shared/validate_test.go +++ b/pkg/apis/shared/validate_test.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2023-2024 ArangoDB GmbH, Cologne, Germany +// Copyright 2023-2025 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -37,6 +37,7 @@ func Test_ValidateAPIPath(t *testing.T) { require.NoError(t, ValidateAPIPath("/")) require.Error(t, ValidateAPIPath("//")) require.NoError(t, ValidateAPIPath("/api/zz")) + require.NoError(t, ValidateAPIPath("/api/zz.22")) require.NoError(t, ValidateAPIPath("/api/")) require.NoError(t, ValidateAPIPath("/api/test/qw/")) require.NoError(t, ValidateAPIPath("/api/test/2/")) diff --git a/pkg/deployment/reconcile/plan_builder_license.go b/pkg/deployment/reconcile/plan_builder_license.go index 837828222..68159c5f4 100644 --- a/pkg/deployment/reconcile/plan_builder_license.go +++ b/pkg/deployment/reconcile/plan_builder_license.go @@ -118,8 +118,8 @@ func (r *Reconciler) updateClusterLicenseDiscover(spec api.DeploymentSpec, conte return "", errors.Errorf("Unable to discover License mode") } -func (r *Reconciler) updateClusterLicenseMember(status api.DeploymentStatus) (api.DeploymentStatusMemberElement, bool) { - members := status.Members.AsListInGroups(arangod.GroupsWithLicenseV2()...).Filter(func(a api.DeploymentStatusMemberElement) bool { +func (r *Reconciler) updateClusterLicenseMember(status api.DeploymentStatus, groups ...api.ServerGroup) (api.DeploymentStatusMemberElement, bool) { + members := status.Members.AsListInGroups(groups...).Filter(func(a api.DeploymentStatusMemberElement) bool { i := a.Member.Image if i == nil { return false @@ -153,7 +153,7 @@ func (r *Reconciler) updateClusterLicenseKey(ctx context.Context, spec api.Deplo return nil } - member, ok := r.updateClusterLicenseMember(status) + member, ok := r.updateClusterLicenseMember(status, arangod.GroupsWithLicenseV2()...) if !ok { // No member found to take this action @@ -202,7 +202,7 @@ func (r *Reconciler) updateClusterLicenseAPI(ctx context.Context, spec api.Deplo return nil } - member, ok := r.updateClusterLicenseMember(status) + member, ok := r.updateClusterLicenseMember(status, spec.Mode.ServingGroup()) if !ok { // No member found to take this action