Verified Commit 1817b720 authored by Dmytro Bogatov's avatar Dmytro Bogatov 💕

Add cluster and www ingresses.

parent c4ba1fb8
......@@ -34,18 +34,34 @@ generate-ingress () {
for url in ${URLS[@]}
do
echo " - $url" >> $DIR/main.yaml
echo " - www.$url" >> $DIR/main.yaml
done
for main in ${MAIN[@]}
do
echo " - $NAME.cluster.$main" >> $DIR/main.yaml
done
echo " rules:" >> $DIR/main.yaml
for url in ${URLS[@]}
do
cp $DIR/rule.yaml $DIR/rule-$NAME.yaml
cp $DIR/rule-domain.yaml $DIR/rule-tmp.yaml
sed -i -e "s#__NAME__#$NAME#g" $DIR/rule-tmp.yaml
sed -i -e "s#__URL__#$url#g" $DIR/rule-tmp.yaml
cat $DIR/rule-tmp.yaml >> $DIR/main.yaml
done
for main in ${MAIN[@]}
do
cp $DIR/rule-cluster.yaml $DIR/rule-tmp.yaml
sed -i -e "s#__NAME__#$NAME#g" $DIR/rule-$NAME.yaml
sed -i -e "s#__URL__#$url#g" $DIR/rule-$NAME.yaml
sed -i -e "s#__NAME__#$NAME#g" $DIR/rule-tmp.yaml
sed -i -e "s#__URL__#$main#g" $DIR/rule-tmp.yaml
cat $DIR/rule-$NAME.yaml >> $DIR/main.yaml
cat $DIR/rule-tmp.yaml >> $DIR/main.yaml
done
cp $DIR/main.yaml $DIR/../ingress.yaml
......@@ -74,7 +90,7 @@ generate-service () {
mkdir -p services/$service/ingress
cp sources/service/{service,deployment}.yaml services/$service
cp sources/service/ingress/{main,rule}.yaml services/$service/ingress
cp sources/service/ingress/{main,rule-*}.yaml services/$service/ingress
if [ "$service" == "legacy-dbogatov-org" ]
then
......
......@@ -46,6 +46,7 @@ DOMAINS["dbogatov.org"]=$AVALUE
DOMAINS["dmytro.app"]=$AVALUE
DOMAINS["bogatov.app"]=$AVALUE
DOMAINS["netwatch.app"]=$AVALUE
DOMAINS["bogatov.kiev.ua"]=$AVALUE
DOMAINS["darinagulley.com"]=$AVALUE
DOMAINS["moon-travel.com.ua"]=$AVALUE
......@@ -65,7 +66,8 @@ DOMAINS["votings.net"]=$AVALUE
declare -A PLACEHOLDERS
PLACEHOLDERS["status-dbogatov-org"]="under-maintenance"
PLACEHOLDERS["netwatch-app"]="under-maintenance"
PLACEHOLDERS["votings-net"]="under-maintenance"
PLACEHOLDERS["res-public-net"]="under-maintenance"
......
- host: "__NAME__.cluster.__URL__"
http:
paths:
- path: /
backend:
serviceName: __NAME__
servicePort: 80
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