Documentation ¶
Overview ¶
Package k8s contains utilities for Antrea interactions with Kubernetes.
Index ¶
- func CreateClients(config componentbaseconfig.ClientConnectionConfiguration, ...) (clientset.Interface, aggregatorclientset.Interface, crdclientset.Interface, ...)
- func CreateLegacyCRDClient(config componentbaseconfig.ClientConnectionConfiguration, ...) (legacycrdclientset.Interface, error)
- func GetNodeAddr(node *v1.Node) (net.IP, error)
- func NamespacedName(namespace, name string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateClients ¶
func CreateClients(config componentbaseconfig.ClientConnectionConfiguration, kubeAPIServerOverride string) ( clientset.Interface, aggregatorclientset.Interface, crdclientset.Interface, apiextensionclientset.Interface, error)
CreateClients creates kube clients from the given config.
func CreateLegacyCRDClient ¶
func CreateLegacyCRDClient(config componentbaseconfig.ClientConnectionConfiguration, kubeAPIServerOverride string) (legacycrdclientset.Interface, error)
CreateLegacyCRDClient creates legacyCRD client from the given config.
func GetNodeAddr ¶
GetNodeAddr gets the available IP address of a Node. GetNodeAddr will first try to get the NodeInternalIP, then try to get the NodeExternalIP. Note: Although K8s supports dual-stack, there is only a single Internal address per Node because of issue ( kubernetes/kubernetes#91940 ). The Node might have multiple addresses after the issue is fixed, and one per address family. And we should change the return type at that time.
func NamespacedName ¶
NamespacedName generates the conventional K8s resource name, which connects namespace and name with "/".
Types ¶
This section is empty.