update terraform custom theme instructions

This commit is contained in:
pat-s 2023-07-20 09:51:13 +02:00
parent aa8f543c08
commit 9dda709997
No known key found for this signature in database
GPG Key ID: 3C6318841EF78925
1 changed files with 29 additions and 3 deletions

View File

@ -592,6 +592,8 @@ gitea:
Custom themes can be added via k8s secrets and referencing them in `values.yaml`.
The [http provider](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) is useful here.
```yaml
extraVolumes:
- name: gitea-themes
@ -614,13 +616,37 @@ resource "kubernetes_secret" "gitea-themes" {
}
data = {
"theme-custom.css" = "${file("FULL-PATH-TO-CSS")}"
"theme-custom-dark.css" = "${file("FULL-PATH-TO-CSS")}"
"my-theme.css" = data.http.gitea-theme-light.body
"my-theme-dark.css" = data.http.gitea-theme-dark.body
"my-theme-auto.css" = data.http.gitea-theme-auto.body
}
type = "Opaque"
}
depends_on = [kubernetes_namespace.gitea]
data "http" "gitea-theme-light" {
url = "<raw theme url>"
request_headers = {
Accept = "application/json"
}
}
data "http" "gitea-theme-dark" {
url = "<raw theme url>"
request_headers = {
Accept = "application/json"
}
}
data "http" "gitea-theme-auto" {
url = "<raw theme url>"
request_headers = {
Accept = "application/json"
}
}
```