@@ -39,6 +39,7 @@ func (r *ReconcileCredentialsRequest) GetConditions(logger log.FieldLogger) ([]c
3939 mode ,
4040 credRequests ,
4141 r .platformType ,
42+ & r .degradedDebouncer ,
4243 logger ), nil
4344}
4445
@@ -92,6 +93,7 @@ func computeStatusConditions(
9293 mode operatorv1.CloudCredentialsMode ,
9394 credRequests []minterv1.CredentialsRequest ,
9495 clusterCloudPlatform configv1.PlatformType ,
96+ degradedDebouncer * utils.DegradedDebouncer ,
9597 logger log.FieldLogger ) []configv1.ClusterOperatorStatusCondition {
9698 operatorIsDisabled := mode == operatorv1 .CloudCredentialsModeManual
9799
@@ -142,14 +144,26 @@ func computeStatusConditions(
142144 }
143145
144146 if failingCredRequests > 0 {
145- var degradedCondition configv1.ClusterOperatorStatusCondition
146- degradedCondition .Type = configv1 .OperatorDegraded
147- degradedCondition .Status = configv1 .ConditionTrue
148- degradedCondition .Reason = reasonCredentialsFailing
149- degradedCondition .Message = fmt .Sprintf (
150- "%d of %d credentials requests are failing to sync." ,
151- failingCredRequests , len (validCredRequests ))
152- conditions = append (conditions , degradedCondition )
147+ degradedDebouncer .MarkDegraded ()
148+ if degradedDebouncer .ShouldReport () {
149+ var degradedCondition configv1.ClusterOperatorStatusCondition
150+ degradedCondition .Type = configv1 .OperatorDegraded
151+ degradedCondition .Status = configv1 .ConditionTrue
152+ degradedCondition .Reason = reasonCredentialsFailing
153+ degradedCondition .Message = fmt .Sprintf (
154+ "%d of %d credentials requests are failing to sync." ,
155+ failingCredRequests , len (validCredRequests ))
156+ conditions = append (conditions , degradedCondition )
157+ } else {
158+ logger .Debugf (
159+ "%d of %d credentials are failing to sync, but only for %s" ,
160+ failingCredRequests ,
161+ len (validCredRequests ),
162+ degradedDebouncer .DegradedFor (),
163+ )
164+ }
165+ } else {
166+ degradedDebouncer .MarkNotDegraded ()
153167 }
154168
155169 // Progressing should be true if the operator is making changes to the operand. In this case
0 commit comments