rancher / rancher-cleanup

171 stars 43 forks source link

Added conditional to check k8s version #70

Closed eliyamlevy closed 1 year ago

eliyamlevy commented 1 year ago

Parent Issue: https://github.com/rancher/rancher/issues/43043

Added a conditional to wrap the PSP removals from the cleanup script. Now the script checks the kubernetes version of the target cluster and if it is less than version 1.25 it will do the removal, otherwise it will output a message saying it skipped removing them.