Documentation ¶
Index ¶
- func DeleteHealthCheck(cloud *gce.Cloud, name string, scope meta.KeyType) error
- func EnsureL4HealthCheck(cloud *gce.Cloud, svc *corev1.Service, namer namer.L4ResourcesNamer, ...) (string, string, int32, string, error)
- func NewL4HealthCheck(name string, svcName types.NamespacedName, shared bool, path string, ...) *composite.HealthCheck
- type HealthCheckProvider
- type HealthChecker
- type HealthChecks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteHealthCheck ¶ added in v1.9.0
func EnsureL4HealthCheck ¶ added in v1.9.0
func EnsureL4HealthCheck(cloud *gce.Cloud, svc *corev1.Service, namer namer.L4ResourcesNamer, sharedHC bool, scope meta.KeyType, l4Type utils.L4LBType) (string, string, int32, string, error)
EnsureL4HealthCheck creates a new HTTP health check for an L4 LoadBalancer service, based on the parameters provided. If the healthcheck already exists, it is updated as needed.
func NewL4HealthCheck ¶ added in v1.9.0
Types ¶
type HealthCheckProvider ¶
type HealthCheckProvider interface { CreateHTTPHealthCheck(hc *compute.HttpHealthCheck) error UpdateHTTPHealthCheck(hc *compute.HttpHealthCheck) error DeleteHTTPHealthCheck(name string) error GetHTTPHealthCheck(name string) (*compute.HttpHealthCheck, error) CreateAlphaHealthCheck(hc *computealpha.HealthCheck) error CreateBetaHealthCheck(hc *computebeta.HealthCheck) error CreateHealthCheck(hc *compute.HealthCheck) error UpdateAlphaHealthCheck(hc *computealpha.HealthCheck) error UpdateBetaHealthCheck(hc *computebeta.HealthCheck) error UpdateHealthCheck(hc *compute.HealthCheck) error DeleteHealthCheck(name string) error GetAlphaHealthCheck(name string) (*computealpha.HealthCheck, error) GetBetaHealthCheck(name string) (*computebeta.HealthCheck, error) GetHealthCheck(name string) (*compute.HealthCheck, error) }
HealthCheckProvider is an interface to manage a single GCE health check. TODO: (shance) convert this to use composite types
type HealthChecker ¶
type HealthChecker interface { // SyncServicePort syncs the healthcheck associated with the given // ServicePort and Pod Probe definition. // // `probe` can be nil if no probe exists. SyncServicePort(sp *utils.ServicePort, probe *v1.Probe) (string, error) Delete(name string, scope meta.KeyType) error Get(name string, version meta.Version, scope meta.KeyType) (*translator.HealthCheck, error) }
HealthChecker is an interface to manage cloud HTTPHealthChecks.
type HealthChecks ¶
type HealthChecks struct {
// contains filtered or unexported fields
}
HealthChecks manages health checks.
func NewHealthChecker ¶
func NewHealthChecker(cloud HealthCheckProvider, healthCheckPath string, defaultBackendSvc types.NamespacedName) *HealthChecks
NewHealthChecker creates a new health checker. cloud: the cloud object implementing SingleHealthCheck. defaultHealthCheckPath: is the HTTP path to use for health checks.
func (*HealthChecks) Delete ¶
func (h *HealthChecks) Delete(name string, scope meta.KeyType) error
Delete deletes the health check by port.
func (*HealthChecks) Get ¶
func (h *HealthChecks) Get(name string, version meta.Version, scope meta.KeyType) (*translator.HealthCheck, error)
Get returns the health check by port
func (*HealthChecks) SyncServicePort ¶ added in v1.9.0
func (h *HealthChecks) SyncServicePort(sp *utils.ServicePort, probe *v1.Probe) (string, error)
SyncServicePort implements HealthChecker.