Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for full cluster restart with pod reuse #1239

Merged
merged 1 commit into from
Jul 15, 2019
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
2 changes: 1 addition & 1 deletion docs/design/0009-pod-reuse-es-restart.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Reusing pods by restarting the ES process with a new configuration

* Status: proposed
* Status: rejected (implementation removed) in July 2019, in favor of moving towards the StatefulSet way of doing rolling restarts. The process-manager is also out of the picture. We don't reuse pods. Main benefits are code and architecture simplicity as well as respecting k8s standards.
* Deciders: cloud-on-k8s team
* Date: 2019-03-20

Expand Down
20 changes: 0 additions & 20 deletions operators/pkg/controller/elasticsearch/driver/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
"github.com/elastic/cloud-on-k8s/operators/pkg/controller/elasticsearch/pod"
"github.com/elastic/cloud-on-k8s/operators/pkg/controller/elasticsearch/pvc"
"github.com/elastic/cloud-on-k8s/operators/pkg/controller/elasticsearch/reconcile"
"github.com/elastic/cloud-on-k8s/operators/pkg/controller/elasticsearch/restart"
"github.com/elastic/cloud-on-k8s/operators/pkg/controller/elasticsearch/services"
"github.com/elastic/cloud-on-k8s/operators/pkg/controller/elasticsearch/settings"
"github.com/elastic/cloud-on-k8s/operators/pkg/controller/elasticsearch/user"
Expand Down Expand Up @@ -239,25 +238,6 @@ func (d *defaultDriver) Reconcile(
"es_name", es.Name,
)

// restart ES processes that need to be restarted before going on with other changes
done, err := restart.HandleESRestarts(
restart.RestartContext{
Cluster: es,
EventsRecorder: reconcileState.Recorder,
K8sClient: d.Client,
Changes: *changes,
Dialer: d.Dialer,
EsClient: esClient,
},
)
if err != nil {
return results.WithError(err)
}
if !done {
log.V(1).Info("Pods restart is not over yet, re-queueing.", "namespace", es.Namespace, "es_name", es.Name)
return results.WithResult(defaultRequeue)
}

// figure out what changes we can perform right now
performableChanges, err := mutation.CalculatePerformableChanges(es.Spec.UpdateStrategy, *changes, podsState)
if err != nil {
Expand Down
168 changes: 0 additions & 168 deletions operators/pkg/controller/elasticsearch/restart/annotations.go

This file was deleted.

157 changes: 0 additions & 157 deletions operators/pkg/controller/elasticsearch/restart/annotations_test.go

This file was deleted.

Loading