Adding everything to let gitea work via https

This commit is contained in:
Moritz Graf
2020-05-01 19:11:16 +02:00
parent bb9c9ccb13
commit e7685f2c62
10 changed files with 130 additions and 35 deletions
+58
View File
@@ -39,6 +39,7 @@ done
helm repo add stable https://kubernetes-charts.storage.googleapis.com
helm repo add jetstack https://charts.jetstack.io
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add k8s-land https://charts.k8s.land
helm repo update
```
@@ -128,6 +129,63 @@ kubectl apply -f tt-rss/
helm upgrade --install prometheus-operator stable/prometheus-operator -n monitoring -f monitoring/prometheus-operator.secret.yml
```
## gitea
In case my PRs have been accepted this is no longer necessary:
```sh
git clone git@github.com:iptizer/gitea-chart.git
```
```sh
# from chart repo
helm upgrade --install gitea k8s-land/gitea -n development -f development/gitea.secret.yml
# from local folder
helm upgrade --install gitea ./gitea-chart -n development -f development/gitea.secret.yml
# phpmyadmin
helm upgrade --install gitea-phpmyadmin bitnami/phpmyadmin -n development -f development/gitea-phpmyadmin.yml
```
### backup
//TODO something with gitea dump to stdout and rclone to dropbox
### restore
For backup & restore see [gitea documentation](https://docs.gitea.io/en-us/backup-and-restore/).
Download the `gitea-dump` locally and proceed with the following commands:
```sh
❯ mkdir gitea_restore
❯ mv gitea-dump-1587901016.zip gitea_restore
❯ cd gitea_restore
❯ unzip gitea-dump-1587901016.zip
Archive: gitea-dump-1587901016.zip
inflating: gitea-repo.zip
creating: custom/
[...]
```
Import of sql may be done via phpmyadmin.
Copy to remote pod:
```sh
kubectl cp ./gitea-repo.zip gitea-gitea-69cd9bc59b-q2b2f:/data/git/
```
And finally unzip inside shell on pod:
```sh
cd /data/git/
unzip gitea-repo.zip
mv repositories/ gitea-repositories/
```
Then login to git.moritzgraf.de and proceed with default values, or adjust them.
## minio
```sh
+13
View File
@@ -0,0 +1,13 @@
---
db:
host: gitea-mariadb
ingress:
enabled: true
hosts:
- path: "/"
tls: true
name: "gitea.phpmyadmin.haumdaucher.de"
tlsSecret: "gitea-phpmyadmin-haumdaucher-de"
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/proxy-body-size: "0"
Binary file not shown.
+36
View File
@@ -0,0 +1,36 @@
persistence:
annotations:
"helm.sh/resource-policy": keep
enabled: true
storageClass: openebs-hostpath
accessMode: ReadWriteOnce
mariadb:
enabled: true
rootUser:
password: chu6ohzat4zae2iPhuoy
db:
user: gitea
name: gitea
password: OohoX6vahsh1mahshujo
ingress:
enabled: true
certManager: true
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
hosts:
- name: git.moritzgraf.de
tls:
- hosts:
- "git.moritzgraf.de"
secretName: git-moritzgraf-de
service:
ssh:
serviceType: ClusterIP
port: 22
externalPort: 2222
externalHost: git.moritzgraf.de