Commit ecf24101 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #31485 from m1093782566/m109-proxy-fix-naming

Automatic merge from submit-queue [kube-proxy] Fix naming errors and sentence breaking in pkg/proxy/healthcheck <!-- Thanks for sending a pull request! Here are some tips for you: 1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md 2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md 3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes --> **What this PR does / why we need it**: addresses #31484 @girishkalele
parents 9deb18b9 e16e5c4f
...@@ -33,12 +33,12 @@ func UpdateEndpoints(serviceName types.NamespacedName, endpointUids sets.String) ...@@ -33,12 +33,12 @@ func UpdateEndpoints(serviceName types.NamespacedName, endpointUids sets.String)
healthchecker.mutationRequestChannel <- req healthchecker.mutationRequestChannel <- req
} }
func updateServiceListener(serviceName types.NamespacedName, listenPort int, addOrDelete bool) bool { func updateServiceListener(serviceName types.NamespacedName, listenPort int, add bool) bool {
responseChannel := make(chan bool) responseChannel := make(chan bool)
req := &proxyListenerRequest{ req := &proxyListenerRequest{
serviceName: serviceName, serviceName: serviceName,
listenPort: uint16(listenPort), listenPort: uint16(listenPort),
add: addOrDelete, add: add,
responseChannel: responseChannel, responseChannel: responseChannel,
} }
healthchecker.listenerRequestChannel <- req healthchecker.listenerRequestChannel <- req
...@@ -50,7 +50,7 @@ func AddServiceListener(serviceName types.NamespacedName, listenPort int) bool { ...@@ -50,7 +50,7 @@ func AddServiceListener(serviceName types.NamespacedName, listenPort int) bool {
return updateServiceListener(serviceName, listenPort, true) return updateServiceListener(serviceName, listenPort, true)
} }
// DeleteServiceListener Request addition of a listener for a service's health check // DeleteServiceListener Request deletion of a listener for a service's health check
func DeleteServiceListener(serviceName types.NamespacedName, listenPort int) bool { func DeleteServiceListener(serviceName types.NamespacedName, listenPort int) bool {
return updateServiceListener(serviceName, listenPort, false) return updateServiceListener(serviceName, listenPort, false)
} }
......
...@@ -68,7 +68,7 @@ func (h *proxyHC) handleHealthCheckRequest(rw http.ResponseWriter, serviceName s ...@@ -68,7 +68,7 @@ func (h *proxyHC) handleHealthCheckRequest(rw http.ResponseWriter, serviceName s
s, ok := h.serviceEndpointsMap.Get(serviceName) s, ok := h.serviceEndpointsMap.Get(serviceName)
if !ok { if !ok {
glog.V(4).Infof("Service %s not found or has no local endpoints", serviceName) glog.V(4).Infof("Service %s not found or has no local endpoints", serviceName)
sendHealthCheckResponse(rw, http.StatusServiceUnavailable, "No Service Endpoints Not Found") sendHealthCheckResponse(rw, http.StatusServiceUnavailable, "No Service Endpoints Found")
return return
} }
numEndpoints := len(*s.(*serviceEndpointsList).endpoints) numEndpoints := len(*s.(*serviceEndpointsList).endpoints)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment