crc-org / snc

Single Node Cluster creation scripts for OpenShift 4.x as used by CodeReady Containers
https://crc.dev
Apache License 2.0
100 stars 49 forks source link

[4.16] Use `oc adm prune machineconfigpools` to remove older machine config #875

Closed praveenkumar closed 2 weeks ago

praveenkumar commented 2 months ago

With 4.16 oc command will have machineconfigpools prune functionality which will remove the older machine config. As of now we are kind of using hack, go over machineconfigs and check the timestamp and then delete all except latest one.

redbeam commented 1 month ago

I downloaded the 4.16 version of oc but there is no oc adm prune machineconfigpools command. Is it going to be added in future versions? I might be missing something though.

$ oc version
Client Version: 4.16.0-rc.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
$ oc adm prune machineconfigpools
error: unknown command "machineconfigpools"
See 'oc adm prune -h' for help and examples

Is it the renderedmachineconfigs subcommand?

praveenkumar commented 1 month ago

yes, looks like they changed the option from machineconfigs to rendermachineconfigs now since this is experiment command.

$ ./oc adm prune renderedmachineconfigs -h
Experimental: This command is under development and may change without notice.
 Prune rendered MachineConfigs for an OCP v4 cluster.
 oc adm prune renderedmachineconfigs
redbeam commented 1 month ago

Alright, so should we wait with this until the version is finalized?

redbeam commented 2 weeks ago

Merged