package
1.2.4
Repository: https://github.com/openservicemesh/osm.git
Documentation: pkg.go.dev

# Packages

Package events implements the eventing framework to receive and relay kubernetes events, and a framework to publish events to the Kubernetes API server.
No description provided by the author
No description provided by the author

# Functions

DialerToPod constructs a new httpstream.Dialer to connect to a pod for use with a PortForwarder.
GetEventHandlerFuncs returns the ResourceEventHandlerFuncs object used to receive events when a k8s object is added/updated/deleted.
GetHostnamesForService returns the hostnames over which the service is accessible.
GetKubernetesServerVersionNumber returns the Kubernetes server version number in chunks, ex.
GetOSMControllerPods returns a list of osm-controller pods in the namespace.
GetOSMInjectorPods returns a list of osm-injector pods in the namespace.
GetServiceFromHostname returns the service name from its hostname This assumes the default k8s trustDomain: cluster.local.
GetSubdomainFromHostname returns the service subdomain from its hostname This assumes the default k8s trustDomain: cluster.local.
GetTargetPortFromEndpoints returns the endpoint port corresponding to the given endpoint name and endpoints.
IsHeadlessService determines whether or not a corev1.Service is a headless service.
IsMetricsEnabled returns true if the pod in the mesh is correctly annotated for prometheus scrapping.
NamespacedNameFrom returns the namespaced name for the given name if possible, otherwise an error.
NewKubernetesController returns a new kubernetes.Controller which means to provide access to locally-cached k8s resources.
NewMockController creates a new mock instance.
NewPortForwarder creates a new port forwarder to a pod.
ServiceToMeshServices translates a k8s service with one or more ports to one or more MeshService objects per port.
WatchAndUpdateLogLevel watches for log level changes and updates the global log level.
WatchAndUpdateProxyBootstrapSecret watches for new pods being added to the mesh and updates their corresponding proxy bootstrap config Secret's OwnerReferences to point to the associated pod.

# Constants

AddEvent is a type of a Kubernetes API event.
DefaultKubeEventResyncInterval is the default resync interval for k8s events This is set to 0 because we do not need resyncs from k8s client, and have our own Ticker to turn on periodic resyncs.
DeleteEvent is a type of a Kubernetes API event.
Endpoints lookup identifier.
Namespaces lookup identifier.
Pods lookup identifier.
ServiceAccounts lookup identifier.
Services lookup identifier.
UpdateEvent is a type of a Kubernetes API event.

# Structs

EventTypes is a struct helping pass the correct types to GetEventHandlerFuncs().
MockController is a mock of Controller interface.
MockControllerMockRecorder is the mock recorder for MockController.
PortForwarder is a type that implements port forwarding to a pod.

# Interfaces

Controller is the controller interface for K8s services.

# Type aliases

EventType is the type of event we have received from Kubernetes.
InformerKey stores the different Informers we keep for K8s resources.