Skip to content

Commit 0afab7b

Browse files
authored
define healthCheckNodePort when updating octavia (kubernetes#1757)
1 parent a8354b3 commit 0afab7b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/openstack/loadbalancer.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,10 @@ func (lbaas *LbaasV2) checkServiceUpdate(service *corev1.Service, nodes []*corev
15001500
svcConf.enableProxyProtocol = useProxyProtocol
15011501

15021502
svcConf.tlsContainerRef = getStringFromServiceAnnotation(service, ServiceAnnotationTlsContainerRef, lbaas.opts.TlsContainerRef)
1503-
1503+
svcConf.enableMonitor = getBoolFromServiceAnnotation(service, ServiceAnnotationLoadBalancerEnableHealthMonitor, lbaas.opts.CreateMonitor)
1504+
if svcConf.enableMonitor && lbaas.opts.UseOctavia && service.Spec.ExternalTrafficPolicy == corev1.ServiceExternalTrafficPolicyTypeLocal && service.Spec.HealthCheckNodePort > 0 {
1505+
svcConf.healthCheckNodePort = int(service.Spec.HealthCheckNodePort)
1506+
}
15041507
return nil
15051508
}
15061509

0 commit comments

Comments
 (0)