kubeconfig

package
v0.0.0-...-e83835c Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadKubeconfig

func ReadKubeconfig(cli client.Client) (
	string,
	[]RemoteAPIServer,
	[]TargetCluster,
	error,
)

Read the kubeconfig file registered for the Secret Resource and register the necessary information for apiServers and clusters, respectively. At this time, a slice element is created for each Kubernetes cluster. kubeconfig must be created in advance as a secret resource.

Types

type RemoteAPIServer

type RemoteAPIServer struct {
	Name     string
	Endpoint string
}

Used to ping a remote Kubernetes cluster to verify that the remote Kubernetes cluster is operating properly by sending a request to the endpoint.

type TargetCluster

type TargetCluster struct {
	ContextName string
	ClusterName string
	UserName    string
}

It is used for the following purposes

  • Generate a client set using ContextName
  • Set fields in Custom Resource ClusterDetector and register information for all remote Kubernetes clusters in the ClusterDetector.

Jump to

Keyboard shortcuts

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