diff --git a/opensearch-operator/pkg/reconcilers/ismpolicy.go b/opensearch-operator/pkg/reconcilers/ismpolicy.go index e10a3bad2..d833573d1 100644 --- a/opensearch-operator/pkg/reconcilers/ismpolicy.go +++ b/opensearch-operator/pkg/reconcilers/ismpolicy.go @@ -167,6 +167,7 @@ func (r *IsmPolicyReconciler) Reconcile() (retResult ctrl.Result, retErr error) } existingPolicy, err := services.GetPolicy(r.ctx, r.osClient, policyId) + r.logger.Info("rkth policy id 1: " + policyId) // If not exists, create if errors.Is(err, services.ErrNotFound) { if err != nil { @@ -191,6 +192,7 @@ func (r *IsmPolicyReconciler) Reconcile() (retResult ctrl.Result, retErr error) }, nil } + r.logger.Info("rkth policy id 2: " + policyId) // If some other error if err != nil { reason = "failed to get policy from Opensearch API" @@ -199,12 +201,14 @@ func (r *IsmPolicyReconciler) Reconcile() (retResult ctrl.Result, retErr error) return } + r.logger.Info("rkth policy id 3: " + policyId) // Return if there are no changes if r.instance.Spec.PolicyID == existingPolicy.PolicyID && cmp.Equal(newPolicy, existingPolicy.Policy, cmpopts.EquateEmpty()) { reason = opensearchIsmPolicyExists return } + r.logger.Info("rkth policy id 4: " + policyId) request := requests.ISMPolicy{ Policy: *newPolicy, }