Skip to content

Commit

Permalink
Initialize annotations map before use
Browse files Browse the repository at this point in the history
  • Loading branch information
AMecea committed May 14, 2019
1 parent 80e8f35 commit d9206d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/controller/node/node_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ func (r *ReconcileMysqlNode) Reconcile(request reconcile.Request) (reconcile.Res
if shouldUpdateToVersion(cluster, 300) {
// if the cluster is upgraded then set on the cluster an annotations that skips the GTID configuration
// TODO: this should be removed in the next versions
if cluster.Annotations == nil {
cluster.Annotations = make(map[string]string)
}
cluster.Annotations["mysql.presslabs.org/SkipGTIDPurged"] = "true"
return reconcile.Result{}, r.Update(ctx, cluster.Unwrap())
}
Expand Down

0 comments on commit d9206d8

Please sign in to comment.