Add initial Kubernetes config files #7

Merged
raucao merged 2 commits from feature/6-kubernetes_config into master 4 years ago
greg commented 4 years ago
Owner

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

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
raucao reviewed 4 years ago
raucao commented 4 years ago
Owner

What initial setup would that be? Wouldn't the ini be there from the very start now?

What initial setup would that be? Wouldn't the ini be there from the very start now?
raucao reviewed 4 years ago
raucao commented 4 years ago
Owner

That seems like not a lot of space for git repos. Can it be increased with an existing volume later on? Should it be more from the start?

That seems like not a lot of space for git repos. Can it be increased with an existing volume later on? Should it be more from the start?
Owner

Very cool! I used the scripts to get the configs, edited them a bit (disabled OpenID and creating orgs for example), then pushed them back and applied the server. All worked flawlessly.

Good job! 👍

Very cool! I used the scripts to get the configs, edited them a bit (disabled OpenID and creating orgs for example), then pushed them back and applied the server. All worked flawlessly. Good job! :+1:
greg reviewed 4 years ago
greg commented 4 years ago
Poster
Owner

Right, I think we can remove all these environment variables

Right, I think we can remove all these environment variables
greg reviewed 4 years ago
greg commented 4 years ago
Poster
Owner

Volumes can be expanded later (https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims), the 1GB size is something I used when I was setting everything up initially and forgot to change, it should indeed be higher

Volumes can be expanded later (https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims), the 1GB size is something I used when I was setting everything up initially and forgot to change, it should indeed be higher
Owner

Update: as discussed on IRC, just changing the secrets isn't actually enough to re-deploy and apply them. Need to change the deployment config for that.

Update: as discussed on IRC, just changing the secrets isn't actually enough to re-deploy and apply them. Need to change the deployment config for that.
Poster
Owner

I have changed the script that replaces the secrets to patch the deployment, causing the pod to restart

I have changed the script that replaces the secrets to patch the deployment, causing the pod to restart
Owner
There is no content yet.
raucao closed this pull request 4 years ago
raucao deleted branch feature/6-kubernetes_config 4 years ago
Owner

What happened to removing the obsolete env vars? I just found them in master.

What happened to removing the obsolete env vars? I just found them in master.
Poster
Owner

What happened to removing the obsolete env vars? I just found them in master.

Just done in #9

> What happened to removing the obsolete env vars? I just found them in master. Just done in #9
The pull request has been merged as 80e5b4f039.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.