Verified Commit c7b947f4 authored by Dmytro Bogatov's avatar Dmytro Bogatov 💕

Add placeholders.

parent a4dcb343
......@@ -4,16 +4,15 @@ set -e
shopt -s globstar
source sources/data.sh
source ./.secret.sh
rm -rf services/
mkdir -p services
#
# $1 - service
# $2 - image
#
generate-service () {
cp sources/namespace.yaml services/
service=$1
image=$2
for service in "${!SERVICES[@]}"
do
echo "Generating $service configs..."
mkdir -p services/$service
......@@ -26,13 +25,35 @@ do
elif [ "$service" == "veles-russia-com" ]
then
URL="veles-russia.com"
elif [ "$service" == "res-public-net" ]
then
URL="res-public.net"
else
URL=${service//-/.}
fi
sed -i -e "s#__NAME__#$service#g" services/$service/{ingress,service,deployment}.yaml
sed -i -e "s#__IMAGE__#${SERVICES[${service}]}#g" services/$service/{ingress,service,deployment}.yaml
sed -i -e "s#__IMAGE__#$image#g" services/$service/{ingress,service,deployment}.yaml
sed -i -e "s#__URL__#$URL#g" services/$service/{ingress,service,deployment}.yaml
}
source sources/data.sh
source ./.secret.sh
rm -rf services/
mkdir -p services
cp sources/namespace.yaml services/
for service in "${!SERVICES[@]}"
do
generate-service $service ${SERVICES[${service}]}
done
for placeholder in "${!PLACEHOLDERS[@]}"
do
generate-service $placeholder registry.dbogatov.org/dbogatov/nginx-placeholders/${PLACEHOLDERS[${placeholder}]}:latest
done
### Dashboard OAuth
......
......@@ -159,16 +159,16 @@ kubectl apply -R -f sources/nginx/
kubectl apply -R -f services/
echo "Deploying status site"
echo "Deploying status site SKIPPED"
kubectl create secret -n status-site generic appsettings.production.yml --from-file=$STATUSSITECONFIG
# kubectl create secret -n status-site generic appsettings.production.yml --from-file=$STATUSSITECONFIG
# TODO should be master
BRANCH="49-move-to-kubernetes-deployment"
# BRANCH="49-move-to-kubernetes-deployment"
kubectl apply -f https://git.dbogatov.org/dbogatov/status-site/-/jobs/artifacts/$BRANCH/raw/deployment/config.yaml?job=release-deployment
# kubectl apply -f https://git.dbogatov.org/dbogatov/status-site/-/jobs/artifacts/$BRANCH/raw/deployment/config.yaml?job=release-deployment
kubectl apply -R -f sources/status-site/
# kubectl apply -R -f sources/status-site/
echo "Done!"
......
......@@ -56,3 +56,11 @@ DOMAINS["visasupport.com.ua"]=$AVALUE
DOMAINS["visasupport.kiev.ua"]=$AVALUE
DOMAINS["vleskniga.com"]=$AVALUE
DOMAINS["votings.net"]=$AVALUE
###
declare -A PLACEHOLDERS
PLACEHOLDERS["status-dbogatov-org"]="under-maintenance"
PLACEHOLDERS["votings-net"]="under-maintenance"
PLACEHOLDERS["res-public-net"]="under-maintenance"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment