Documentation ¶
Index ¶
Constants ¶
View Source
const ( // APICallRetryInterval defines how long kubeadm should wait before retrying a failed API operation APICallRetryInterval = 500 * time.Millisecond // PatchNodeTimeout specifies how long kubeadm should wait for applying the label and taint on the control-plane before timing out PatchNodeTimeout = 2 * time.Minute // KubeletHealthzPort is the port of the kubelet healthz endpoint KubeletHealthzPort = 10248 KubeAPIServer = "kube-apiserver" // KubeControllerManager defines variable used internally when referring to kube-controller-manager component KubeControllerManager = "kube-controller-manager" // KubeScheduler defines variable used internally when referring to kube-scheduler component KubeScheduler = "kube-scheduler" )
Variables ¶
View Source
var ( // ControlPlaneComponents defines the control-plane component names ControlPlaneComponents = []string{KubeAPIServer, KubeControllerManager, KubeScheduler} )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Kubernetes() kubernetes.Interface Discovery() discovery.DiscoveryInterface KubernetesDynamic() dynamic.Interface Config() *rest.Config }
func NewKubernetesClient ¶
NewKubernetesClient creates a KubernetesClient
type Expansion ¶
type Expansion interface { FetchStaticPod(ctx context.Context, nodeName string, component string) (*v1.Pod, error) FetchKubeadmConfig(ctx context.Context) (string, error) UpdateKubeadmConfig(ctx context.Context, clusterConfig string) error FetchKubeletConfig(ctx context.Context) (string, error) UpdateKubeletConfig(ctx context.Context, kubeletConfig string) error FetchHostNameFromInternalIP(ctx context.Context, nodeIP string) (string, error) }
func NewKubeExpansion ¶
type Healthy ¶
type Healthy interface { // ForAPI waits for the API Server's /healthz endpoint to become "ok" ForAPI() error // ForHealthyKubelet blocks until the kubelet /healthz endpoint returns 'ok' ForHealthyKubelet(initialTimeout time.Duration, host string) error // SetTimeout adjusts the timeout to the specified duration SetTimeout(timeout time.Duration) // ForHealthyPod pod status ForHealthyPod(pod *v1.Pod) string }
Healthy is an interface for waiting for criteria in Kubernetes to happen
type Idempotency ¶
type Idempotency interface { CreateOrUpdateConfigMap(cm *v1.ConfigMap) error CreateOrUpdateSecret(secret *v1.Secret) error CreateOrUpdateServiceAccount(sa *v1.ServiceAccount) error CreateOrUpdateDeployment(deploy *apps.Deployment) error CreateOrUpdateDaemonSet(ds *apps.DaemonSet) error DeleteDaemonSetForeground(namespace, name string) error DeleteDeploymentForeground(namespace, name string) error CreateOrUpdateRole(role *rbac.Role) error CreateOrUpdateRoleBinding(roleBinding *rbac.RoleBinding) error CreateOrUpdateClusterRole(clusterRole *rbac.ClusterRole) error CreateOrUpdateClusterRoleBinding(clusterRoleBinding *rbac.ClusterRoleBinding) error PatchNode(nodeName string, patchFn func(*v1.Node)) error }
func NewKubeIdempotency ¶
func NewKubeIdempotency(client clientset.Interface) Idempotency
NewKubeIdempotency returns a new Idempotency object that talks to the given Kubernetes cluster
Click to show internal directories.
Click to hide internal directories.