diff --git a/timoni/podinfo/README.md b/timoni/podinfo/README.md index 804cf5ff1..92294baee 100644 --- a/timoni/podinfo/README.md +++ b/timoni/podinfo/README.md @@ -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 | diff --git a/timoni/podinfo/templates/config.cue b/timoni/podinfo/templates/config.cue index c6921403c..1260a9f1f 100644 --- a/timoni/podinfo/templates/config.cue +++ b/timoni/podinfo/templates/config.cue @@ -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 diff --git a/timoni/podinfo/templates/deployment.cue b/timoni/podinfo/templates/deployment.cue index 70cd29762..00b56aca0 100644 --- a/timoni/podinfo/templates/deployment.cue +++ b/timoni/podinfo/templates/deployment.cue @@ -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: {} + }, + ] } } } diff --git a/timoni/podinfo/test_values.cue b/timoni/podinfo/test_values.cue index f5f8288df..f144eab15 100644 --- a/timoni/podinfo/test_values.cue +++ b/timoni/podinfo/test_values.cue @@ -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"