config

package
v0.0.0-...-3cf0e9c Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppName

func AppName() (string, error)

AppName returns the value of the `app.kubernetes.io/name` label on this pod. This function reads the value from a file in a volume that was mounted using the downward API.

func AuthorityName

func AuthorityName(logger logr.Logger) (string, error)

AuthorityName returns the expected authority name of this control plane management server. The authority name is used in xDS federation, where xDS clients can specify the authority of an xDS resource.

The authority name format assumed in this control plane implementation is of the format `[app-name].[namespace].svc.[k8s-dns-cluster-domain]`, e.g., `control-plane.xds.svc.cluster.local`. xDS clients must use this format in the `authorities` section of their gRPC xDS bootstrap configuration.

See [xRFC TP1](https://github.com/cncf/xds/blob/70da609f752ed4544772f144411161d41798f07e/proposals/TP1-xds-transport-next.md#federation) and [gRFC A47](https://github.com/grpc/proposal/blob/e85c66e48348867937688d89117bad3dcaa6f4f5/A47-xds-federation.md).

func ClusterDNSDomain

func ClusterDNSDomain() (string, error)

ClusterDNSDomain returns the Kubernetes cluster's DNS domain, e.g., `cluster.local`.

func HealthPort

func HealthPort() (int, error)

func Kubecontexts

func Kubecontexts(logger logr.Logger) ([]informers.Kubecontext, error)

func Namespace

func Namespace(logger logr.Logger) (string, error)

Namespace returns the Kubernetes namespace of this pod. This function first looks for a file in a volume that was mounted using the downward API. If that doesn't exist, it looks for the `namespace` file in the `serviceaccount` directory. If neither of those files exist, this function returns an error.

func ServingPort

func ServingPort() (int, error)

func XDSFeatures

func XDSFeatures(logger logr.Logger) (*xds.Features, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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