Skip to content

Commit

Permalink
Rename orchestrator finalizer
Browse files Browse the repository at this point in the history
  • Loading branch information
AMecea committed May 10, 2019
1 parent 8a842a5 commit bfe4646
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/controller/orchestrator/orchestrator_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ const (

// OrchestratorFinalizer is set when the cluster is registered in
// orchestrator and is removed when no nodes are in orchestrator
OrchestratorFinalizer = "OrchestratorFinalizer"
OrchestratorFinalizer = "mysql.presslabs.org/registered-in-orchestrator"

// OldOrchestratorFinalizer is the old finalizer name that is DEPRECATED
OldOrchestratorFinalizer = "OrchestratorFinalizer"
)

var log = logf.Log.WithName(controllerName)
Expand Down
2 changes: 2 additions & 0 deletions pkg/controller/orchestrator/orchestrator_syncers.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ func newFinalizerSyncer(c client.Client, scheme *runtime.Scheme, cluster *mysqlc

// always add finalizer, this action is idempotent
addFinalizer(out, OrchestratorFinalizer)
// TODO: remove this in next version
removeFinalizer(out, OldOrchestratorFinalizer)

// if cluster is deleted then check orchestrator status and remove finalizer if no node is in orchestrator
if out.DeletionTimestamp != nil {
Expand Down

0 comments on commit bfe4646

Please sign in to comment.