File tree 7 files changed +37
-1
lines changed
7 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,11 @@ type LinodeCluster struct {
103
103
}
104
104
105
105
func (lc * LinodeCluster ) GetConditions () []metav1.Condition {
106
+ for i := range lc .Status .Conditions {
107
+ if lc .Status .Conditions [i ].Reason == "" {
108
+ lc .Status .Conditions [i ].Reason = DefaultConditionReason
109
+ }
110
+ }
106
111
return lc .Status .Conditions
107
112
}
108
113
Original file line number Diff line number Diff line change @@ -137,6 +137,11 @@ type LinodeFirewall struct {
137
137
}
138
138
139
139
func (lfw * LinodeFirewall ) GetConditions () []metav1.Condition {
140
+ for i := range lfw .Status .Conditions {
141
+ if lfw .Status .Conditions [i ].Reason == "" {
142
+ lfw .Status .Conditions [i ].Reason = DefaultConditionReason
143
+ }
144
+ }
140
145
return lfw .Status .Conditions
141
146
}
142
147
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ import (
27
27
const (
28
28
// MachineFinalizer allows ReconcileLinodeMachine to clean up Linode resources associated
29
29
// with LinodeMachine before removing it from the apiserver.
30
- MachineFinalizer = "linodemachine.infrastructure.cluster.x-k8s.io"
30
+ MachineFinalizer = "linodemachine.infrastructure.cluster.x-k8s.io"
31
+ DefaultConditionReason = "None"
31
32
)
32
33
33
34
// LinodeMachineSpec defines the desired state of LinodeMachine
@@ -237,6 +238,11 @@ type LinodeMachine struct {
237
238
}
238
239
239
240
func (lm * LinodeMachine ) GetConditions () []metav1.Condition {
241
+ for i := range lm .Status .Conditions {
242
+ if lm .Status .Conditions [i ].Reason == "" {
243
+ lm .Status .Conditions [i ].Reason = DefaultConditionReason
244
+ }
245
+ }
240
246
return lm .Status .Conditions
241
247
}
242
248
Original file line number Diff line number Diff line change @@ -105,6 +105,11 @@ type LinodeObjectStorageBucket struct {
105
105
}
106
106
107
107
func (losb * LinodeObjectStorageBucket ) GetConditions () []metav1.Condition {
108
+ for i := range losb .Status .Conditions {
109
+ if losb .Status .Conditions [i ].Reason == "" {
110
+ losb .Status .Conditions [i ].Reason = DefaultConditionReason
111
+ }
112
+ }
108
113
return losb .Status .Conditions
109
114
}
110
115
Original file line number Diff line number Diff line change @@ -133,6 +133,11 @@ type LinodeObjectStorageKey struct {
133
133
}
134
134
135
135
func (losk * LinodeObjectStorageKey ) GetConditions () []metav1.Condition {
136
+ for i := range losk .Status .Conditions {
137
+ if losk .Status .Conditions [i ].Reason == "" {
138
+ losk .Status .Conditions [i ].Reason = DefaultConditionReason
139
+ }
140
+ }
136
141
return losk .Status .Conditions
137
142
}
138
143
Original file line number Diff line number Diff line change @@ -118,6 +118,11 @@ type LinodePlacementGroup struct {
118
118
}
119
119
120
120
func (lpg * LinodePlacementGroup ) GetConditions () []metav1.Condition {
121
+ for i := range lpg .Status .Conditions {
122
+ if lpg .Status .Conditions [i ].Reason == "" {
123
+ lpg .Status .Conditions [i ].Reason = DefaultConditionReason
124
+ }
125
+ }
121
126
return lpg .Status .Conditions
122
127
}
123
128
Original file line number Diff line number Diff line change @@ -124,6 +124,11 @@ type LinodeVPC struct {
124
124
}
125
125
126
126
func (lv * LinodeVPC ) GetConditions () []metav1.Condition {
127
+ for i := range lv .Status .Conditions {
128
+ if lv .Status .Conditions [i ].Reason == "" {
129
+ lv .Status .Conditions [i ].Reason = DefaultConditionReason
130
+ }
131
+ }
127
132
return lv .Status .Conditions
128
133
}
129
134
You can’t perform that action at this time.
0 commit comments