Allow-listing domains in pi-hole deployment

I’m hosting the most excellent pi-hole software on my Kubernetes cluster as a stateless deployment. This means that every time a new replica pod for pi-hole starts, all its configuration is supplied via ConfigMap volume mounts and the Gravity database is created from scratch. Pi-hole v5.0 introduced a change to integrate the block/white lists directly into the Gravity database so mounting a /etc/pihole/whitelist.txt using a ConfigMap did not work anymore. You now need to execute the pihole command for allow-listing domains in pi-hole. Strangely enough, this requirement came along because searching for items at the homedepot.ca web site was not…