Documentation ¶
Index ¶
- Variables
- func AnnotateNodes(kubeconfig *rest.Config, nodes []v1.Node, annotations map[string]string) error
- func Apply(config *rest.Config, manifest string) error
- func CheckNodeTaint(node v1.Node, taint v1.Taint) bool
- func CrdEstablished(kubeconfig *rest.Config, name string) (bool, error)
- func CrdExists(kubeconfig *rest.Config, name string) (bool, error)
- func CreateClusterRoleBindingFromYaml(cliSet kubeclientset.Interface, crbTmpl string) error
- func CreateClusterRoleFromYaml(cliSet kubeclientset.Interface, crTmpl string) error
- func CreateConfigMapFromYaml(cliSet kubeclientset.Interface, ns, cmTmpl string) error
- func CreateDeployFromYaml(cliSet kubeclientset.Interface, ns, dplyTmpl string, ctx interface{}) error
- func CreateEdgeNodepools(kubeconfig *rest.Config) error
- func CreateNamespace(kubeconfig *rest.Config, name string) (*v1.Namespace, error)
- func CreateNamespaceIfNotExist(kubeconfig *rest.Config, name string) (*v1.Namespace, error)
- func CreateRoleBindingFromYaml(cliSet kubeclientset.Interface, crbTmpl string) error
- func CreateSecretFromYaml(cliSet kubeclientset.Interface, ns, saTmpl string) error
- func CreateServiceAccountFromYaml(cliSet kubeclientset.Interface, ns, saTmpl string) error
- func CreateServiceFromYaml(cliSet kubeclientset.Interface, ns, svcTmpl string) error
- func DeleteCluster(name, namespace string, config *rest.Config) error
- func DeleteClusterRole(kubeconfig *rest.Config, name string) error
- func DeleteClusterRoleBinding(kubeconfig *rest.Config, name string) error
- func DeleteNode(kubeconfig *rest.Config, name string) error
- func DeleteNodepool(kubeconfig *rest.Config, name string) error
- func DeleteServiceAccount(kubeconfig *rest.Config, name, namespace string) error
- func DeploymentsReadyByLabels(kubeconfig *rest.Config, namespace string, labels map[string]string) (bool, error)
- func GetAllNodes(kubeconfig *rest.Config) ([]v1.Node, error)
- func GetClientset(config *rest.Config) (*kubernetes.Clientset, error)
- func GetCloudNodes(kubeconfig *rest.Config) ([]v1.Node, error)
- func GetCluster(name, namespace string, config *rest.Config) (*unstructured.Unstructured, error)
- func GetConfigFromKubeconfig(kubeconfig string) *rest.Config
- func GetConfigMapValue(kubeconfig *rest.Config, namespace, name, key string) (string, error)
- func GetDiscoveryClient(config *rest.Config) (*discovery.DiscoveryClient, error)
- func GetDynamicClient(config *rest.Config) (dynamic.Interface, error)
- func GetEdgeNodes(kubeconfig *rest.Config) ([]v1.Node, error)
- func GetNamespace(kubeconfig *rest.Config, name string) (*v1.Namespace, error)
- func GetNodes(kubeconfig *rest.Config, selector *metav1.LabelSelector) ([]v1.Node, error)
- func GetPods(kubeconfig *rest.Config, namespace string, selector string) ([]v1.Pod, error)
- func GetSecret(kubeconfig *rest.Config, name, namespace string) (*v1.Secret, error)
- func HandleNodePool(kubeconfig *rest.Config, node v1.Node) error
- func LabelNodes(kubeconfig *rest.Config, nodes []v1.Node, labels map[string]string) error
- func ListCRDs(kubeconfig *rest.Config) (*v1.CustomResourceDefinitionList, error)
- func NodeExists(kubeconfig *rest.Config, name string) (bool, error)
- func NodePoolResourceExists(kubeconfig *rest.Config) (bool, error)
- func PollForConfigMap(kubeconfig *rest.Config, namespace, name string, timeout time.Duration) error
- func PrepareEdgeNodes(kubeconfig *rest.Config) error
- func PrintPodLog(client kubeclientset.Interface, pod *corev1.Pod, w io.Writer) error
- func RunJobAndCleanup(cliSet kubeclientset.Interface, job *batchv1.Job, ...) error
- func SecretValue(secret *v1.Secret, key string) (string, error)
- func TaintNodes(kubeconfig *rest.Config, nodes []v1.Node, taint v1.Taint) error
- func UpdateConfigMapValue(kubeconfig *rest.Config, namespace, name, key, value string) error
- func ValidatePhysicalNodeName(name string) error
- func WaitForClusterDeleted(name, namespace string, timeout time.Duration, config *rest.Config) (bool, error)
- func WaitForCrdEstablished(kubeconfig *rest.Config, name string, timeout time.Duration) (bool, error)
- func WaitForDeploymentOrError(config *rest.Config, namespace string, labels map[string]string, ...) error
- func WaitForDeploymentReady(kubeconfig *rest.Config, namespace string, labels map[string]string, ...) (bool, error)
Constants ¶
This section is empty.
Variables ¶
var ( // PropagationPolicy defines the propagation policy used when deleting a resource PropagationPolicy = metav1.DeletePropagationBackground // CheckServantJobPeriod defines the time interval between two successive ServantJob statu's inspection CheckServantJobPeriod = time.Second * 10 )
var ( DefaultEdgeFarmEdgeWorkerLabel = metav1.LabelSelector{ MatchLabels: map[string]string{ "openyurt.io/is-edge-worker": "true", }, } DefaultEdgeNodeTaint = v1.Taint{ Key: "edgefarm.io", Value: "", Effect: v1.TaintEffectNoSchedule, } )
Functions ¶
func AnnotateNodes ¶ added in v1.6.0
func CrdEstablished ¶ added in v1.6.1
func CreateClusterRoleBindingFromYaml ¶ added in v1.3.0
func CreateClusterRoleBindingFromYaml(cliSet kubeclientset.Interface, crbTmpl string) error
CreateClusterRoleBindingFromYaml creates the ClusterRoleBinding from the yaml template.
func CreateClusterRoleFromYaml ¶ added in v1.3.0
func CreateClusterRoleFromYaml(cliSet kubeclientset.Interface, crTmpl string) error
CreateClusterRoleFromYaml creates the ClusterRole from the yaml template.
func CreateConfigMapFromYaml ¶ added in v1.3.0
func CreateConfigMapFromYaml(cliSet kubeclientset.Interface, ns, cmTmpl string) error
CreateConfigMapFromYaml creates the ConfigMap from the yaml template.
func CreateDeployFromYaml ¶ added in v1.3.0
func CreateDeployFromYaml(cliSet kubeclientset.Interface, ns, dplyTmpl string, ctx interface{}) error
CreateDeployFromYaml creates the Deployment from the yaml template.
func CreateEdgeNodepools ¶ added in v1.8.0
func CreateNamespace ¶
func CreateRoleBindingFromYaml ¶ added in v1.3.0
func CreateRoleBindingFromYaml(cliSet kubeclientset.Interface, crbTmpl string) error
CreateRoleBindingFromYaml creates the RoleBinding from the yaml template.
func CreateSecretFromYaml ¶ added in v1.3.0
func CreateSecretFromYaml(cliSet kubeclientset.Interface, ns, saTmpl string) error
CreateSecretFromYaml creates the Secret from the yaml template.
func CreateServiceAccountFromYaml ¶ added in v1.3.0
func CreateServiceAccountFromYaml(cliSet kubeclientset.Interface, ns, saTmpl string) error
CreateServiceAccountFromYaml creates the ServiceAccount from the yaml template.
func CreateServiceFromYaml ¶ added in v1.3.0
func CreateServiceFromYaml(cliSet kubeclientset.Interface, ns, svcTmpl string) error
CreateServiceFromYaml creates the Service from the yaml template.
func DeleteCluster ¶ added in v1.8.0
func DeleteClusterRole ¶ added in v1.3.0
func DeleteClusterRoleBinding ¶ added in v1.3.0
func DeleteNodepool ¶ added in v1.1.0
func DeleteServiceAccount ¶ added in v1.3.0
func DeploymentsReadyByLabels ¶ added in v1.8.0
func GetAllNodes ¶ added in v1.3.0
GetAllNodes returns a slice with all nodes
func GetClientset ¶
func GetClientset(config *rest.Config) (*kubernetes.Clientset, error)
GetClientset returns a clientset for the current cluster.
func GetCluster ¶ added in v1.8.0
func GetCluster(name, namespace string, config *rest.Config) (*unstructured.Unstructured, error)
func GetConfigFromKubeconfig ¶ added in v1.8.0
func GetConfigMapValue ¶ added in v1.3.0
func GetDiscoveryClient ¶ added in v1.1.0
func GetDiscoveryClient(config *rest.Config) (*discovery.DiscoveryClient, error)
func GetDynamicClient ¶
GetClientset returns a clientset for the current cluster.
func HandleNodePool ¶
HandleNodePool creates a nodepool resource and create the corresponding label on the node
func LabelNodes ¶ added in v1.6.0
func ListCRDs ¶ added in v1.6.0
func ListCRDs(kubeconfig *rest.Config) (*v1.CustomResourceDefinitionList, error)
func NodeExists ¶ added in v1.1.0
func NodePoolResourceExists ¶ added in v1.8.0
func PollForConfigMap ¶ added in v1.3.0
func PrepareEdgeNodes ¶
func PrintPodLog ¶ added in v1.3.0
func RunJobAndCleanup ¶ added in v1.3.0
func RunJobAndCleanup(cliSet kubeclientset.Interface, job *batchv1.Job, timeout, period time.Duration, waitForTimeout bool) error
RunJobAndCleanup runs the job, wait for it to be complete, and delete it
func UpdateConfigMapValue ¶ added in v1.3.0
func ValidatePhysicalNodeName ¶ added in v1.1.0
ValidatePhysicalNodeName validates the given name not to be anything like regex `edgefarm-control-plane` or `edgefarm-worker.*`
func WaitForClusterDeleted ¶ added in v1.8.0
func WaitForCrdEstablished ¶ added in v1.8.0
func WaitForDeploymentOrError ¶ added in v1.8.0
Types ¶
This section is empty.