Documentation ¶
Index ¶
- Constants
- func ApplyK8sSystemJob(jobYaml, kubeConfigPath string, k8sWrapTransport transport.WrapperFunc, ...) error
- func CordonUncordon(k8sClient *kubernetes.Clientset, nodeName string, cordoned bool) error
- func DecodeYamlResource(resource interface{}, yamlManifest string) error
- func DeleteConfigMap(k8sClient *kubernetes.Clientset, configMapName string) error
- func DeleteDeploymentIfExists(ctx context.Context, k8sClient *kubernetes.Clientset, name, namespace string) error
- func DeleteK8sJobIfExists(k8sClient *kubernetes.Clientset, name, namespace string) error
- func DeleteK8sSystemJob(jobYaml string, k8sClient *kubernetes.Clientset, timeout int) error
- func DeleteNode(k8sClient *kubernetes.Clientset, nodeName, cloudProvider string) error
- func DeletePods(k8sClient *kubernetes.Clientset, podList *v1.PodList) error
- func DeleteServiceIfExists(ctx context.Context, k8sClient *kubernetes.Clientset, name, namespace string) error
- func GetConfigMap(k8sClient *kubernetes.Clientset, configMapName string) (*v1.ConfigMap, error)
- func GetNode(k8sClient *kubernetes.Clientset, nodeName string) (*v1.Node, error)
- func GetNodeList(k8sClient *kubernetes.Clientset) (*v1.NodeList, error)
- func GetPSPList(k8sClient *kubernetes.Clientset) (*v1beta1.PodSecurityPolicyList, error)
- func GetSecret(k8sClient *kubernetes.Clientset, secretName, namespace string) (*v1.Secret, error)
- func GetSecretsList(k8sClient *kubernetes.Clientset, namespace string) (*v1.SecretList, error)
- func GetSystemSecret(k8sClient *kubernetes.Clientset, secretName string) (*v1.Secret, error)
- func IsNodeReady(node v1.Node) bool
- func ListPodsByLabel(k8sClient *kubernetes.Clientset, label string) (*v1.PodList, error)
- func NewClient(kubeConfigPath string, k8sWrapTransport transport.WrapperFunc) (*kubernetes.Clientset, error)
- func RemoveTaintFromNodeByKey(k8sClient *kubernetes.Clientset, nodeName, taintKey string) error
- func SetNodeAddressesAnnotations(node *v1.Node, internalAddress, externalAddress string)
- func SyncNodeLabels(node *v1.Node, toAddLabels, toDelLabels map[string]string)
- func SyncNodeTaints(node *v1.Node, toAddTaints, toDelTaints []string)
- func UpdateClusterRoleBindingFromYaml(k8sClient *kubernetes.Clientset, clusterRoleBindingYaml string) error
- func UpdateClusterRoleFromYaml(k8sClient *kubernetes.Clientset, clusterRoleYaml string) error
- func UpdateConfigMap(k8sClient *kubernetes.Clientset, configYaml []byte, configMapName string) (bool, error)
- func UpdatePodSecurityPolicyFromYaml(k8sClient *kubernetes.Clientset, pspYaml string) error
- func UpdateRoleBindingFromYaml(k8sClient *kubernetes.Clientset, roleBindingYaml, namespace string) error
- func UpdateRoleFromYaml(k8sClient *kubernetes.Clientset, roleYaml, namespace string) error
- func UpdateSecret(k8sClient *kubernetes.Clientset, secret *v1.Secret) error
- func UpdateServiceAccountFromYaml(k8sClient *kubernetes.Clientset, serviceAccountYaml string) error
- type JobStatus
Constants ¶
View Source
const ( UserAddonResourceName = "rke-user-addon" UserAddonsIncludeResourceName = "rke-user-includes-addons" )
View Source
const ( DefaultRetries = 5 DefaultSleepSeconds = 5 DefaultTimeout = 45 K8sWrapTransportTimeout = 30 )
View Source
const ( HostnameLabel = "kubernetes.io/hostname" InternalAddressAnnotation = "rke.cattle.io/internal-ip" ExternalAddressAnnotation = "rke.cattle.io/external-ip" AWSCloudProvider = "aws" MaxRetries = 5 RetryInterval = 5 )
Variables ¶
This section is empty.
Functions ¶
func ApplyK8sSystemJob ¶
func CordonUncordon ¶
func CordonUncordon(k8sClient *kubernetes.Clientset, nodeName string, cordoned bool) error
func DecodeYamlResource ¶ added in v1.0.0
func DeleteConfigMap ¶ added in v0.2.0
func DeleteConfigMap(k8sClient *kubernetes.Clientset, configMapName string) error
func DeleteDeploymentIfExists ¶ added in v1.2.4
func DeleteK8sJobIfExists ¶ added in v1.2.12
func DeleteK8sJobIfExists(k8sClient *kubernetes.Clientset, name, namespace string) error
func DeleteK8sSystemJob ¶ added in v0.1.9
func DeleteK8sSystemJob(jobYaml string, k8sClient *kubernetes.Clientset, timeout int) error
func DeleteNode ¶
func DeleteNode(k8sClient *kubernetes.Clientset, nodeName, cloudProvider string) error
func DeletePods ¶ added in v0.2.0
func DeletePods(k8sClient *kubernetes.Clientset, podList *v1.PodList) error
func DeleteServiceIfExists ¶ added in v1.2.4
func GetConfigMap ¶
func GetNodeList ¶
func GetNodeList(k8sClient *kubernetes.Clientset) (*v1.NodeList, error)
func GetPSPList ¶
func GetPSPList(k8sClient *kubernetes.Clientset) (*v1beta1.PodSecurityPolicyList, error)
GetPSPList returns the PodSecurityPolicyList containing all PSPs in the cluster and an error. The list could be empty if there is no PSP in the cluster.
func GetSecretsList ¶ added in v1.0.0
func GetSecretsList(k8sClient *kubernetes.Clientset, namespace string) (*v1.SecretList, error)
func GetSystemSecret ¶ added in v1.0.0
func IsNodeReady ¶
func ListPodsByLabel ¶ added in v0.2.0
func NewClient ¶
func NewClient(kubeConfigPath string, k8sWrapTransport transport.WrapperFunc) (*kubernetes.Clientset, error)
func RemoveTaintFromNodeByKey ¶
func RemoveTaintFromNodeByKey(k8sClient *kubernetes.Clientset, nodeName, taintKey string) error
func SetNodeAddressesAnnotations ¶ added in v0.2.0
func SyncNodeLabels ¶ added in v0.2.0
func SyncNodeTaints ¶ added in v0.2.0
func UpdateClusterRoleBindingFromYaml ¶
func UpdateClusterRoleBindingFromYaml(k8sClient *kubernetes.Clientset, clusterRoleBindingYaml string) error
func UpdateClusterRoleFromYaml ¶
func UpdateClusterRoleFromYaml(k8sClient *kubernetes.Clientset, clusterRoleYaml string) error
func UpdateConfigMap ¶
func UpdatePodSecurityPolicyFromYaml ¶
func UpdatePodSecurityPolicyFromYaml(k8sClient *kubernetes.Clientset, pspYaml string) error
func UpdateRoleBindingFromYaml ¶
func UpdateRoleBindingFromYaml(k8sClient *kubernetes.Clientset, roleBindingYaml, namespace string) error
func UpdateRoleFromYaml ¶
func UpdateRoleFromYaml(k8sClient *kubernetes.Clientset, roleYaml, namespace string) error
func UpdateSecret ¶
func UpdateSecret(k8sClient *kubernetes.Clientset, secret *v1.Secret) error
func UpdateServiceAccountFromYaml ¶
func UpdateServiceAccountFromYaml(k8sClient *kubernetes.Clientset, serviceAccountYaml string) error
Types ¶
Click to show internal directories.
Click to hide internal directories.