Documentation
¶
Index ¶
Constants ¶
View Source
const (
//DefaultClusterName is the cluster for the unspecified cluster
DefaultClusterName = "_default"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
// Name is the cluster name, usually the Cluster resource's name
Name string
// Endpoint the apiserver's endpoint of the cluster
Endpoint string
// Token is a admin token , it should have all the access to the cluster
Token string
// Namespace the namespace which the chart will be installed to
Namespace string
}
Info represents a Cluster,
func RestConfigToCluster ¶
RestConfigToCluster generate a cluster Info from a rest config This method and the Info.ToRestConfig both only support bearer token for now luckily, the in-cluster rest config also use bearer token
func (*Info) GetContext ¶
GetContext is the context name for this cluster, this name format is generated from k8s code
func (*Info) ToRestConfig ¶
ToRestConfig generate rest.Config from cluster info.
Click to show internal directories.
Click to hide internal directories.