Skip to content

Commit d734152

Browse files
committed
Fix health checker changed logic
1 parent 093f060 commit d734152

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pkg/oci/load_balancer_util.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -126,34 +126,34 @@ func toInt(i *int) int {
126126

127127
func hasHealthCheckerChanged(actual *loadbalancer.HealthChecker, desired *loadbalancer.HealthCheckerDetails) bool {
128128
if actual == nil {
129-
return !(desired == nil)
129+
return desired != nil
130130
}
131131

132132
if toInt(actual.Port) != toInt(desired.Port) {
133-
return false
133+
return true
134134
}
135135

136136
if toString(actual.ResponseBodyRegex) != toString(desired.ResponseBodyRegex) {
137-
return false
137+
return true
138138
}
139139

140140
if toInt(actual.Retries) != toInt(desired.Retries) {
141-
return false
141+
return true
142142
}
143143

144144
if toInt(actual.ReturnCode) != toInt(desired.ReturnCode) {
145-
return false
145+
return true
146146
}
147147

148148
if toInt(actual.TimeoutInMillis) != toInt(desired.TimeoutInMillis) {
149-
return false
149+
return true
150150
}
151151

152152
if toString(actual.UrlPath) != toString(desired.UrlPath) {
153-
return false
153+
return true
154154
}
155155

156-
return true
156+
return false
157157
}
158158

159159
// TODO(horwitz): this doesn't check weight which we may want in the future to

0 commit comments

Comments
 (0)