Skip to content

Commit 192dfc5

Browse files
committed
[Feature] Require ResignLeadership during upgrade
1 parent 3ffda22 commit 192dfc5

23 files changed

+269
-16
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
- (Feature) (Scheduler) Additional types
3838
- (Feature) Alternative Upgrade Order Feature
3939
- (Feature) (Scheduler) SchedV1 Integration
40+
- (Feature) Require ResignLeadership during upgrade
4041

4142
## [1.2.42](https://github.com/arangodb/kube-arangodb/tree/1.2.42) (2024-07-23)
4243
- (Maintenance) Go 1.22.4 & Kubernetes 1.29.6 libraries

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ Flags:
150150
--deployment.feature.backup-cleanup Cleanup imported backups if required - Required ArangoDB 3.8.0 or higher
151151
--deployment.feature.deployment-spec-defaults-restore Restore defaults from last accepted state of deployment - Required ArangoDB 3.8.0 or higher (default true)
152152
--deployment.feature.enforced-resign-leadership Enforce ResignLeadership and ensure that Leaders are moved from restarted DBServer - Required ArangoDB 3.8.0 or higher (default true)
153+
--deployment.feature.ensure-secured-resign-leadership Ensures that even if ResignLeadership job timeouted, data is still replicated on other servers - Required ArangoDB 3.8.0 or higher (default true)
153154
--deployment.feature.ephemeral-volumes Enables ephemeral volumes for apps and tmp directory - Required ArangoDB 3.8.0 or higher
154155
--deployment.feature.failover-leadership Support for leadership in fail-over mode - Required ArangoDB 3.8.0 or higher
155156
--deployment.feature.init-containers-copy-resources Copy resources spec to built-in init containers if they are not specified - Required ArangoDB 3.8.0 or higher (default true)

docs/cli/arangodb_operator.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Flags:
4747
--deployment.feature.backup-cleanup Cleanup imported backups if required - Required ArangoDB 3.8.0 or higher
4848
--deployment.feature.deployment-spec-defaults-restore Restore defaults from last accepted state of deployment - Required ArangoDB 3.8.0 or higher (default true)
4949
--deployment.feature.enforced-resign-leadership Enforce ResignLeadership and ensure that Leaders are moved from restarted DBServer - Required ArangoDB 3.8.0 or higher (default true)
50+
--deployment.feature.ensure-secured-resign-leadership Ensures that even if ResignLeadership job timeouted, data is still replicated on other servers - Required ArangoDB 3.8.0 or higher (default true)
5051
--deployment.feature.ephemeral-volumes Enables ephemeral volumes for apps and tmp directory - Required ArangoDB 3.8.0 or higher
5152
--deployment.feature.failover-leadership Support for leadership in fail-over mode - Required ArangoDB 3.8.0 or higher
5253
--deployment.feature.init-containers-copy-resources Copy resources spec to built-in init containers if they are not specified - Required ArangoDB 3.8.0 or higher (default true)

docs/generated/actions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ nav_order: 11
3737
| EncryptionKeyRemove | no | 10m0s | no | Enterprise Only | Remove the encryption key to the pool |
3838
| EncryptionKeyStatusUpdate | no | 10m0s | no | Enterprise Only | Update status of encryption propagation |
3939
| EnforceResignLeadership | no | 45m0s | yes | Community & Enterprise | Run the ResignLeadership job on DBServer and checks data compatibility after |
40+
| EnsureSecuredResignLeadership | no | 10m0s | no | Community & Enterprise | Ensures that data is still replicated on other servers |
4041
| Idle | no | 10m0s | no | Community & Enterprise | Define idle operation in case if preconditions are not meet |
4142
| JWTAdd | no | 10m0s | no | Enterprise Only | Adds new JWT to the pool |
4243
| JWTClean | no | 10m0s | no | Enterprise Only | Remove JWT key from the pool |
@@ -133,6 +134,7 @@ spec:
133134
EncryptionKeyRemove: 10m0s
134135
EncryptionKeyStatusUpdate: 10m0s
135136
EnforceResignLeadership: 45m0s
137+
EnsureSecuredResignLeadership: 10m0s
136138
Idle: 10m0s
137139
JWTAdd: 10m0s
138140
JWTClean: 10m0s

internal/actions.config.go.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- $root := . -}}
22
//
3-
// Copyright 2023 ArangoDB GmbH, Cologne, Germany
3+
// Copyright 2023-2024 ArangoDB GmbH, Cologne, Germany
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License");
66
// you may not use this file except in compliance with the License.

internal/actions.go.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- $root := . -}}
22
//
3-
// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany
3+
// Copyright 2016-2024 ArangoDB GmbH, Cologne, Germany
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License");
66
// you may not use this file except in compliance with the License.

internal/actions.register.go.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- $root := . -}}
22
//
3-
// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany
3+
// Copyright 2016-2024 ArangoDB GmbH, Cologne, Germany
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License");
66
// you may not use this file except in compliance with the License.

internal/actions.register.test.go.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- $root := . -}}
22
//
3-
// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany
3+
// Copyright 2016-2024 ArangoDB GmbH, Cologne, Germany
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License");
66
// you may not use this file except in compliance with the License.

internal/actions.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ actions:
3333
description: Run the ResignLeadership job on DBServer and checks data compatibility after
3434
timeout: 45m
3535
optional: true
36+
EnsureSecuredResignLeadership:
37+
description: Ensures that data is still replicated on other servers
38+
timeout: 10m
3639
KillMemberPod:
3740
description: Execute Delete on Pod (put pod in Terminating state)
3841
scopes:

pkg/apis/deployment/v1/actions.generated.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany
2+
// Copyright 2016-2024 ArangoDB GmbH, Cologne, Germany
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -101,6 +101,9 @@ const (
101101
// ActionEnforceResignLeadershipDefaultTimeout define default timeout for action ActionEnforceResignLeadership
102102
ActionEnforceResignLeadershipDefaultTimeout time.Duration = 2700 * time.Second // 45m0s
103103

104+
// ActionEnsureSecuredResignLeadershipDefaultTimeout define default timeout for action ActionEnsureSecuredResignLeadership
105+
ActionEnsureSecuredResignLeadershipDefaultTimeout time.Duration = 600 * time.Second // 10m0s
106+
104107
// ActionIdleDefaultTimeout define default timeout for action ActionIdle
105108
ActionIdleDefaultTimeout time.Duration = ActionsDefaultTimeout
106109

@@ -362,6 +365,9 @@ const (
362365
// ActionTypeEnforceResignLeadership in scopes Normal. Run the ResignLeadership job on DBServer and checks data compatibility after
363366
ActionTypeEnforceResignLeadership ActionType = "EnforceResignLeadership"
364367

368+
// ActionTypeEnsureSecuredResignLeadership in scopes Normal. Ensures that data is still replicated on other servers
369+
ActionTypeEnsureSecuredResignLeadership ActionType = "EnsureSecuredResignLeadership"
370+
365371
// ActionTypeIdle in scopes Normal. Define idle operation in case if preconditions are not meet
366372
ActionTypeIdle ActionType = "Idle"
367373

@@ -601,6 +607,8 @@ func (a ActionType) DefaultTimeout() time.Duration {
601607
return ActionEncryptionKeyStatusUpdateDefaultTimeout
602608
case ActionTypeEnforceResignLeadership:
603609
return ActionEnforceResignLeadershipDefaultTimeout
610+
case ActionTypeEnsureSecuredResignLeadership:
611+
return ActionEnsureSecuredResignLeadershipDefaultTimeout
604612
case ActionTypeIdle:
605613
return ActionIdleDefaultTimeout
606614
case ActionTypeJWTAdd:
@@ -779,6 +787,8 @@ func (a ActionType) Priority() ActionPriority {
779787
return ActionPriorityNormal
780788
case ActionTypeEnforceResignLeadership:
781789
return ActionPriorityNormal
790+
case ActionTypeEnsureSecuredResignLeadership:
791+
return ActionPriorityNormal
782792
case ActionTypeIdle:
783793
return ActionPriorityNormal
784794
case ActionTypeJWTAdd:
@@ -969,6 +979,8 @@ func (a ActionType) Optional() bool {
969979
return false
970980
case ActionTypeEnforceResignLeadership:
971981
return true
982+
case ActionTypeEnsureSecuredResignLeadership:
983+
return false
972984
case ActionTypeIdle:
973985
return false
974986
case ActionTypeJWTAdd:

0 commit comments

Comments
 (0)