Documentation ¶
Index ¶
- func AppName() (string, error)
- func AuthorityName(logger logr.Logger) (string, error)
- func ClusterDNSDomain() (string, error)
- func HealthPort() (int, error)
- func Kubecontexts(logger logr.Logger) ([]informers.Kubecontext, error)
- func Namespace(logger logr.Logger) (string, error)
- func ServingPort() (int, error)
- func XDSFeatures(logger logr.Logger) (*xds.Features, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppName ¶
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 ¶
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 ¶
ClusterDNSDomain returns the Kubernetes cluster's DNS domain, e.g., `cluster.local`.
func HealthPort ¶
func Kubecontexts ¶
func Kubecontexts(logger logr.Logger) ([]informers.Kubecontext, error)
func Namespace ¶
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 ¶
Types ¶
This section is empty.