This repository has been archived on 2023-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
gitea.kosmos.org/script/replace_secrets
Greg Karékinian 4c463adcda Add initial Kubernetes config files
This includes all the resources currently running on https://gitea.kosmos.org

It sets up a persistent data volume for the MySQL database, one for the
Gitea data, that Gitea calls the custom folder (config, attachment,
avatars, logs, etc). We mount that persistent data volume as
/data/gitea. It also creates a Let's Encrypt certificate for
gitea.kosmos.org, also saved to the custom folder.

This also includes two scripts:

* `./script/get_secrets` downloads the secrets to the local filesystem so
they can be edited
* `./script/replace_secrets` deletes the remote secrets and creates them
again from the local ones in kubernetes/config/*

Closes #6
2018-12-14 17:14:00 +01:00

8 lines
373 B
Bash
Executable File

#!/usr/bin/env sh
# Delete the gitea-config secrets
kubectl delete secret gitea-config
# 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/config/cert.pem --from-file=key.pem=kubernetes/config/key.pem --from-file=app.ini=kubernetes/config/app.ini