Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
1 change: 1 addition & 0 deletions internal/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/deployment/v1/actions.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
160 changes: 160 additions & 0 deletions pkg/apis/deployment/v2alpha1/actions.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
2 changes: 1 addition & 1 deletion pkg/deployment/reconcile/action.register.generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
})
})

Expand Down