Commit 3af97589 authored by Dmytro Bogatov's avatar Dmytro Bogatov 💕

Renew certs.

parent cc69900d
Pipeline #4531 passed with stage
in 53 seconds
......@@ -12,7 +12,7 @@ DOMAINS["pages.__MAIN__"]=false
DOMAINS["review.__MAIN__"]=false
DOMAINS["netwatch.app"]=true
DOMAINS["orlova.app"]=true
# DOMAINS["orlova.app"]=true
DOMAINS["bogatov.kiev.ua"]=true
DOMAINS["visasupport.com.ua"]=true
DOMAINS["visasupport.kiev.ua"]=true
......
......@@ -4,6 +4,10 @@ set -e
shopt -s globstar
# Ensure that the CWD is set to script's location
cd "${0%/*}"
CWD=$(pwd)
usage () {
printf "usage: ./$0 <certDirPath>\n"
printf "where\n"
......@@ -17,14 +21,15 @@ then
usage
fi
KEBEFILE="--kubeconfig=${CWD}/../infra/kubeconfig.yaml"
CERTDIRPATH=$1
NAMESPACES=("websites" "monitoring" "ingress" "status-site" "kube-system" "gitlab" "review")
for namespace in ${NAMESPACES[@]}
do
kubectl delete --namespace=$namespace secret lets-encrypt || true
kubectl create --namespace=$namespace secret tls lets-encrypt --key $CERTDIRPATH/certificate.key --cert $CERTDIRPATH/certificate.crt || true
kubectl $KEBEFILE delete --namespace=$namespace secret lets-encrypt || true
kubectl $KEBEFILE create --namespace=$namespace secret tls lets-encrypt --key $CERTDIRPATH/certificate.key --cert $CERTDIRPATH/certificate.crt || true
done
echo "Done."
......@@ -23,7 +23,7 @@ FILES=("certificate.key" "certificate.crt")
for file in ${FILES[@]}
do
scp $CERTDIRPATH/$file dbogatov@git.dbogatov.org:/home/dbogatov/certs/
scp $CERTDIRPATH/$file git.dbogatov.org:/gitlab/certificates/
done
echo "Done."
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