Documentation ¶
Index ¶
- Constants
- func FilterEndpoints(_ context.Context, writeNamespace string, kubeEndpoints []*corev1.Endpoints, ...) (v1.EndpointList, []string, []string)
- func NewPlugin(kube kubernetes.Interface, kubeCoreCache corecache.KubeCoreCache, ...) plugins.Plugin
- func UpdateUpstream(original, desired *v1.Upstream) (didChange bool, err error)
- func UpstreamName(serviceNamespace, serviceName string, servicePort int32) string
- type Epkey
- type KubePluginListers
- type KubePluginSharedFactory
- type KubeUpstreamConverter
- type PodLabelSource
- type UpstreamConverter
Constants ¶
const (
ExtensionName = "kubernetes"
)
Variables ¶
This section is empty.
Functions ¶
func FilterEndpoints ¶ added in v1.17.0
func FilterEndpoints( _ context.Context, writeNamespace string, kubeEndpoints []*corev1.Endpoints, services []*corev1.Service, pods []*corev1.Pod, upstreams map[*core.ResourceRef]*kubeplugin.UpstreamSpec, ) (v1.EndpointList, []string, []string)
FilterEndpoints computes the endpoints for Gloo from the given Kubernetes endpoints, services, and Gloo upstreams. It is exported to provide an injection point into our existing EDS solution for the Gloo K8s Gateway integration. It returns the endpoints, warnings, and errors.
func NewPlugin ¶
func NewPlugin(kube kubernetes.Interface, kubeCoreCache corecache.KubeCoreCache, svcCollection krt.Collection[*corev1.Service]) plugins.Plugin
func UpdateUpstream ¶
func UpstreamName ¶
UpstreamName creates an upstream name from a k8s Service name/namespace/port.
This function is used in the context of both "real" upstreams written to etcd (e.g. upstreams created by UDS) as well as "fake" upstreams (i.e. those upstreams we only create in the in-memory input snapshot).
Types ¶
type KubePluginListers ¶
type KubePluginListers struct {
// contains filtered or unexported fields
}
func (*KubePluginListers) EndpointsLister ¶
func (k *KubePluginListers) EndpointsLister(ns string) kubelisters.EndpointsLister
func (*KubePluginListers) Subscribe ¶
func (k *KubePluginListers) Subscribe() <-chan struct{}
func (*KubePluginListers) Unsubscribe ¶
func (k *KubePluginListers) Unsubscribe(c <-chan struct{})
type KubePluginSharedFactory ¶
type KubePluginSharedFactory interface {}
type KubeUpstreamConverter ¶
type KubeUpstreamConverter struct {
// contains filtered or unexported fields
}
func DefaultUpstreamConverter ¶
func DefaultUpstreamConverter() *KubeUpstreamConverter
func (*KubeUpstreamConverter) CreateUpstream ¶ added in v1.0.0
func (uc *KubeUpstreamConverter) CreateUpstream(ctx context.Context, svc *corev1.Service, port corev1.ServicePort) *v1.Upstream
CreateUpstream is called by both: - discovery (when creating an upstream from a k8s service) - controller code that converts services to in-memory upstreams
func (*KubeUpstreamConverter) UpstreamsForService ¶
func (uc *KubeUpstreamConverter) UpstreamsForService(ctx context.Context, svc *corev1.Service) v1.UpstreamList
UpstreamsForService is called by the k8s uds plugin to convert a service to list of upstreams
type PodLabelSource ¶ added in v1.17.0
type UpstreamConverter ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_kubernetes is a generated GoMock package.
|
Package mock_kubernetes is a generated GoMock package. |