feat: instance_name == branch
This commit is contained in:
parent
c8a88a578d
commit
45db247301
2
.env
2
.env
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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:
|
||||||
|
@ -29,3 +29,4 @@ roleRef:
|
|||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: homepage
|
name: homepage
|
||||||
|
namespace: "$K8S_NS"
|
||||||
|
Loading…
Reference in New Issue
Block a user