Uploaded image for project: 'Machine Config Operator'
  1. Machine Config Operator
  2. MCO-1056

Implement root "oc adm prune machineconfigs" command

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • 8
    • False
    • None
    • False
    • OCPSTRAT-824 - Garbage Collect old rendered MachineConfigs
    • 0
    • 0.0

      This story involves implementing the main "deletion" command for rendered machineconfigs under the  oc adm prune subcommand. It will only support deleting rendered MCs that are not in use. 

      It would support the following options to start:

      • Pool name, which indicates the owner of the rendered MCs to target. This argument is not required. If not set, all pools will be evaluated.
      • Count, which describes a max number of rendered MCs to delete, oldest first. This argument is not required.
      • Confirm flag, which will cause the prune to take place. If not set, the command will be run in dry run mode. This argument is not required.

      Important: If the admin specifies options that select any rendered MCs that are in use by an MCP, it should not be deleted. In such cases, the output should indicate why the rendered MC has been skipped over for deletion.

      Sample user workflow:

      $ oc adm prune renderedmachineconfigs --pool-name=worker
      # lists and deletes all unused rendered MCs for the worker pool in a dry run mode
      
      $ oc adm prune renderedmachineconfigs --count=10  --pool-name=worker
      # lists and deletes 10 oldest unused rendered MCs for the worker pool in a dry run mode
      
      $ oc adm prune renderedmachineconfigs --count=10  --pool-name=worker --confirm
      # actually deletes the rendered configs with the above options 

       

            rhn-support-cruhm Courtney Ruhm
            djoshy David Joshy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: