utils

package
v0.0.0-...-5c222d9 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func CreateK8sClient

func CreateK8sClient() *kubernetes.Clientset

func EncodeJSON

func EncodeJSON(data any) (string, error)

func GetNamespaces

func GetNamespaces(Client *clientset.Clientset) []string

func ListenServe

func ListenServe()

}

func NewConfig

func NewConfig(kubeconfig string) (*rest.Config, error)

Types

type K8sObj

type K8sObj struct {
	Deployments            []appsv1.Deployment        `json:"Deployments"`
	Secrets                []v1.Secret                `json:"Secrets"`
	Configmaps             []v1.ConfigMap             `json:"ConfigMaps"`
	Services               []v1.Service               `json:"Services"`
	Endpoints              []v1.Endpoints             `json:"Endpoints"`
	PersistentVolumeClaims []v1.PersistentVolumeClaim `json:"PVCs"`
	Pods                   []v1.Pod                   `json:"Pods"`
}

func (*K8sObj) GetConfigMaps

func (c *K8sObj) GetConfigMaps(Client *clientset.Clientset, ns string, st bool)

func (*K8sObj) GetDeployment

func (c *K8sObj) GetDeployment(Client *clientset.Clientset, ns string, st bool)

func (*K8sObj) GetPVC

func (c *K8sObj) GetPVC(Client *clientset.Clientset, ns string, st bool)

func (*K8sObj) GetPods

func (c *K8sObj) GetPods(Client *clientset.Clientset, ns string, podState string)

func (*K8sObj) GetSecrets

func (c *K8sObj) GetSecrets(Client *clientset.Clientset, ns string, st bool)

func (*K8sObj) GetServices

func (c *K8sObj) GetServices(Client *clientset.Clientset, ns string, st bool)

type K8sObjMeta

type K8sObjMeta struct {
	// contains filtered or unexported fields
}

Struct internally used for comparision

Jump to

Keyboard shortcuts

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