update terraform instructions
This commit is contained in:
parent
6b55736d6c
commit
c451fefe58
43
README.md
43
README.md
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
**Opinionated** GitHub-based light and dark themes for Gitea including an automatic theme switch option.
|
**Opinionated** GitHub-based light and dark themes for Gitea including an automatic theme switch option.
|
||||||
|
|
||||||
Created and tested with Gitea v1.15 - 1.17.
|
Tested with Gitea v1.20.
|
||||||
The theme might work with future versions though Gitea devs might change some CSS classes in the meantime and things might potentially look odd - just try yourself :)
|
Older Gitea versions can use previous releases from this repo.
|
||||||
|
|
||||||
I might update the theme over time to fix oversights and other issues - no guarantee though.
|
I might update the theme over time to fix oversights and other issues - no guarantee though.
|
||||||
|
|
||||||
@ -37,7 +37,8 @@ If this is somehow possible and I did not managed to get it configured, please l
|
|||||||
|
|
||||||
To use custom themes with the [Gitea helm chart](https://gitea.com/gitea/helm-chart):
|
To use custom themes with the [Gitea helm chart](https://gitea.com/gitea/helm-chart):
|
||||||
|
|
||||||
1. Create a secret containing the CSS files (here's an example via `terraform`, plain k8s secrets will also work)
|
1. Configure the [http](https://registry.terraform.io/providers/hashicorp/http/latest/docs/data-sources/http) provider
|
||||||
|
2. Create a secret containing the CSS files (here's an example via `terraform`, plain k8s secrets will also work)
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
resource "kubernetes_secret" "gitea-themes" {
|
resource "kubernetes_secret" "gitea-themes" {
|
||||||
@ -47,16 +48,42 @@ resource "kubernetes_secret" "gitea-themes" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
"theme-github.css" = "${file("files/gitea/gitea-github-theme-light.css")}"
|
"theme-github.css" = data.http.gitea-theme-light.body
|
||||||
"theme-github-dark.css" = "${file("files/gitea/gitea-github-theme-dark.css")}"
|
"theme-github-dark.css" = data.http.gitea-theme-dark.body
|
||||||
"theme-github-auto.css" = "${file("files/gitea/gitea-github-theme-auto.css")}"
|
"theme-github-auto.css" = data.http.gitea-theme-auto.body
|
||||||
}
|
}
|
||||||
|
|
||||||
type = "Opaque"
|
type = "Opaque"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
data "http" "gitea-theme-light" {
|
||||||
|
url = "https://codeberg.org/pat-s/gitea-github-theme/raw/branch/main/theme-github.css"
|
||||||
|
|
||||||
|
request_headers = {
|
||||||
|
Accept = "application/json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
data "http" "gitea-theme-dark" {
|
||||||
|
url = "https://codeberg.org/pat-s/gitea-github-theme/raw/branch/main/theme-github-dark.css"
|
||||||
|
|
||||||
|
request_headers = {
|
||||||
|
Accept = "application/json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
data "http" "gitea-theme-auto" {
|
||||||
|
url = "https://codeberg.org/pat-s/gitea-github-theme/raw/branch/main/theme-github-auto.css"
|
||||||
|
|
||||||
|
request_headers = {
|
||||||
|
Accept = "application/json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Mount the secret via `extraVolumes` in `values.yaml`:
|
3. Mount the secret via `extraVolumes` in `values.yaml`:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
extraVolumes:
|
extraVolumes:
|
||||||
@ -65,7 +92,7 @@ extraVolumes:
|
|||||||
secretName: gitea-themes
|
secretName: gitea-themes
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Add the theme options into the config in `values.yaml`:
|
4. Add the theme options into the config in `values.yaml`:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
gitea:
|
gitea:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user