Uploaded image for project: 'Ansible Cloud Automation'
  1. Ansible Cloud Automation
  2. ACA-1251

[kubernetes.core/593] kubernetes.core.k8s_drain module "wait_for_completion" Parameter

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      https://github.com/ansible-collections/kubernetes.core/issues/593

              1. SUMMARY
                new parameter for this module "wait_for_completion" (of drain)
              1. ISSUE TYPE
      • Feature Idea
              1. COMPONENT NAME
                kubernetes.core.k8s_drain module
              1. ADDITIONAL INFORMATION
                currently, if you would issue something like this:

      ```

      • name: drain node
        kubernetes.core.k8s_drain:
        state: drain
        delete_options:
        terminate_grace_period: 300
      • name: reboot host
        reboot:

      ```

      the following would happen: drain API call would be made with a grace prerioud for the pods of 300seconds, but since the ansible task "drain node" is complete - the reboot host task would be run immediatly after

      so you have to do some inbetween checking yourself:

      ```

      • name: drain node
        kubernetes.core.k8s_drain:
        state: drain
        delete_options:
        terminate_grace_period: 300
      • name: wait for all pods to terminate
        until: all pods terminated
        < some magic depending on your pods / apps e.g. counting terminating pods >
      1. this task runs only AFTER all pods have gracefully been terminated
      • name: reboot host
        reboot:
        ```

      nice to have would be:
      ```

      • name: drain node
        kubernetes.core.k8s_drain:
        wait_for_completion: true
        state: drain
        delete_options:
        terminate_grace_period: 300
      1. this task runs only AFTER all pods have gracefully been terminated, since k8s_drain "waits_for_completion"
      • name: reboot host
        reboot:
        ```

            Unassigned Unassigned
            mgraves1@redhat.com Mike Graves
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: