document how to add custom themes

This commit is contained in:
pat-s 2023-06-27 21:45:43 +02:00
parent aa33330abe
commit b5dcd6c1b6
No known key found for this signature in database
GPG key ID: 3C6318841EF78925

View file

@ -566,6 +566,48 @@ gitea:
podAnnotations: {}
```
### Themes
Custom themes can be added via k8s secrets and referencing them in `values.yaml`.
```yaml
extraVolumes:
- name: gitea-themes
secret:
secretName: gitea-themes
extraVolumeMounts:
- name: gitea-themes
readOnly: true
mountPath: "/data/gitea/public/css"
```
The secret can be created via `terraform`:
```hcl
resource "kubernetes_secret" "gitea-themes" {
metadata {
name = "gitea-themes"
namespace = "gitea"
}
data = {
"theme-custom.css" = "${file("FULL-PATH-TO-CSS")}"
"theme-custom-dark.css" = "${file("FULL-PATH-TO-CSS")}"
}
type = "Opaque"
depends_on = [kubernetes_namespace.gitea]
}
```
or natively via `kubectl`:
```bash
kubectl create secret generic gitea-themes --from-file={{FULL-PATH-TO-CSS}} --namespace gitea
```
## Parameters
### Global