mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
[Feature] Optional ResignLeadership (#1246)
This commit is contained in:
parent
2664b5ab3c
commit
e709c074e8
6 changed files with 165 additions and 3 deletions
|
@ -12,6 +12,7 @@
|
|||
- (Maintenance) Add license range rewrite command
|
||||
- (Feature) Optional Action
|
||||
- (Maintenance) Add & Enable YAML Linter
|
||||
- (Feature) Optional ResignLeadership Action
|
||||
|
||||
## [1.2.24](https://github.com/arangodb/kube-arangodb/tree/1.2.24) (2023-01-25)
|
||||
- (Bugfix) Fix deployment creation on ARM64
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
| RemoveMember | no | 15m0s | no | Community & Enterprise | Removes member from the Cluster and Status |
|
||||
| RenewTLSCACertificate | no | 30m0s | no | Enterprise Only | Recreate Managed CA secret |
|
||||
| RenewTLSCertificate | no | 30m0s | no | Enterprise Only | Recreate Server TLS Certificate secret |
|
||||
| ResignLeadership | no | 30m0s | no | Community & Enterprise | Run the ResignLeadership job on DBServer |
|
||||
| ResignLeadership | no | 30m0s | yes | Community & Enterprise | Run the ResignLeadership job on DBServer |
|
||||
| ResourceSync | no | 10m0s | no | Community & Enterprise | Runs the Resource sync |
|
||||
| RotateMember | no | 15m0s | no | Community & Enterprise | Waits for Pod restart and recreation |
|
||||
| RotateStartMember | no | 15m0s | no | Community & Enterprise | Start member rotation. After this action member is down |
|
||||
|
|
|
@ -25,6 +25,7 @@ actions:
|
|||
ResignLeadership:
|
||||
description: Run the ResignLeadership job on DBServer
|
||||
timeout: 30m
|
||||
optional: true
|
||||
KillMemberPod:
|
||||
description: Execute Delete on Pod 9put pod in Terminating state)
|
||||
RotateMember:
|
||||
|
|
|
@ -759,7 +759,7 @@ func (a ActionType) Optional() bool {
|
|||
case ActionTypeRenewTLSCertificate:
|
||||
return false
|
||||
case ActionTypeResignLeadership:
|
||||
return false
|
||||
return true
|
||||
case ActionTypeResourceSync:
|
||||
return false
|
||||
case ActionTypeRotateMember:
|
||||
|
|
|
@ -662,3 +662,163 @@ func (a ActionType) Internal() bool {
|
|||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// Optional returns true if action execution wont abort Plan
|
||||
func (a ActionType) Optional() bool {
|
||||
switch a {
|
||||
case ActionTypeAddMember:
|
||||
return false
|
||||
case ActionTypeAppendTLSCACertificate:
|
||||
return false
|
||||
case ActionTypeArangoMemberUpdatePodSpec:
|
||||
return false
|
||||
case ActionTypeArangoMemberUpdatePodStatus:
|
||||
return false
|
||||
case ActionTypeBackupRestore:
|
||||
return false
|
||||
case ActionTypeBackupRestoreClean:
|
||||
return false
|
||||
case ActionTypeBootstrapSetPassword:
|
||||
return false
|
||||
case ActionTypeBootstrapUpdate:
|
||||
return false
|
||||
case ActionTypeCleanOutMember:
|
||||
return false
|
||||
case ActionTypeCleanTLSCACertificate:
|
||||
return false
|
||||
case ActionTypeCleanTLSKeyfileCertificate:
|
||||
return false
|
||||
case ActionTypeClusterMemberCleanup:
|
||||
return false
|
||||
case ActionTypeDisableClusterScaling:
|
||||
return false
|
||||
case ActionTypeDisableMaintenance:
|
||||
return false
|
||||
case ActionTypeDisableMemberMaintenance:
|
||||
return false
|
||||
case ActionTypeEnableClusterScaling:
|
||||
return false
|
||||
case ActionTypeEnableMaintenance:
|
||||
return false
|
||||
case ActionTypeEnableMemberMaintenance:
|
||||
return false
|
||||
case ActionTypeEncryptionKeyAdd:
|
||||
return false
|
||||
case ActionTypeEncryptionKeyPropagated:
|
||||
return false
|
||||
case ActionTypeEncryptionKeyRefresh:
|
||||
return false
|
||||
case ActionTypeEncryptionKeyRemove:
|
||||
return false
|
||||
case ActionTypeEncryptionKeyStatusUpdate:
|
||||
return false
|
||||
case ActionTypeIdle:
|
||||
return false
|
||||
case ActionTypeJWTAdd:
|
||||
return false
|
||||
case ActionTypeJWTClean:
|
||||
return false
|
||||
case ActionTypeJWTPropagated:
|
||||
return false
|
||||
case ActionTypeJWTRefresh:
|
||||
return false
|
||||
case ActionTypeJWTSetActive:
|
||||
return false
|
||||
case ActionTypeJWTStatusUpdate:
|
||||
return false
|
||||
case ActionTypeKillMemberPod:
|
||||
return false
|
||||
case ActionTypeLicenseSet:
|
||||
return false
|
||||
case ActionTypeMarkToRemoveMember:
|
||||
return false
|
||||
case ActionTypeMemberPhaseUpdate:
|
||||
return false
|
||||
case ActionTypeMemberRIDUpdate:
|
||||
return false
|
||||
case ActionTypePVCResize:
|
||||
return false
|
||||
case ActionTypePVCResized:
|
||||
return false
|
||||
case ActionTypePlaceHolder:
|
||||
return false
|
||||
case ActionTypeRebalancerCheck:
|
||||
return false
|
||||
case ActionTypeRebalancerClean:
|
||||
return false
|
||||
case ActionTypeRebalancerGenerate:
|
||||
return false
|
||||
case ActionTypeRecreateMember:
|
||||
return false
|
||||
case ActionTypeRefreshTLSKeyfileCertificate:
|
||||
return false
|
||||
case ActionTypeRemoveMember:
|
||||
return false
|
||||
case ActionTypeRenewTLSCACertificate:
|
||||
return false
|
||||
case ActionTypeRenewTLSCertificate:
|
||||
return false
|
||||
case ActionTypeResignLeadership:
|
||||
return true
|
||||
case ActionTypeResourceSync:
|
||||
return false
|
||||
case ActionTypeRotateMember:
|
||||
return false
|
||||
case ActionTypeRotateStartMember:
|
||||
return false
|
||||
case ActionTypeRotateStopMember:
|
||||
return false
|
||||
case ActionTypeRuntimeContainerArgsLogLevelUpdate:
|
||||
return false
|
||||
case ActionTypeRuntimeContainerImageUpdate:
|
||||
return false
|
||||
case ActionTypeRuntimeContainerSyncTolerations:
|
||||
return false
|
||||
case ActionTypeSetCondition:
|
||||
return false
|
||||
case ActionTypeSetConditionV2:
|
||||
return false
|
||||
case ActionTypeSetCurrentImage:
|
||||
return false
|
||||
case ActionTypeSetCurrentMemberArch:
|
||||
return false
|
||||
case ActionTypeSetMaintenanceCondition:
|
||||
return false
|
||||
case ActionTypeSetMemberCondition:
|
||||
return false
|
||||
case ActionTypeSetMemberConditionV2:
|
||||
return false
|
||||
case ActionTypeSetMemberCurrentImage:
|
||||
return false
|
||||
case ActionTypeShutdownMember:
|
||||
return false
|
||||
case ActionTypeTLSKeyStatusUpdate:
|
||||
return false
|
||||
case ActionTypeTLSPropagated:
|
||||
return false
|
||||
case ActionTypeTimezoneSecretSet:
|
||||
return false
|
||||
case ActionTypeTopologyDisable:
|
||||
return false
|
||||
case ActionTypeTopologyEnable:
|
||||
return false
|
||||
case ActionTypeTopologyMemberAssignment:
|
||||
return false
|
||||
case ActionTypeTopologyZonesUpdate:
|
||||
return false
|
||||
case ActionTypeUpToDateUpdate:
|
||||
return false
|
||||
case ActionTypeUpdateTLSSNI:
|
||||
return false
|
||||
case ActionTypeUpgradeMember:
|
||||
return false
|
||||
case ActionTypeWaitForMemberInSync:
|
||||
return false
|
||||
case ActionTypeWaitForMemberReady:
|
||||
return false
|
||||
case ActionTypeWaitForMemberUp:
|
||||
return false
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -496,7 +496,7 @@ func Test_Actions(t *testing.T) {
|
|||
require.False(t, api.ActionTypeResignLeadership.Internal())
|
||||
})
|
||||
t.Run("Optional", func(t *testing.T) {
|
||||
require.False(t, api.ActionTypeResignLeadership.Optional())
|
||||
require.True(t, api.ActionTypeResignLeadership.Optional())
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue