Commit cd67b090 authored by Dmytro Bogatov's avatar Dmytro Bogatov 💕

Add webcam service.

parent defd8d50
......@@ -15,6 +15,7 @@ generate-service () {
service=$1
image=$2
replicas=$REPLICAS
auth=""
echo "Generating $service configs..."
......@@ -27,6 +28,11 @@ generate-service () {
replicas="1"
fi
if [ "$service" == "webcam-dbogatov-org" ]
then
auth="ingress.kubernetes.io/auth-type: basic"
fi
if [ "$service" == "moon-travel-com-ua" ]
then
URL="moon-travel.com.ua"
......@@ -47,6 +53,7 @@ generate-service () {
sed -i -e "s#__NAME__#$service#g" services/$service/{ingress,service,deployment}.yaml
sed -i -e "s#__URL__#$URL#g" services/$service/{ingress,service,deployment}.yaml
sed -i -e "s#__REPLICAS__#$replicas#g" services/$service/{ingress,service,deployment}.yaml
sed -i -e "s#__AUTH__#$auth#g" services/$service/{ingress,service,deployment}.yaml
}
......
......@@ -104,9 +104,9 @@ for namespace in ${NAMESPACES[@]}
do
kubectl create namespace $namespace || true # some of them already exist
kubectl create --namespace=$namespace secret tls lets-encrypt --key $CERTDIRPATH/certificate.key --cert $CERTDIRPATH/certificate.crt
kubectl create --namespace=$namespace secret generic basic-auth --from-file=$CERTDIRPATH/auth
done
echo "Deploying the registry secret"
kubectl --namespace=websites create secret docker-registry regsecret --docker-server=registry.dbogatov.org --docker-username=dbogatov --docker-password=$DOCKERPASS --docker-email=dmytro@dbogatov.org
......
......@@ -9,6 +9,7 @@ SERVICES["socialimps-dbogatov-org"]="registry.dbogatov.org/dbogatov/cs-3043-grou
SERVICES["push-dbogatov-org"]="registry.dbogatov.org/dbogatov/pushexpress:latest"
SERVICES["mail-dbogatov-org"]="registry.dbogatov.org/dbogatov/nginx-proxies/mail-dbogatov-org:latest"
SERVICES["dns-dbogatov-org"]="registry.dbogatov.org/dbogatov/nginx-proxies/dns-dbogatov-org:latest"
SERVICES["webcam-dbogatov-org"]="registry.dbogatov.org/dbogatov/nginx-proxies/webcam-dbogatov-org:latest"
SERVICES["nigmatullina-org"]="registry.dbogatov.org/dbogatov/inara-cv:latest"
......
......@@ -8,6 +8,9 @@ metadata:
ingress.kubernetes.io/force-ssl-redirect: "true"
ingress.kubernetes.io/ssl-redirect: "true"
ingress.kubernetes.io/from-to-www-redirect: "true"
ingress.kubernetes.io/auth-secret: basic-auth
ingress.kubernetes.io/auth-realm: "Authentication Required!"
__AUTH__
spec:
tls:
- hosts:
......@@ -23,13 +26,6 @@ spec:
backend:
serviceName: __NAME__
servicePort: 80
- host: "www.__URL__"
http:
paths:
- path: /
backend:
serviceName: __NAME__
servicePort: 80
- host: "__NAME__.cluster.dbogatov.org"
http:
paths:
......
......@@ -17,6 +17,7 @@ DOMAINS["cluster.dbogatov.org"]=false
DOMAINS["grafana.dbogatov.org"]=false
DOMAINS["git.dbogatov.org"]=false
DOMAINS["pages.dbogatov.org"]=false
DOMAINS["webcam.dbogatov.org"]=false
DOMAINS["mattermost.dbogatov.org"]=false
DOMAINS["minecraft.dbogatov.org"]=false
DOMAINS["ci.dbogatov.org"]=false
......
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