@@ -95,28 +95,28 @@ func getStatus(ctx context.Context, lister operatorLister, selector []string) (*
95
95
96
96
found := false
97
97
for _ , c := range co .Items {
98
- if len (selector ) > 0 && ! slices .Contains (selector , c .ObjectMeta . Name ) {
98
+ if len (selector ) > 0 && ! slices .Contains (selector , c .Name ) {
99
99
continue
100
100
}
101
101
found = true
102
102
for _ , con := range c .Status .Conditions {
103
103
switch con .Type {
104
104
case openshiftapi .OperatorAvailable :
105
105
if con .Status != openshiftapi .ConditionTrue {
106
- logging .Debug (c .ObjectMeta . Name , " operator not available, Reason: " , con .Reason )
107
- cs .unavailable = append (cs .unavailable , c .ObjectMeta . Name )
106
+ logging .Debug (c .Name , " operator not available, Reason: " , con .Reason )
107
+ cs .unavailable = append (cs .unavailable , c .Name )
108
108
cs .Available = false
109
109
}
110
110
case openshiftapi .OperatorDegraded :
111
111
if con .Status == openshiftapi .ConditionTrue {
112
- logging .Debug (c .ObjectMeta . Name , " operator is degraded, Reason: " , con .Reason )
113
- cs .degraded = append (cs .degraded , c .ObjectMeta . Name )
112
+ logging .Debug (c .Name , " operator is degraded, Reason: " , con .Reason )
113
+ cs .degraded = append (cs .degraded , c .Name )
114
114
cs .Degraded = true
115
115
}
116
116
case openshiftapi .OperatorProgressing :
117
117
if con .Status == openshiftapi .ConditionTrue {
118
- logging .Debug (c .ObjectMeta . Name , " operator is still progressing, Reason: " , con .Reason )
119
- cs .progressing = append (cs .progressing , c .ObjectMeta . Name )
118
+ logging .Debug (c .Name , " operator is still progressing, Reason: " , con .Reason )
119
+ cs .progressing = append (cs .progressing , c .Name )
120
120
cs .Progressing = true
121
121
}
122
122
case openshiftapi .OperatorUpgradeable :
@@ -125,15 +125,15 @@ func getStatus(ctx context.Context, lister operatorLister, selector []string) (*
125
125
continue
126
126
case "Disabled" : // non official status, used by insights and cluster baremetal operators
127
127
if con .Status == openshiftapi .ConditionTrue {
128
- logging .Debug (c .ObjectMeta . Name , " operator is disabled, Reason: " , con .Reason )
128
+ logging .Debug (c .Name , " operator is disabled, Reason: " , con .Reason )
129
129
cs .Disabled = true
130
130
}
131
131
case "ManagementStateDegraded" : // only for the network operator
132
132
continue
133
133
case "RecentBackup" : // only for etcd operator
134
134
continue
135
135
default :
136
- logging .Debugf ("Unexpected operator status for %s: %s" , c .ObjectMeta . Name , con .Type )
136
+ logging .Debugf ("Unexpected operator status for %s: %s" , c .Name , con .Type )
137
137
}
138
138
}
139
139
}
0 commit comments