Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetK8sClients ¶
func GetK8sClients(config *rest.Config) (*kubernetes.Clientset, dynamic.Interface, discovery.DiscoveryInterface, error)
GetK8sClients returns the k8s clients
func GetKubeConfig ¶
GetKubeConfig returns the *rest.Config
Types ¶
type KubeClients ¶
type KubeClients struct { GenericClient kubernetes.Interface DynamicClient dynamic.Interface RESTMapper meta.RESTMapper }
KubeClients is a struct for kubernetes cluster
func NewKubeCluster ¶
func NewKubeCluster() (*KubeClients, error)
NewKubeCluster returns a new KubeClients instance
func (*KubeClients) ClusterResource ¶
func (k *KubeClients) ClusterResource(manifest string, namespace string) (*unstructured.Unstructured, error)
ClusterResource handles cluster operations
func (*KubeClients) GetServerEndpoint ¶
func (k *KubeClients) GetServerEndpoint(portalScope utils.AgentScope, agentType utils.AgentType) (string, error)
GetServerEndpoint returns the endpoint of the server by which external agents can communicate. The order of generating the endpoint is based on different network type: - Ingress - LoadBalancer > NodePort > ClusterIP
func (*KubeClients) GetTLSCert ¶
func (k *KubeClients) GetTLSCert(secretName string) (string, error)
GetTLSCert returns the TLS certificate of the provided secret
Click to show internal directories.
Click to hide internal directories.