k8sclient

package
v0.0.0-...-4152587 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubernetesClient

type KubernetesClient struct {
	Dynamic dynamic.Interface
	// contains filtered or unexported fields
}

func New

func New() (*KubernetesClient, error)

func (*KubernetesClient) CreateDynamic

func (k *KubernetesClient) CreateDynamic(obj *unstructured.Unstructured) error

func (*KubernetesClient) CreateModule

func (k *KubernetesClient) CreateModule(module cyclopsv1alpha1.Module) error

func (*KubernetesClient) CreateTemplateStore

func (k *KubernetesClient) CreateTemplateStore(ts *cyclopsv1alpha1.TemplateStore) error

func (*KubernetesClient) Delete

func (k *KubernetesClient) Delete(resource dto.Resource) error

func (*KubernetesClient) DeleteModule

func (k *KubernetesClient) DeleteModule(name string) error

func (*KubernetesClient) DeleteTemplateStore

func (k *KubernetesClient) DeleteTemplateStore(name string) error

func (*KubernetesClient) Deploy

func (k *KubernetesClient) Deploy(deploymentSpec *v12.Deployment) error

func (*KubernetesClient) DeployService

func (k *KubernetesClient) DeployService(service *apiv1.Service) error

func (*KubernetesClient) GetAllNamespacePods

func (k *KubernetesClient) GetAllNamespacePods() ([]apiv1.Pod, error)

func (*KubernetesClient) GetDeletedResources

func (k *KubernetesClient) GetDeletedResources(
	resources []dto.Resource,
	module cyclopsv1alpha1.Module,
	template *models.Template,
) ([]dto.Resource, error)

func (*KubernetesClient) GetDeployment

func (k *KubernetesClient) GetDeployment(namespace, name string) (*v12.Deployment, error)

func (*KubernetesClient) GetDeploymentLogs

func (k *KubernetesClient) GetDeploymentLogs(namespace, container, deployment string, numLogs *int64) ([]string, error)

func (*KubernetesClient) GetDeployments

func (k *KubernetesClient) GetDeployments(namespace string) ([]v12.Deployment, error)

func (*KubernetesClient) GetDeploymentsYaml

func (k *KubernetesClient) GetDeploymentsYaml(name string, namespace string) (*bytes.Buffer, error)

func (*KubernetesClient) GetManifest

func (k *KubernetesClient) GetManifest(group, version, kind, name, namespace string) (string, error)

func (*KubernetesClient) GetModule

func (k *KubernetesClient) GetModule(name string) (*cyclopsv1alpha1.Module, error)

func (*KubernetesClient) GetModuleResourcesHealth

func (k *KubernetesClient) GetModuleResourcesHealth(name string) (string, error)

func (*KubernetesClient) GetNamespaces

func (k *KubernetesClient) GetNamespaces() ([]apiv1.Namespace, error)

func (*KubernetesClient) GetNode

func (k *KubernetesClient) GetNode(name string) (*apiv1.Node, error)

func (*KubernetesClient) GetPodLogs

func (k *KubernetesClient) GetPodLogs(namespace, container, name string, numLogs *int64) ([]string, error)

func (*KubernetesClient) GetPods

func (k *KubernetesClient) GetPods(namespace, name string) ([]apiv1.Pod, error)

func (*KubernetesClient) GetPodsForNode

func (k *KubernetesClient) GetPodsForNode(nodeName string) ([]apiv1.Pod, error)

func (*KubernetesClient) GetResource

func (k *KubernetesClient) GetResource(group, version, kind, name, namespace string) (any, error)

func (*KubernetesClient) GetResourcesForModule

func (k *KubernetesClient) GetResourcesForModule(name string) ([]dto.Resource, error)

func (*KubernetesClient) GetScale

func (k *KubernetesClient) GetScale(namespace, name string) (*v1.Scale, error)

func (*KubernetesClient) GetStatefulSetsLogs

func (k *KubernetesClient) GetStatefulSetsLogs(namespace, container, name string, numLogs *int64) ([]string, error)

func (*KubernetesClient) GetTemplateAuthRuleSecret

func (k *KubernetesClient) GetTemplateAuthRuleSecret(name, key string) (string, error)

func (*KubernetesClient) ListModules

func (k *KubernetesClient) ListModules() ([]cyclopsv1alpha1.Module, error)

func (*KubernetesClient) ListNodes

func (k *KubernetesClient) ListNodes() ([]apiv1.Node, error)

func (*KubernetesClient) ListTemplateAuthRules

func (k *KubernetesClient) ListTemplateAuthRules() ([]cyclopsv1alpha1.TemplateAuthRule, error)

func (*KubernetesClient) ListTemplateStore

func (k *KubernetesClient) ListTemplateStore() ([]cyclopsv1alpha1.TemplateStore, error)

func (*KubernetesClient) UpdateModule

func (k *KubernetesClient) UpdateModule(module cyclopsv1alpha1.Module) error

func (*KubernetesClient) UpdateScale

func (k *KubernetesClient) UpdateScale(namespace, name string, sc v1.Scale) error

func (*KubernetesClient) UpdateTemplateStore

func (k *KubernetesClient) UpdateTemplateStore(ts *cyclopsv1alpha1.TemplateStore) error

Jump to

Keyboard shortcuts

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