k8s

package
v0.0.0-...-d4d4b81 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetK8sClients

GetK8sClients returns the k8s clients

func GetKubeConfig

func GetKubeConfig() (*rest.Config, error)

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

Jump to

Keyboard shortcuts

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