k8s-scripts
k8s-scripts copied to clipboard
whitelist certs that should never be removed
I am opening this as a "issue" but in reality is a little suggestion that maybe can be helpful.
Regarding this TO-DO: https://github.com/richstokes/k8s-scripts/blob/d294cf9feeb08d6cb91687fab9f8be88a4c5b6b2/clean-orphaned-secrets-cert-manager/clean-orphans.sh#L12
Here is how I am managing it adding some code from line 32:
...
# Remove from array special secrets
SPECIALS=(one-special-tls other-special-tls)
for special in "${SPECIALS[@]}"; do
for i in "${!ORPHANS[@]}"; do
if [[ ${ORPHANS[i]} = $special ]]; then
unset 'ORPHANS[i]'
fi
done
done
...
😉
Appreciate the info! If you like, feel free to open a PR and include those. I don't do much with K8s currently so this has gone a bit stale :-)