Skip to content

Feature Request: node upgrade hooks #861

@lyluck-pixiv

Description

@lyluck-pixiv

When upgrading a k0s cluster, I want to add hooks at the start and end of node upgrades. These hooks will allow additional processing before draining each node and after uncordoning it.

Use cases include sending signals to DaemonSets on the node before draining to prompt graceful shutdowns or applying taints to evict pods.

I would like to add the following configuration:

apiVersion: k0sctl.k0sproject.io/v1beta1
kind: Cluster
spec:
  hosts:
    - hooks:
        upgrade:
          before:
            - echo "draining $HOST" >> k0sctl-apply.log
          after:
            - echo "uncoroned $HOST" >> k0sctl-apply.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions