Documentation ¶
Index ¶
- func AddOrUpdateTaint(node *v1.Node, taint *v1.Taint) (*v1.Node, bool, error)
- func GetClientset() (kubernetes.Interface, error)
- type Utils
- type UtilsImpl
- func (u *UtilsImpl) AddAnnotationsToNode(ctx context.Context, nodeName string, annotsToAdd map[string]string) error
- func (u *UtilsImpl) AddLabelsToNode(ctx context.Context, nodeName string, labelsToAdd map[string]string) error
- func (u *UtilsImpl) AddTaintsToNode(ctx context.Context, nodeName string, taintsToAdd []*v1.Taint) error
- func (u *UtilsImpl) ApplyYamlConfigFiles(files []string) error
- func (u *UtilsImpl) DrainNodeFromApiServer(ctx context.Context, nodeName string) error
- func (u *UtilsImpl) EnsureAppCatalog() error
- func (u *UtilsImpl) EnsureDns(cfg config.Config) error
- func (u *UtilsImpl) GetNodeFromK8sApi(ctx context.Context, nodeName string) (*v1.Node, error)
- func (u *UtilsImpl) IsInterfaceNil() bool
- func (u *UtilsImpl) K8sApiAvailable(cfg config.Config) error
- func (u *UtilsImpl) PreventAutoReattach() error
- func (u *UtilsImpl) RemoveAnnotationsFromNode(ctx context.Context, nodeName string, annotsToRemove []string) error
- func (u *UtilsImpl) UncordonNode(ctx context.Context, nodeName string) error
- func (u *UtilsImpl) WriteCloudProviderConfig(cfg config.Config) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOrUpdateTaint ¶
AddOrUpdateTaint tries to add a taint to annotations list. Returns a new copy of updated Node and true if something was updated false otherwise.
func GetClientset ¶
func GetClientset() (kubernetes.Interface, error)
GetClientset returns clientset created from config
Types ¶
type Utils ¶
type Utils interface { GetNodeFromK8sApi(context.Context, string) (*v1.Node, error) AddLabelsToNode(context.Context, string, map[string]string) error AddAnnotationsToNode(context.Context, string, map[string]string) error RemoveAnnotationsFromNode(context.Context, string, []string) error AddTaintsToNode(context.Context, string, []*v1.Taint) error DrainNodeFromApiServer(context.Context, string) error UncordonNode(context.Context, string) error K8sApiAvailable(config.Config) error PreventAutoReattach() error IsInterfaceNil() bool EnsureDns(config.Config) error EnsureAppCatalog() error ApplyYamlConfigFiles([]string) error WriteCloudProviderConfig(config.Config) error }
type UtilsImpl ¶
type UtilsImpl struct {
Clientset kubernetes.Interface
}
func (*UtilsImpl) AddAnnotationsToNode ¶
func (u *UtilsImpl) AddAnnotationsToNode(ctx context.Context, nodeName string, annotsToAdd map[string]string) error
AddAnnotationsToNode adds annotations to node
func (*UtilsImpl) AddLabelsToNode ¶
func (u *UtilsImpl) AddLabelsToNode(ctx context.Context, nodeName string, labelsToAdd map[string]string) error
AddLabelsToNode adds labels to node
func (*UtilsImpl) AddTaintsToNode ¶
func (u *UtilsImpl) AddTaintsToNode(ctx context.Context, nodeName string, taintsToAdd []*v1.Taint) error
AddTaintsToNode adds taints to node
func (*UtilsImpl) ApplyYamlConfigFiles ¶
ApplyYamlConfigFiles applies the yaml files
func (*UtilsImpl) DrainNodeFromApiServer ¶
DrainNodeFromApiServer drains node from K8s server
func (*UtilsImpl) EnsureAppCatalog ¶
EnsureAppCatalog applies app catalog yaml files
func (*UtilsImpl) GetNodeFromK8sApi ¶
GetNodeFromK8sApi returns node from K8s api with given nodename
func (*UtilsImpl) IsInterfaceNil ¶
func (*UtilsImpl) K8sApiAvailable ¶
K8sApiAvailable checks if K8s api server is available
func (*UtilsImpl) PreventAutoReattach ¶
PreventAutoReattach removes qbert metaData file if present
func (*UtilsImpl) RemoveAnnotationsFromNode ¶
func (u *UtilsImpl) RemoveAnnotationsFromNode(ctx context.Context, nodeName string, annotsToRemove []string) error
RemoveAnnotationsFromNode removes annotations from node
func (*UtilsImpl) UncordonNode ¶
UncordonNode uncordons node