Documentation ¶
Index ¶
- Constants
- func DestinationToUpstreamRef(svcDest *gloov1.KubernetesServiceDestination) *core.ResourceRef
- func IsFakeKubeUpstream(upstreamName string) bool
- func KubeServicesToUpstreams(ctx context.Context, services skkube.ServiceList) gloov1.UpstreamList
- func NewKubernetesUpstreamClient(serviceClient skkube.ServiceClient) v1.UpstreamClient
- func ServiceToUpstream(ctx context.Context, svc *corev1.Service, port corev1.ServicePort) *gloov1.Upstream
Constants ¶
const FakeUpstreamNamePrefix = "kube-svc:"
FakeUpstreamNamePrefix is a prefix used to create/identify in-memory Upstreams for Kubernetes Services. It contains an invalid character so any accidental attempt to write to storage fails. Clusters created from these in-memory upstreams, as well as the cluster stats, will also contain this prefix. Note that `:` will be replaced by `_` in stats names.
const KubeUpstreamStatsPrefix = "kube-upstream_"
KubeUpstreamStatsPrefix is a prefix added to stats to identify clusters created from "real" Upstreams of `kube` type. This prefix only appears in stats, and not in the cluster or Upstream names.
Variables ¶
This section is empty.
Functions ¶
func DestinationToUpstreamRef ¶
func DestinationToUpstreamRef(svcDest *gloov1.KubernetesServiceDestination) *core.ResourceRef
DestinationToUpstreamRef converts a k8s service Destination to an in-memory upstream ref. This is called by the generic upstream DestinationToUpstreamRef.
func IsFakeKubeUpstream ¶ added in v1.18.0
IsFakeKubeUpstream returns true if the given upstream is a "fake"/in-memory upstream representing a kubernetes service. An in-memory upstream is used when a routing destination is a Kubernetes Service (as opposed to an Upstream).
func KubeServicesToUpstreams ¶
func KubeServicesToUpstreams(ctx context.Context, services skkube.ServiceList) gloov1.UpstreamList
KubeServicesToUpstreams converts a list of k8s Services to a list of in-memory Upstreams. Public because it's needed in the translator test Also used by k8s upstream client (List/Watch)
func NewKubernetesUpstreamClient ¶
func NewKubernetesUpstreamClient(serviceClient skkube.ServiceClient) v1.UpstreamClient
func ServiceToUpstream ¶ added in v1.18.0
func ServiceToUpstream(ctx context.Context, svc *corev1.Service, port corev1.ServicePort) *gloov1.Upstream
ServiceToUpstream converts a k8s Service to an in-memory Upstream (with the kube-svc prefix). Called by KubeServicesToUpstreams (above) and kube gateway proxy syncer when initializing in-memory upstreams from k8s services.
Types ¶
This section is empty.