kubernetes: k8s.io/kubernetes/pkg/proxy/healthcheck Index | Files

package healthcheck

import "k8s.io/kubernetes/pkg/proxy/healthcheck"

Package healthcheck provides tools for serving kube-proxy healthchecks.


Package Files

common.go doc.go proxier_health.go service_health.go

type FakeServiceHealthServer Uses

type FakeServiceHealthServer struct{}

FakeServiceHealthServer is a fake ServiceHealthServer for test programs

func (FakeServiceHealthServer) SyncEndpoints Uses

func (fake FakeServiceHealthServer) SyncEndpoints(_ map[types.NamespacedName]int) error

SyncEndpoints is part of ServiceHealthServer

func (FakeServiceHealthServer) SyncServices Uses

func (fake FakeServiceHealthServer) SyncServices(_ map[types.NamespacedName]uint16) error

SyncServices is part of ServiceHealthServer

type ProxierHealthServer Uses

type ProxierHealthServer struct {
    // contains filtered or unexported fields

ProxierHealthServer returns 200 "OK" by default. It verifies that the delay between QueuedUpdate() calls and Updated() calls never exceeds healthTimeout.

func NewProxierHealthServer Uses

func NewProxierHealthServer(addr string, healthTimeout time.Duration, recorder record.EventRecorder, nodeRef *v1.ObjectReference) *ProxierHealthServer

NewProxierHealthServer returns a proxier health http server.

func (*ProxierHealthServer) QueuedUpdate Uses

func (hs *ProxierHealthServer) QueuedUpdate()

QueuedUpdate updates the lastQueued timestamp.

func (*ProxierHealthServer) Run Uses

func (hs *ProxierHealthServer) Run()

Run starts the healthz http server and returns.

func (*ProxierHealthServer) Updated Uses

func (hs *ProxierHealthServer) Updated()

Updated updates the lastUpdated timestamp.

type ProxierHealthUpdater Uses

type ProxierHealthUpdater interface {
    // QueuedUpdate should be called when the proxier receives a Service or Endpoints
    // event containing information that requires updating service rules.

    // Updated should be called when the proxier has successfully updated the service
    // rules to reflect the current state.

ProxierHealthUpdater allows callers to update healthz timestamp only.

type ServiceHealthServer Uses

type ServiceHealthServer interface {
    // Make the new set of services be active.  Services that were open before
    // will be closed.  Services that are new will be opened.  Service that
    // existed and are in the new set will be left alone.  The value of the map
    // is the healthcheck-port to listen on.
    SyncServices(newServices map[types.NamespacedName]uint16) error
    // Make the new set of endpoints be active.  Endpoints for services that do
    // not exist will be dropped.  The value of the map is the number of
    // endpoints the service has on this node.
    SyncEndpoints(newEndpoints map[types.NamespacedName]int) error

ServiceHealthServer serves HTTP endpoints for each service name, with results based on the endpoints. If there are 0 endpoints for a service, it returns a 503 "Service Unavailable" error (telling LBs not to use this node). If there are 1 or more endpoints, it returns a 200 "OK".

func NewFakeServiceHealthServer Uses

func NewFakeServiceHealthServer() ServiceHealthServer

NewFakeServiceHealthServer allocates a new fake service healthcheck server manager

func NewServiceHealthServer Uses

func NewServiceHealthServer(hostname string, recorder record.EventRecorder) ServiceHealthServer

NewServiceHealthServer allocates a new service healthcheck server manager

Package healthcheck imports 15 packages (graph) and is imported by 48 packages. Updated 2019-10-19. Refresh now. Tools for package owners.