Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
rkthtrifork committed Jun 17, 2024
1 parent ee3f1dd commit 5c24de9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions opensearch-operator/pkg/reconcilers/ismpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ func (r *IsmPolicyReconciler) Reconcile() (retResult ctrl.Result, retErr error)
return
}
r.instance.Status.ExistingISMPolicy = pointer.Bool(false)
b := "false"
if *r.instance.Status.ExistingISMPolicy {
b = "true"
}
r.logger.Info("rkth set existing policy: " + b)
return ctrl.Result{
Requeue: true,
RequeueAfter: 30 * time.Second,
Expand All @@ -195,6 +200,11 @@ func (r *IsmPolicyReconciler) Reconcile() (retResult ctrl.Result, retErr error)
}

// If the ISM policy exists in OpenSearch cluster and we have not reconciled it before then we should not overwrite the existing policy
b := "false"
if *r.instance.Status.ExistingISMPolicy {
b = "true"
}
r.logger.Info("rkth existing policy: " + b)
if r.instance.Status.ExistingISMPolicy == nil || *r.instance.Status.ExistingISMPolicy {
r.instance.Status.ExistingISMPolicy = pointer.Bool(true)
reason = opensearchIsmPolicyExists
Expand Down

0 comments on commit 5c24de9

Please sign in to comment.