kubernetes

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: AGPL-3.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	UnitedDeploymentAPIVersion = "apps.openyurt.io/v1alpha1"
	UnitedDeploymentKind       = "UnitedDeployment"
	StatefulSetType            = "StatefulSet"
	DeploymentType             = "Deployment"
	ServiceAPIVersion          = "v1"
	ServiceKind                = "Service"
	ServiceTopologyKeys        = "topology.kubernetes.io/zone"
	HealthCheckCommandType     = "COMMAND"
	HealthCheckHttpType        = "HTTP"
)

Variables

This section is empty.

Functions

func NewCheckProbe

func NewCheckProbe() *v1.Probe

Types

type Kubernetes

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

func New

func New(options ...Option) *Kubernetes

func (*Kubernetes) CreateConfigMap

func (k *Kubernetes) CreateConfigMap(clusterName, namespace string, cm *corev1.ConfigMap) error

CreateConfigMap Crate configMap on specified cluster and namespace.

func (*Kubernetes) CreateDeployment

func (k *Kubernetes) CreateDeployment(clusterName, namespace string, cm *appsv1.Deployment) error

CreateDeployment Crate deployment on specified cluster and namespace.

func (*Kubernetes) CreateNamespace

func (k *Kubernetes) CreateNamespace(clusterName string, namespace *corev1.Namespace) error

CreateNamespace Crate namespace on specified cluster.

func (*Kubernetes) CreateNode

func (k *Kubernetes) CreateNode(clusterName string, node *corev1.Node) (*corev1.Node, error)

CreateNode Create node on specified cluster.

func (*Kubernetes) CreateNodePool

func (k *Kubernetes) CreateNodePool(clusterName string, nodePool *v1alpha1.NodePool) (*v1alpha1.NodePool, error)

CreateNodePool Crate nodePool on specified cluster.

func (*Kubernetes) CreatePod

func (k *Kubernetes) CreatePod(clusterName, namespace string, pod *corev1.Pod) error

CreatePod Crate pod on specified cluster and namespace.

func (*Kubernetes) CreateSecret

func (k *Kubernetes) CreateSecret(clusterName, namespace string, cm *corev1.Secret) error

CreateSecret Crate secret on specified cluster and namespace.

func (*Kubernetes) CreateService

func (k *Kubernetes) CreateService(clusterName, namespace string, svc *corev1.Service) error

CreateService Crate service on specified cluster and namespace.

func (*Kubernetes) CreateStatefulSet

func (k *Kubernetes) CreateStatefulSet(clusterName, namespace string, cm *appsv1.StatefulSet) error

CreateStatefulSet Crate statefulSet on specified cluster and namespace.

func (*Kubernetes) CreateUnitedDeployment

func (k *Kubernetes) CreateUnitedDeployment(clusterName, namespace string, unitedDeployment *v1alpha1.UnitedDeployment) (*v1alpha1.UnitedDeployment, error)

CreateUnitedDeployment Crate unitedDeployment on specified cluster and namespace.

func (*Kubernetes) DeleteConfigMap

func (k *Kubernetes) DeleteConfigMap(clusterName, namespace, cmName string) error

DeleteConfigMap Delete configMap on specified cluster and namespace.

func (*Kubernetes) DeleteDeployment

func (k *Kubernetes) DeleteDeployment(clusterName, namespace, deploymentName string) error

DeleteDeployment Delete deployment on specified cluster and namespace.

func (*Kubernetes) DeleteNamespace

func (k *Kubernetes) DeleteNamespace(clusterName string, namespace string) error

DeleteNamespace Delete namespace on specified cluster.

func (*Kubernetes) DeleteNode

func (k *Kubernetes) DeleteNode(clusterName string, nodeName string) error

DeleteNode Delete node on specified cluster.

func (*Kubernetes) DeleteNodePool

func (k *Kubernetes) DeleteNodePool(clusterName string, nodePoolName string) error

DeleteNodePool Delete node on specified cluster.

func (*Kubernetes) DeletePod

func (k *Kubernetes) DeletePod(clusterName, namespace, podName string) error

DeletePod Delete pod on specified cluster and namespace.

func (*Kubernetes) DeleteSecret

func (k *Kubernetes) DeleteSecret(clusterName, namespace, secName string) error

DeleteSecret Delete secret on specified cluster and namespace.

func (*Kubernetes) DeleteService

func (k *Kubernetes) DeleteService(clusterName, namespace, svcName string) error

DeleteService Delete service on specified cluster and namespace.

func (*Kubernetes) DeleteStatefulSet

func (k *Kubernetes) DeleteStatefulSet(clusterName, namespace, statefulSetName string) error

DeleteStatefulSet Delete statefulSet on specified cluster and namespace.

func (*Kubernetes) DeleteUnitedDeployment

func (k *Kubernetes) DeleteUnitedDeployment(clusterName, namespace string, unitedDeploymentName string) error

DeleteUnitedDeployment Delete unitedDeployment on specified cluster and namespace.

func (*Kubernetes) GenerateEdgeServiceSpec

func (k *Kubernetes) GenerateEdgeServiceSpec(req *apistructs.GenerateEdgeServiceRequest) (*v1.Service, error)

GenerateEdgeServiceSpec Generate edge service spec

func (*Kubernetes) GenerateHealthCheckSpec

func (k *Kubernetes) GenerateHealthCheckSpec(req *apistructs.GenerateHeathCheckRequest) *v1.Probe

GenerateHealthCheckSpec Generate Heathcheck spec

func (*Kubernetes) GenerateUnitedDeploymentSpec

func (k *Kubernetes) GenerateUnitedDeploymentSpec(req *apistructs.GenerateUnitedDeploymentRequest, env []v1.EnvVar, volumeMount []v1.VolumeMount, affinity *v1.Affinity, probe *v1.Probe) (*v1alpha1.UnitedDeployment, error)

GenerateUnitedDeploymentSepc Generate Uniteddeployment spec

func (*Kubernetes) GetConfigMap

func (k *Kubernetes) GetConfigMap(clusterName, namespace, cmName string) (*corev1.ConfigMap, error)

GetConfigMap Get configMap under the specified cluster and namespace.

func (*Kubernetes) GetDeployment

func (k *Kubernetes) GetDeployment(clusterName, namespace, deploymentName string) (*appsv1.Deployment, error)

GetDeployment Get deployment under the specified cluster and namespace.

func (*Kubernetes) GetNode

func (k *Kubernetes) GetNode(clusterName, nodeName string) (*corev1.Node, error)

GetNode Get node under the specified cluster.

func (*Kubernetes) GetNodePool

func (k *Kubernetes) GetNodePool(clusterName, npName string) (*v1alpha1.NodePool, error)

GetNodePool Get nodePool under the specified cluster.

func (*Kubernetes) GetPod

func (k *Kubernetes) GetPod(clusterName, namespace, podName string) (*corev1.Pod, error)

GetPod Get pod under the specified cluster and namespace.

func (*Kubernetes) GetSecret

func (k *Kubernetes) GetSecret(clusterName, namespace, secName string) (*corev1.Secret, error)

GetSecret Get secret under the specified cluster and namespace.

func (*Kubernetes) GetService

func (k *Kubernetes) GetService(clusterName, namespace, svcName string) (*corev1.Service, error)

GetService List service resource under the specified cluster and namespace.

func (*Kubernetes) GetStatefulSet

func (k *Kubernetes) GetStatefulSet(clusterName, namespace, statefulSetName string) (*appsv1.StatefulSet, error)

GetStatefulSet Get statefulSet under the specified cluster and namespace.

func (*Kubernetes) GetUnitedDeployment

func (k *Kubernetes) GetUnitedDeployment(clusterName, namespace, unitedDeploymentName string) (*v1alpha1.UnitedDeployment, error)

GetUnitedDeployment Get unitedDeployment under the specified cluster and namespace.

func (*Kubernetes) ListConfigMap

func (k *Kubernetes) ListConfigMap(clusterName, namespace string) (*corev1.ConfigMapList, error)

ListConfigMap List configMap under the specified cluster and namespace.

func (*Kubernetes) ListDeployment

func (k *Kubernetes) ListDeployment(clusterName, namespace string) (*appsv1.DeploymentList, error)

ListDeployment List deployment under the specified cluster and namespace.

func (*Kubernetes) ListNode

func (k *Kubernetes) ListNode(clusterName string) (*corev1.NodeList, error)

ListNode List node under the specified cluster.

func (*Kubernetes) ListNodePool

func (k *Kubernetes) ListNodePool(clusterName string) (*v1alpha1.NodePoolList, error)

ListNodePool List nodePool under the specified cluster.

func (*Kubernetes) ListPod

func (k *Kubernetes) ListPod(clusterName, namespace string) (*corev1.PodList, error)

GetPod List pod under the specified cluster and namespace.

func (*Kubernetes) ListSecret

func (k *Kubernetes) ListSecret(clusterName, namespace string) (*corev1.SecretList, error)

ListSecret List secret under the specified cluster and namespace.

func (*Kubernetes) ListStatefulSet

func (k *Kubernetes) ListStatefulSet(clusterName, namespace string) (*appsv1.StatefulSetList, error)

ListStatefulSet List statefulSet under the specified cluster and namespace.

func (*Kubernetes) ListUnitedDeployment

func (k *Kubernetes) ListUnitedDeployment(clusterName, namespace string) (*v1alpha1.UnitedDeploymentList, error)

ListUnitedDeployment List unitedDeployment under the specified cluster and namespace.

func (*Kubernetes) UpdateConfigMap

func (k *Kubernetes) UpdateConfigMap(clusterName, namespace string, cm *corev1.ConfigMap) error

UpdateConfigMap Update configMap on specified cluster and namespace.

func (*Kubernetes) UpdateDeployment

func (k *Kubernetes) UpdateDeployment(clusterName, namespace string, cm *appsv1.Deployment) error

UpdateDeployment Update deployment on specified cluster and namespace.

func (*Kubernetes) UpdateNode

func (k *Kubernetes) UpdateNode(clusterName string, node *corev1.Node) error

UpdateNode Update node on specified cluster.

func (*Kubernetes) UpdateNodePool

func (k *Kubernetes) UpdateNodePool(clusterName string, nodePool *v1alpha1.NodePool) error

UpdateNodePool Update nodePool on specified cluster.

func (*Kubernetes) UpdatePod

func (k *Kubernetes) UpdatePod(clusterName, namespace string, pod *corev1.Pod) error

UpdatePod Update pod on specified cluster and namespace.

func (*Kubernetes) UpdateSecret

func (k *Kubernetes) UpdateSecret(clusterName, namespace string, cm *corev1.Secret) error

UpdateSecret Update secret on specified cluster and namespace.

func (*Kubernetes) UpdateService

func (k *Kubernetes) UpdateService(clusterName, namespace string, svc *corev1.Service) error

UpdateService Update service on specified cluster and namespace.

func (*Kubernetes) UpdateStatefulSet

func (k *Kubernetes) UpdateStatefulSet(clusterName, namespace string, cm *appsv1.StatefulSet) error

UpdateStatefulSet Update statefulSet on specified cluster and namespace.

func (*Kubernetes) UpdateUnitedDeployment

func (k *Kubernetes) UpdateUnitedDeployment(clusterName, namespace string, unitedDeployment *v1alpha1.UnitedDeployment) error

UpdateUnitedDeployment Update unitedDeployment on specified cluster and namespace.

type Option

type Option func(*Kubernetes)

func WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle With bundle.

Jump to

Keyboard shortcuts

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