Add a script to copy the content of the custom folder to a running pod

For now it is only labels, but adding anything supported will work
(robots.txt, public files, templates, etc)

The content will be copied to the /data/gitea/ folder that is a mounted
persistent volume

https://docs.gitea.io/en-us/customizing-gitea/
This commit is contained in:
Greg Karékinian
2019-02-27 17:47:48 +01:00
parent 0a60d8831c
commit bbfa3f2964
7 changed files with 22 additions and 13 deletions

View File

@@ -2,8 +2,8 @@
# Delete the gitea-config secrets
kubectl delete secret gitea-config
# Replace it from the local files in kubernetes/custom/config/* (acquired by running
# Replace it from the local files in kubernetes/config/* (acquired by running
# ./script/get_secrets)
kubectl create secret generic gitea-config --from-file=cert.pem=kubernetes/custom/config/cert.pem --from-file=key.pem=kubernetes/custom/config/key.pem --from-file=app.ini=kubernetes/custom/config/app.ini
kubectl create secret generic gitea-config --from-file=cert.pem=kubernetes/config/cert.pem --from-file=key.pem=kubernetes/config/key.pem --from-file=app.ini=kubernetes/config/app.ini
# Force the pod to restart by patching the deployment resource
kubectl patch deployment gitea-server -p "{\"spec\":{\"template\":{\"metadata\":{\"annotations\":{\"date\":\"`date +'%s'`\"}}}}}"