feat: instance_name == branch

This commit is contained in:
ange 2024-05-15 19:48:31 +02:00
parent c8a88a578d
commit 45db247301
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D
6 changed files with 9 additions and 6 deletions

2
.env
View File

@ -1,2 +1,2 @@
PROD_URL=apps.gmoker.com PROD_URL=apps.gmoker.com
IMAGEAPP=ghcr.io/gethomepage/homepage:v0.8.12 IMAGEAPP=ghcr.io/gethomepage/homepage:v0.8.13

View File

@ -15,6 +15,7 @@ jobs:
fi fi
cat <<EOF >> .env cat <<EOF >> .env
BASE_URL="$BASE_URL" BASE_URL="$BASE_URL"
INSTANCE_NAME="${{ gitea.ref_name }}"
EOF EOF
cat .env cat .env

View File

@ -3,4 +3,4 @@
# https://gethomepage.dev/latest/configs/settings # https://gethomepage.dev/latest/configs/settings
headerStyle: clean headerStyle: clean
instanceName: public instanceName: "$INSTANCE_NAME"

View File

@ -30,9 +30,11 @@ function kgcmkey() {
kubectl get configmap "$cm" -o jsonpath="{.data.$key}" kubectl get configmap "$cm" -o jsonpath="{.data.$key}"
} }
cmd=(kcreatecm homepage-config)
mapfile -t files "$(printf -- '--from-file=%s\n' config/*)" for f in config/*; do
kcreatecm homepage-config "${files[@]}" cmd+=("--from-file=$f=<(envsubst \"\$(env | xargs printf '$%s ')\" < $f)")
done
eval "${cmd[*]}"
kapply common/clusterrole.yaml common/app.yaml kapply common/clusterrole.yaml common/app.yaml

View File

@ -44,7 +44,6 @@ metadata:
labels: labels:
app: app app: app
spec: spec:
revisionHistoryLimit: 3
replicas: $NB_REPLICAS replicas: $NB_REPLICAS
selector: selector:
matchLabels: matchLabels:

View File

@ -29,3 +29,4 @@ roleRef:
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: homepage name: homepage
namespace: "$K8S_NS"