k8sapi

package
v1.43.0-0.dev Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceEndpoint

type ServiceEndpoint struct {
	Host string
	Port string
}

ServiceEndpoint is the Host/Port of the K8s endpoint.

var Endpoint ServiceEndpoint

Endpoint is the default ServiceEndpoint for host-networked pods, learned from environment variables.

var PodNetworkEndpoint ServiceEndpoint

PodNetworkEndpoint is the ServiceEndpoint for pod-networked pods, populated from the kubernetes-service-endpoint configmap.

func (ServiceEndpoint) CNIAPIRoot

func (k8s ServiceEndpoint) CNIAPIRoot() string

func (ServiceEndpoint) DestinationEntityRule added in v1.37.0

func (k8s ServiceEndpoint) DestinationEntityRule() (*calicov3.EntityRule, error)

DestinationEntityRule returns an EntityRule to match the Host and Port if the ServiceEndpoint was set. It returns nil if either was empty.

func (ServiceEndpoint) EnvVars

func (k8s ServiceEndpoint) EnvVars() []v1.EnvVar

EnvVars returns a slice of v1.EnvVars KUBERNETES_SERVICE_HOST/PORT if the Host and Port of the ServiceEndpoint were set. It returns a nil slice if either was empty as both need to be set.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL