mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
[Bugfix] Remove Condition Check (#1681)
This commit is contained in:
parent
70cdbff501
commit
dad2c2d347
3 changed files with 13 additions and 10 deletions
|
@ -5,6 +5,7 @@
|
|||
- (Feature) Fix CRD Schema types
|
||||
- (Bugfix) Adjust Prometheus Monitor labels
|
||||
- (Feature) Expose HTTP Client Config
|
||||
- (Bugfix) MarkedToRemove Condition Check
|
||||
|
||||
## [1.2.41](https://github.com/arangodb/kube-arangodb/tree/1.2.41) (2024-05-24)
|
||||
- (Maintenance) Bump Prometheus API Version
|
||||
|
|
|
@ -61,11 +61,6 @@ func getShutdownHelper(a actionImpl) (ActionCore, api.MemberStatus, bool) {
|
|||
return nil, api.MemberStatus{}, false
|
||||
}
|
||||
|
||||
if ifPodUIDMismatch(m, a.action, cache) {
|
||||
a.log.Error("Member UID is changed")
|
||||
return NewActionSuccess(), m, true
|
||||
}
|
||||
|
||||
pod, ok := cache.Pod().V1().GetSimple(m.Pod.GetName())
|
||||
if !ok {
|
||||
a.log.Str("pod-name", m.Pod.GetName()).Warn("pod is already gone")
|
||||
|
@ -73,6 +68,11 @@ func getShutdownHelper(a actionImpl) (ActionCore, api.MemberStatus, bool) {
|
|||
return NewActionSuccess(), m, true
|
||||
}
|
||||
|
||||
if ifPodUIDMismatch(m, a.action, cache) {
|
||||
a.log.Error("Member UID is changed")
|
||||
return NewActionSuccess(), m, true
|
||||
}
|
||||
|
||||
if _, ok := pod.GetAnnotations()[deployment.ArangoDeploymentPodDeleteNow]; ok {
|
||||
// The pod contains annotation, so pod must be deleted immediately.
|
||||
return shutdownNow{actionImpl: a, memberStatus: m}, m, true
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2023 ArangoDB GmbH, Cologne, Germany
|
||||
// Copyright 2016-2024 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.
|
||||
|
@ -140,10 +140,12 @@ func (r *Reconciler) createReplaceMemberPlan(ctx context.Context, apiObject k8su
|
|||
|
||||
switch group {
|
||||
case api.ServerGroupDBServers:
|
||||
plan = append(plan, actions.NewAction(api.ActionTypeAddMember, group, sharedReconcile.WithPredefinedMember("")))
|
||||
r.planLogger.
|
||||
Str("role", group.AsRole()).
|
||||
Debug("Creating replacement plan")
|
||||
if len(status.Members.DBServers) <= spec.DBServers.GetCount() {
|
||||
plan = append(plan, actions.NewAction(api.ActionTypeAddMember, group, sharedReconcile.WithPredefinedMember("")))
|
||||
r.planLogger.
|
||||
Str("role", group.AsRole()).
|
||||
Debug("Creating replacement plan")
|
||||
}
|
||||
case api.ServerGroupCoordinators:
|
||||
plan = append(plan, cleanOutMember(group, member)...)
|
||||
r.planLogger.
|
||||
|
|
Loading…
Reference in a new issue