fix DNS regex

Exclude dependency pods unless they were launched with custom-app.
This commit is contained in:
Heavybullets8 2022-06-13 04:48:10 +00:00 committed by GitHub
parent 8e8f46f4a3
commit e325ab0a3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,8 +102,8 @@ export -f restore
dns(){
clear -x
echo "Generating DNS Names.."
#ignored dependency pods, No change required
dep_ignore="cron|kube-system|nvidia|svclb|NAME|memcached"
#ignored dependency pods, may need to add more in the future.
dep_ignore="\-cronjob\-|^kube-system|\ssvclb|NAME|\-memcached\-.[^custom\-app]|\-postgresql\-.[^custom\-app]|\-redis\-.[^custom\-app]|\-mariadb\-.[^custom\-app]|\-promtail\-.[^custom\-app]"
# Pulling pod names
mapfile -t main < <(k3s kubectl get pods -A | grep -Ev "$dep_ignore" | sort)