2 Commits

Author SHA1 Message Date
db769ca053 postfix instead of prefix, 2
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2024-01-31 15:31:03 +01:00
536e933fef postfix instead of prefix 2024-01-31 15:30:53 +01:00
3 changed files with 12 additions and 5 deletions

View File

@ -46,10 +46,10 @@ metadata:
spec:
tls:
- hosts:
- %PREFIX%nutri.hottis.de
- nutri%POSTFIX%.hottis.de
secretName: nutri-cert
rules:
- host: %PREFIX%nutri.hottis.de
- host: nutri%POSTFIX%.hottis.de
http:
paths:
- path: /

View File

@ -1,13 +1,19 @@
#!/bin/bash
if [ "$1" == "test" ]; then
POSTFIX="-test"
IMAGE_TAG="latest"
else
POSTFIX=""
fi
if [ "$IMAGE_TAG" == "" ]; then
echo "Make sure IMAGE_TAG is set"
exit 1
fi
IMAGE_NAME=gitea.hottis.de/moerp/elo-rezept-rechner
NAMESPACE=moerp
NAMESPACE=moerp${POSTFIX}
DEPLOYMENT_DIR=$PWD/deployment
pushd $DEPLOYMENT_DIR > /dev/null
@ -15,7 +21,7 @@ pushd $DEPLOYMENT_DIR > /dev/null
. /tmp/secrets
rm /tmp/secrets
CLIENT_SECRETS=`cat oidc-config.json | sed -e's!%CLIENT_SECRET%!'$CLIENT_SECRET'!'`
CLIENT_SECRETS=`cat oidc-config${POSTFIX}.json | sed -e's!%CLIENT_SECRET%!'$CLIENT_SECRET'!'`
kubectl create namespace $NAMESPACE \
--dry-run=client \
@ -37,6 +43,7 @@ kubectl create secret generic nutri-secrets \
cat $DEPLOYMENT_DIR/deploy-yml.tmpl | \
sed -e 's,%IMAGE%,'$IMAGE_NAME':'$IMAGE_TAG','g | \
sed -e 's,%POSTFIX%,'$POSTFIX','g | \
kubectl apply -f - -n $NAMESPACE
popd > /dev/null