Documentation ¶
Index ¶
- Constants
- Variables
- func DownRegister(ctx context.Context, management *config.Management, options config.Options) error
- func MaintainRegister(ctx context.Context, management *config.Management, options config.Options) error
- func PromoteRegister(ctx context.Context, management *config.Management, options config.Options) error
- func VolumeDetachRegister(ctx context.Context, management *config.Management, options config.Options) error
- type PromoteHandler
Constants ¶
const ( MaintainStatusAnnotationKey = "harvesterhci.io/maintain-status" MaintainStatusComplete = "completed" MaintainStatusRunning = "running" )
const ( KubeNodeRoleLabelPrefix = "node-role.kubernetes.io/" KubeMasterNodeLabelKey = KubeNodeRoleLabelPrefix + "master" KubeControlPlaneNodeLabelKey = KubeNodeRoleLabelPrefix + "control-plane" HarvesterLabelAnnotationPrefix = "harvesterhci.io/" HarvesterManagedNodeLabelKey = HarvesterLabelAnnotationPrefix + "managed" HarvesterPromoteNodeLabelKey = HarvesterLabelAnnotationPrefix + "promote-node" HarvesterPromoteStatusAnnotationKey = HarvesterLabelAnnotationPrefix + "promote-status" PromoteStatusComplete = "complete" PromoteStatusRunning = "running" PromoteStatusUnknown = "unknown" PromoteStatusFailed = "failed" )
Variables ¶
var ( ConditionJobComplete = condition.Cond(batchv1.JobComplete) ConditionJobFailed = condition.Cond(batchv1.JobFailed) )
Functions ¶
func DownRegister ¶ added in v1.1.2
DownRegister registers a controller to delete VMI when node is down
func MaintainRegister ¶
func MaintainRegister(ctx context.Context, management *config.Management, options config.Options) error
MaintainRegister registers the node controller
func PromoteRegister ¶
func PromoteRegister(ctx context.Context, management *config.Management, options config.Options) error
PromoteRegister registers the node controller
func VolumeDetachRegister ¶ added in v1.1.2
func VolumeDetachRegister(ctx context.Context, management *config.Management, options config.Options) error
VolumeDetachRegister registers the node volume detach controller
Types ¶
type PromoteHandler ¶
type PromoteHandler struct {
// contains filtered or unexported fields
}
PromoteHandler
func (*PromoteHandler) OnJobChanged ¶
OnJobChanged If the node corresponding to the promote job has been removed, delete the job. If the promote job executes successfully, the node's promote status will be marked as complete and schedulable If the promote job fails, the node's promote status will be marked as failed.
func (*PromoteHandler) OnJobRemove ¶
OnJobRemove If the running promote job is deleted, the node's promote status will be marked as unknown
func (*PromoteHandler) OnNodeChanged ¶
OnNodeChanged automate the upgrade of node roles If the number of managements in the cluster is less than spec number, the harvester oldest node will be automatically promoted to be management.