Skip to content

Commit 4e5015a

Browse files
authored
[Bugfix] Fix authentication details extraction for agency dump & state (#1062)
1 parent 330f3de commit 4e5015a

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- (Feature) Recreation member in the high plan
1010
- (Feature) Add 'crd install' subcommand
1111
- (Bugfix) Fix `internal` metrics mode
12+
- (Bugfix) Create agency dump if auth is disabled
1213

1314
## [1.2.14](https://github.com/arangodb/kube-arangodb/tree/1.2.14) (2022-07-14)
1415
- (Feature) Add ArangoSync TLS based rotation

cmd/admin.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,12 @@ func getDeploymentAndCredentials(ctx context.Context,
211211
return
212212
}
213213

214-
auth, err = getJWTTokenFromSecrets(ctx, secrets, d.Spec.Authentication.GetJWTSecretName())
215-
if err != nil {
216-
err = errors.WithMessage(err, "failed to get JWT token")
217-
return
214+
if d.Spec.IsAuthenticated() {
215+
auth, err = getJWTTokenFromSecrets(ctx, secrets, d.Spec.Authentication.GetJWTSecretName())
216+
if err != nil {
217+
err = errors.WithMessage(err, "failed to get JWT token")
218+
return
219+
}
218220
}
219221

220222
return

0 commit comments

Comments
 (0)