mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-08-19 04:06:27 +00:00
Add UI configuration
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
@@ -19,7 +19,7 @@ timoni -n default apply podinfo oci://ghcr.io/stefanprodan/modules/podinfo
|
||||
To install a specific module version:
|
||||
|
||||
```shell
|
||||
timoni -n default apply podinfo oci://ghcr.io/stefanprodan/modules/podinfo -v 6.3.5
|
||||
timoni -n default apply podinfo oci://ghcr.io/stefanprodan/modules/podinfo -v 6.5.0
|
||||
```
|
||||
|
||||
To change the [default configuration](#configuration),
|
||||
@@ -129,3 +129,11 @@ values: {
|
||||
|----------------------|----------|---------|---------------------------------------------------------|
|
||||
| `caching: enabled:` | `bool` | `false` | Enable Redis caching |
|
||||
| `caching: redisURL:` | `string` | `""` | Redis URL in the format `tcp://:[password]@host[:port]` |
|
||||
|
||||
### UI values
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
|----------------|----------|-----------|------------------|
|
||||
| `ui: color:` | `string` | `#34577c` | Background color |
|
||||
| `ui: message:` | `string` | `""` | Greeting message |
|
||||
| `ui: backend:` | `string` | `""` | Backend URL |
|
||||
|
||||
@@ -7,6 +7,13 @@ import (
|
||||
|
||||
// Config defines the schema and defaults for the Instance values.
|
||||
#Config: {
|
||||
// UI setting
|
||||
ui: {
|
||||
color: *"#34577c" | string
|
||||
message?: string
|
||||
backend?: string
|
||||
}
|
||||
|
||||
// Runtime version info
|
||||
moduleVersion!: string
|
||||
kubeVersion!: string
|
||||
|
||||
@@ -76,6 +76,24 @@ import (
|
||||
if _config.securityContext != _|_ {
|
||||
securityContext: _config.securityContext
|
||||
}
|
||||
env: [
|
||||
{
|
||||
name: "PODINFO_UI_COLOR"
|
||||
value: _config.ui.color
|
||||
},
|
||||
if _config.ui.message != _|_ {
|
||||
{
|
||||
name: "PODINFO_UI_MESSAGE"
|
||||
value: _config.ui.message
|
||||
}
|
||||
},
|
||||
if _config.ui.backend != _|_ {
|
||||
{
|
||||
name: "PODINFO_BACKEND_URL"
|
||||
value: _config.ui.backend
|
||||
}
|
||||
},
|
||||
]
|
||||
command: [
|
||||
"./podinfo",
|
||||
"--level=info",
|
||||
@@ -85,6 +103,12 @@ import (
|
||||
"--cache-server=\(_config.caching.redisURL)"
|
||||
},
|
||||
]
|
||||
volumeMounts: [
|
||||
{
|
||||
name: "data"
|
||||
mountPath: "/data"
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
if _config.podSecurityContext != _|_ {
|
||||
@@ -102,6 +126,12 @@ import (
|
||||
if _config.imagePullSecrets != _|_ {
|
||||
imagePullSecrets: _config.imagePullSecrets
|
||||
}
|
||||
volumes: [
|
||||
{
|
||||
name: "data"
|
||||
emptyDir: {}
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
package main
|
||||
|
||||
values: {
|
||||
ui: backend: "http://backend.default.svc.cluster.local/echo"
|
||||
|
||||
metadata: {
|
||||
labels: "app.kubernetes.io/part-of": "podinfo"
|
||||
annotations: "app.kubernetes.io/team": "dev"
|
||||
|
||||
Reference in New Issue
Block a user