Documentation ¶
Index ¶
- Constants
- func NewCheckProbe() *v1.Probe
- type Kubernetes
- func (k *Kubernetes) CreateConfigMap(clusterName, namespace string, cm *corev1.ConfigMap) error
- func (k *Kubernetes) CreateDeployment(clusterName, namespace string, cm *appsv1.Deployment) error
- func (k *Kubernetes) CreateNamespace(clusterName string, namespace *corev1.Namespace) error
- func (k *Kubernetes) CreateNode(clusterName string, node *corev1.Node) (*corev1.Node, error)
- func (k *Kubernetes) CreateNodePool(clusterName string, nodePool *v1alpha1.NodePool) error
- func (k *Kubernetes) CreatePod(clusterName, namespace string, pod *corev1.Pod) error
- func (k *Kubernetes) CreateSecret(clusterName, namespace string, cm *corev1.Secret) error
- func (k *Kubernetes) CreateService(clusterName, namespace string, svc *corev1.Service) error
- func (k *Kubernetes) CreateStatefulSet(clusterName, namespace string, cm *appsv1.StatefulSet) error
- func (k *Kubernetes) CreateUnitedDeployment(clusterName string, unitedDeployment *v1alpha1.UnitedDeployment) error
- func (k *Kubernetes) DeleteConfigMap(clusterName, namespace, cmName string) error
- func (k *Kubernetes) DeleteDeployment(clusterName, namespace, deploymentName string) error
- func (k *Kubernetes) DeleteNamespace(clusterName string, namespace string) error
- func (k *Kubernetes) DeleteNode(clusterName string, nodeName string) error
- func (k *Kubernetes) DeleteNodePool(clusterName string, nodePoolName string) error
- func (k *Kubernetes) DeletePod(clusterName, namespace, podName string) error
- func (k *Kubernetes) DeleteSecret(clusterName, namespace, secName string) error
- func (k *Kubernetes) DeleteService(clusterName, namespace, svcName string) error
- func (k *Kubernetes) DeleteStatefulSet(clusterName, namespace, statefulSetName string) error
- func (k *Kubernetes) DeleteUnitedDeployment(clusterName, namespace string, unitedDeploymentName string) error
- func (k *Kubernetes) GenerateEdgeServiceSpec(req *apistructs.GenerateEdgeServiceRequest) (*v1.Service, error)
- func (k *Kubernetes) GenerateHealthCheckSpec(req *apistructs.GenerateHeathCheckRequest) *v1.Probe
- func (k *Kubernetes) GenerateUnitedDeploymentSpec(req *apistructs.GenerateUnitedDeploymentRequest, env []v1.EnvVar, ...) (*v1alpha1.UnitedDeployment, error)
- func (k *Kubernetes) GetConfigMap(clusterName, namespace, cmName string) (*corev1.ConfigMap, error)
- func (k *Kubernetes) GetDeployment(clusterName, namespace, deploymentName string) (*appsv1.Deployment, error)
- func (k *Kubernetes) GetNode(clusterName, nodeName string) (*corev1.Node, error)
- func (k *Kubernetes) GetNodePool(clusterName, npName string) (*v1alpha1.NodePool, error)
- func (k *Kubernetes) GetPod(clusterName, namespace, podName string) (*corev1.Pod, error)
- func (k *Kubernetes) GetSecret(clusterName, namespace, secName string) (*corev1.Secret, error)
- func (k *Kubernetes) GetService(clusterName, namespace, svcName string) (*corev1.Service, error)
- func (k *Kubernetes) GetStatefulSet(clusterName, namespace, statefulSetName string) (*appsv1.StatefulSet, error)
- func (k *Kubernetes) GetUnitedDeployment(clusterName, namespace, unitedDeploymentName string) (*v1alpha1.UnitedDeployment, error)
- func (k *Kubernetes) ListConfigMap(clusterName, namespace string) (*corev1.ConfigMapList, error)
- func (k *Kubernetes) ListDeployment(clusterName, namespace string) (*appsv1.DeploymentList, error)
- func (k *Kubernetes) ListNode(clusterName string) (*corev1.NodeList, error)
- func (k *Kubernetes) ListNodePool(clusterName string) (*v1alpha1.NodePoolList, error)
- func (k *Kubernetes) ListPod(clusterName, namespace string) (*corev1.PodList, error)
- func (k *Kubernetes) ListSecret(clusterName, namespace string) (*corev1.SecretList, error)
- func (k *Kubernetes) ListStatefulSet(clusterName, namespace string) (*appsv1.StatefulSetList, error)
- func (k *Kubernetes) ListUnitedDeployment(clusterName, namespace string) (*v1alpha1.UnitedDeploymentList, error)
- func (k *Kubernetes) UpdateConfigMap(clusterName, namespace string, cm *corev1.ConfigMap) error
- func (k *Kubernetes) UpdateDeployment(clusterName, namespace string, cm *appsv1.Deployment) error
- func (k *Kubernetes) UpdateNode(clusterName string, node *corev1.Node) error
- func (k *Kubernetes) UpdateNodePool(clusterName string, nodePool *v1alpha1.NodePool) error
- func (k *Kubernetes) UpdatePod(clusterName, namespace string, pod *corev1.Pod) error
- func (k *Kubernetes) UpdateSecret(clusterName, namespace string, cm *corev1.Secret) error
- func (k *Kubernetes) UpdateService(clusterName, namespace string, svc *corev1.Service) error
- func (k *Kubernetes) UpdateStatefulSet(clusterName, namespace string, cm *appsv1.StatefulSet) error
- func (k *Kubernetes) UpdateUnitedDeployment(clusterName, namespace string, unitedDeployment *v1alpha1.UnitedDeployment) error
Constants ¶
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 ¶
Types ¶
type Kubernetes ¶
type Kubernetes struct{}
func New ¶
func New() *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 ¶
CreateNode Create node on specified cluster.
func (*Kubernetes) CreateNodePool ¶
func (k *Kubernetes) CreateNodePool(clusterName string, 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 string, 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)
GenerateUnitedDeploymentSpec 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.