Skip to content

Commit

Permalink
Revert decommission on delete feature
Browse files Browse the repository at this point in the history
As there 1 hour limit with cloud provider node pool migration, that is not
enough for some Redpanda cluster to finish decommission on delete feature
will be removed from Redpanda operator.

Reference

#112
  • Loading branch information
RafalKorepta committed Jun 18, 2024
1 parent 9aaa753 commit e8ef83d
Show file tree
Hide file tree
Showing 15 changed files with 1 addition and 273 deletions.
14 changes: 1 addition & 13 deletions src/go/k8s/internal/controller/redpanda/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ const (
SecretAnnotationExternalCAKey = "operator.redpanda.com/external-ca"

NotManaged = "false"

DecommissionOnDeleteAnnotation = "operator.redpanda.com/decommission-on-delete"
)

var (
Expand Down Expand Up @@ -338,16 +336,6 @@ func (r *ClusterReconciler) handlePodFinalizer(
return fmt.Errorf("unable to fetch PodList: %w", err)
}

var decommissionOnDelete bool
decommissionOnDeleteVal, ok := rp.Annotations[DecommissionOnDeleteAnnotation]
if ok {
decommissionOnDelete, err = strconv.ParseBool(decommissionOnDeleteVal)
if err != nil {
//nolint:goerr113 // not going to use wrapped static error here this time
return fmt.Errorf("value of annotation operator.redpanda.com/decommission-on-delete must be convertable to boolean")
}
}

for i := range pods.Items {
pod := &pods.Items[i]
if pod.DeletionTimestamp.IsZero() {
Expand All @@ -371,7 +359,7 @@ func (r *ClusterReconciler) handlePodFinalizer(
// nor has a noexecute taint
untainted := true
for _, taint := range node.Spec.Taints {
if (taint.Effect == corev1.TaintEffectNoExecute && taint.Key == corev1.TaintNodeUnreachable) || (decommissionOnDelete && taint.Effect == corev1.TaintEffectNoSchedule) {
if taint.Effect == corev1.TaintEffectNoExecute && taint.Key == corev1.TaintNodeUnreachable {
untainted = false
}
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

30 changes: 0 additions & 30 deletions src/go/k8s/tests/e2e-unstable/decommission-on-delete/02-probe.yaml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

28 changes: 0 additions & 28 deletions src/go/k8s/tests/e2e-unstable/decommission-on-delete/06-clean.yaml

This file was deleted.

This file was deleted.

0 comments on commit e8ef83d

Please sign in to comment.