Skip to content

Commit 297302f

Browse files
authored
condition status update (#562)
1 parent 706a0de commit 297302f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

api/v1alpha1/operandrequest_types.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -294,16 +294,16 @@ func (r *OperandRequest) SetMemberStatus(name string, operatorPhase OperatorPhas
294294
if m != nil {
295295
if operatorPhase != "" && operatorPhase != m.Phase.OperatorPhase {
296296
r.Status.Members[pos].Phase.OperatorPhase = operatorPhase
297-
r.setOperatorReadyCondition(m, name)
297+
r.setOperatorReadyCondition(operatorPhase, name)
298298
}
299299
if operandPhase != "" && operandPhase != m.Phase.OperandPhase {
300300
r.Status.Members[pos].Phase.OperandPhase = operandPhase
301-
r.setOperandReadyCondition(m, name)
301+
r.setOperandReadyCondition(operandPhase, name)
302302
}
303303
} else {
304304
newM := newMemberStatus(name, operatorPhase, operandPhase)
305305
r.Status.Members = append(r.Status.Members, newM)
306-
r.setOperatorReadyCondition(&newM, name)
306+
r.setOperatorReadyCondition(operatorPhase, name)
307307
}
308308
}
309309

@@ -333,16 +333,16 @@ func (r *OperandRequest) RemoveMemberCRStatus(name, CRName, CRKind string) {
333333
}
334334
}
335335

336-
func (r *OperandRequest) setOperatorReadyCondition(m *MemberStatus, name string) {
337-
if m.Phase.OperatorPhase == OperatorRunning {
336+
func (r *OperandRequest) setOperatorReadyCondition(operatorPhase OperatorPhase, name string) {
337+
if operatorPhase == OperatorRunning {
338338
r.SetReadyCondition(name, ResourceTypeOperator, corev1.ConditionTrue)
339339
} else {
340340
r.SetReadyCondition(name, ResourceTypeOperator, corev1.ConditionFalse)
341341
}
342342
}
343343

344-
func (r *OperandRequest) setOperandReadyCondition(m *MemberStatus, name string) {
345-
if m.Phase.OperandPhase == ServiceRunning {
344+
func (r *OperandRequest) setOperandReadyCondition(operandPhase ServicePhase, name string) {
345+
if operandPhase == ServiceRunning {
346346
r.SetReadyCondition(name, ResourceTypeOperand, corev1.ConditionTrue)
347347
} else {
348348
r.SetReadyCondition(name, ResourceTypeOperand, corev1.ConditionFalse)

0 commit comments

Comments
 (0)