Documentation ¶
Index ¶
- func ConstructClusterResourceTree(defaultClient client.Client, dcOptions client.DescribeClusterOptions) (*ClusterResourceNode, *HTTPError)
- func ConstructInClusterKubeconfig(restConfig *rest.Config, namespace string) (*clientcmdapi.Config, error)
- func ConstructMultiClusterTree(ctrlClient ctrlclient.Client, k8sConfigClient *api.Config) (*MultiClusterTreeNode, *HTTPError)
- func GetKubeadmClusterName(restConfig *rest.Config, namespace string, name string) (string, error)
- func WriteKubeconfigToFile(filePath string, clientConfig clientcmdapi.Config) error
- type ClusterResourceNode
- type ClusterResourceTreeOptions
- type HTTPError
- type MultiClusterTreeNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructClusterResourceTree ¶
func ConstructClusterResourceTree(defaultClient client.Client, dcOptions client.DescribeClusterOptions) (*ClusterResourceNode, *HTTPError)
Note: ObjectReferenceObjects do not have the virtual annotation so we can assume that all virtual objects are collapsible
func ConstructMultiClusterTree ¶
func ConstructMultiClusterTree(ctrlClient ctrlclient.Client, k8sConfigClient *api.Config) (*MultiClusterTreeNode, *HTTPError)
ConstructMultiClusterTree returns a tree representing the workload cluster discovered in the management cluster.
func GetKubeadmClusterName ¶
func WriteKubeconfigToFile ¶
func WriteKubeconfigToFile(filePath string, clientConfig clientcmdapi.Config) error
Types ¶
type ClusterResourceNode ¶
type ClusterResourceNode struct { Name string `json:"name"` Namespace string `json:"namespace"` DisplayName string `json:"displayName"` Kind string `json:"kind"` Group string `json:"group"` Version string `json:"version"` Provider string `json:"provider"` UID string `json:"uid"` Collapsible bool `json:"collapsible"` Collapsed bool `json:"collapsed"` Ready bool `json:"ready"` Severity string `json:"severity"` HasReady bool `json:"hasReady"` Children []*ClusterResourceNode `json:"children"` }
type HTTPError ¶
func GetCustomResource ¶
func GetCustomResource(runtimeClient ctrlclient.Client, kind string, apiVersion string, namespace string, name string) (*unstructured.Unstructured, *HTTPError)
func NewInternalError ¶
type MultiClusterTreeNode ¶
type MultiClusterTreeNode struct { Name string `json:"name"` Namespace string `json:"namespace"` InfrastructureProvider string `json:"infrastructureProvider"` IsManagement bool `json:"isManagement"` Phase string `json:"phase"` Ready bool `json:"ready"` Children []*MultiClusterTreeNode `json:"children"` }
Click to show internal directories.
Click to hide internal directories.