mirror of
https://gitea.com/gitea/helm-chart.git
synced 2024-07-04 23:34:12 +02:00
update terraform custom theme instructions
This commit is contained in:
parent
aa8f543c08
commit
9dda709997
32
README.md
32
README.md
@ -592,6 +592,8 @@ gitea:
|
|||||||
|
|
||||||
Custom themes can be added via k8s secrets and referencing them in `values.yaml`.
|
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
|
```yaml
|
||||||
extraVolumes:
|
extraVolumes:
|
||||||
- name: gitea-themes
|
- name: gitea-themes
|
||||||
@ -614,13 +616,37 @@ resource "kubernetes_secret" "gitea-themes" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
"theme-custom.css" = "${file("FULL-PATH-TO-CSS")}"
|
"my-theme.css" = data.http.gitea-theme-light.body
|
||||||
"theme-custom-dark.css" = "${file("FULL-PATH-TO-CSS")}"
|
"my-theme-dark.css" = data.http.gitea-theme-dark.body
|
||||||
|
"my-theme-auto.css" = data.http.gitea-theme-auto.body
|
||||||
}
|
}
|
||||||
|
|
||||||
type = "Opaque"
|
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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user