Documentation ¶
Overview ¶
Package apiserver contains utility functions to configure the connection parameters to the Kubernetes API server to advertise to peering clusters.
Index ¶
- func GetAddressFromMasterNode(ctx context.Context, cl client.Client) (address string, err error)
- func GetURL(ctx context.Context, cl client.Client, addressOverride string) (string, error)
- func InitFlags(flagset *flag.FlagSet)
- func RetrieveAPIServerCA(restcfg *rest.Config, caOverride []byte, trustedCA bool) ([]byte, error)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAddressFromMasterNode ¶
GetAddressFromMasterNode returns the API Server address using the IP of the master node of this cluster. The port is always defaulted to 6443.
func GetURL ¶
GetURL retrieves the API server URL either from the configuration or selecting the IP address of a master node (with port 6443).
Types ¶
type Config ¶
type Config struct { // The address of the Kubernetes API Server, advertised to the peering clusters. Address string // Whether the Kubernetes API Server is exposed through a trusted certification authority, // which does not need to be explicitly advertised. TrustedCA bool // The certification authority trusted by the API server. CA string }
Config defines the configuration parameters to contact the Kubernetes API server.
Click to show internal directories.
Click to hide internal directories.