infctl-cli/scripts/create_php_configmap_ctl.sh

16 lines
404 B
Bash
Raw Normal View History

#!/usr/bin/env bash
NGINX_CONFIGMAP=$(kubectl -n infctl create configmap php-config --from-file files/ctl/php/local.ini --dry-run=client -oyaml)
if [ -z "$NGINX_CONFIGMAP" ]; then
echo "Failed to create NGINX configmap."
exit 1
fi
echo "$NGINX_CONFIGMAP" | kubectl apply -f -
if [ $? -ne 0 ]; then
echo "Failed to apply NGINX configmap."
exit 1
fi
echo "NGINX configmap created successfully."