From 5593fc4f7ad2584582d1c838b38dda07465344a5 Mon Sep 17 00:00:00 2001 From: fidiego Date: Wed, 3 Jun 2026 23:15:54 -0500 Subject: [PATCH] chore(dashboard-ui): overrideable tolerations and resources --- charts/dashboard-ui/Chart.yaml | 2 +- charts/dashboard-ui/README.md | 69 +++++++++---------- charts/dashboard-ui/templates/deployment.tpl | 8 +-- .../templates/lib/_ui_resources.tpl | 21 ++++++ charts/dashboard-ui/values.yaml | 2 + 5 files changed, 58 insertions(+), 44 deletions(-) create mode 100644 charts/dashboard-ui/templates/lib/_ui_resources.tpl diff --git a/charts/dashboard-ui/Chart.yaml b/charts/dashboard-ui/Chart.yaml index 96caa93..7244933 100644 --- a/charts/dashboard-ui/Chart.yaml +++ b/charts/dashboard-ui/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 name: dashboard-ui description: A helm chart for deploying the dashboard-ui type: application -version: 0.1.0 +version: 0.1.1 appVersion: "0.0.1" dependencies: [] diff --git a/charts/dashboard-ui/README.md b/charts/dashboard-ui/README.md index d1267f6..b812cf3 100644 --- a/charts/dashboard-ui/README.md +++ b/charts/dashboard-ui/README.md @@ -1,8 +1,6 @@ # dashboard-ui -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) -![AppVersion: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square) +![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square) A helm chart for deploying the dashboard-ui @@ -23,8 +21,7 @@ helm install ctl-api oci://ghcr.io/nuonco/charts/ctl-api --version ## Environment Variables -The `env` map is passed directly into the ConfigMap consumed by all API and worker pods. The following variables are -supported by the ctl-api application: +The `env` map is passed directly into the ConfigMap consumed by all API and worker pods. The following variables are supported by the ctl-api application: # dashboard-ui Environment Variables @@ -70,35 +67,35 @@ The `env` map is passed directly into the ConfigMap consumed by all dashboard-ui ## Values -| Key | Type | Default | Description | -| ------------------------------------------------ | ------ | ----------- | -------------------------------------------------------------------------------------------- | -| env | object | `{}` | Environment variables set via the ConfigMap (key/value pairs) | -| envSecrets | list | `[]` | Secrets to inject as environment variables | -| environment | string | `""` | Deployment environment name (e.g. `production`, `staging`) | -| fullnameOverride | string | `""` | Override the full release name | -| gcp | object | disabled | GCP-specific configuration. When set, GCP ingress resources are created instead of AWS ALBs. | -| image.repository | string | `""` | Container image repository | -| image.tag | string | `""` | Container image tag | -| nameOverride | string | `""` | Override the chart name | -| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | -| serviceAccount.enabled | bool | `true` | Whether to create and use a service account | -| serviceAccount.name | string | `""` | Service account name | -| ui.alb.public_domain | string | `""` | Public domain for the ALB | -| ui.alb.public_domain_certificate | string | `""` | TLS certificate ARN (AWS) for the ALB | -| ui.autoscaling.maxReplicas | int | `5` | Maximum replicas | -| ui.autoscaling.minReplicas | int | `2` | Minimum replicas | -| ui.autoscaling.targetCPUUtilizationPercentage | int | `50` | Target CPU utilization for autoscaling | -| ui.autoscaling.targetMemoryUtilizationPercentage | int | `50` | Target memory utilization for autoscaling | -| ui.liveness_probe | string | `"/livez"` | Liveness probe path | -| ui.nodeSelector | object | `{}` | Node selector for UI pods | -| ui.port | int | `4000` | UI container port | -| ui.readiness_probe | string | `"/readyz"` | Readiness probe path | -| ui.resources.limits.cpu | string | `"1000m"` | CPU limit for UI containers | -| ui.resources.limits.memory | string | `"1024Mi"` | Memory limit for UI containers | -| ui.resources.requests.cpu | string | `"500m"` | CPU request for UI containers | -| ui.resources.requests.memory | string | `"512Mi"` | Memory request for UI containers | -| ui.tolerations | list | `[]` | Tolerations for UI pods | - ---- - +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| env | object | `{}` | Environment variables set via the ConfigMap (key/value pairs) | +| envSecrets | list | `[]` | Secrets to inject as environment variables | +| environment | string | `""` | Deployment environment name (e.g. `production`, `staging`) | +| fullnameOverride | string | `""` | Override the full release name | +| gcp | object | disabled | GCP-specific configuration. When set, GCP ingress resources are created instead of AWS ALBs. | +| image.repository | string | `""` | Container image repository | +| image.tag | string | `""` | Container image tag | +| nameOverride | string | `""` | Override the chart name | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | +| serviceAccount.enabled | bool | `true` | Whether to create and use a service account | +| serviceAccount.name | string | `""` | Service account name | +| ui.alb.public_domain | string | `""` | Public domain for the ALB | +| ui.alb.public_domain_certificate | string | `""` | TLS certificate ARN (AWS) for the ALB | +| ui.autoscaling.maxReplicas | int | `5` | Maximum replicas | +| ui.autoscaling.minReplicas | int | `2` | Minimum replicas | +| ui.autoscaling.targetCPUUtilizationPercentage | int | `50` | Target CPU utilization for autoscaling | +| ui.autoscaling.targetMemoryUtilizationPercentage | int | `50` | Target memory utilization for autoscaling | +| ui.liveness_probe | string | `"/livez"` | Liveness probe path | +| ui.nodeSelector | object | `{}` | Node selector for UI pods | +| ui.port | int | `4000` | UI container port | +| ui.readiness_probe | string | `"/readyz"` | Readiness probe path | +| ui.resources | object | `{"limits":{"cpu":"1000m","memory":"1024Mi"},"requests":{"cpu":"500m","memory":"512Mi"}}` | Resources for the ui deployment. Both `requests` and `limits` are optional and fully overridable — either sub-block can be omitted entirely. | +| ui.resources.limits.cpu | string | `"1000m"` | CPU limit for UI containers | +| ui.resources.limits.memory | string | `"1024Mi"` | Memory limit for UI containers | +| ui.resources.requests.cpu | string | `"500m"` | CPU request for UI containers | +| ui.resources.requests.memory | string | `"512Mi"` | Memory request for UI containers | +| ui.tolerations | list | `[]` | Tolerations for UI pods | + +---------------------------------------------- Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) diff --git a/charts/dashboard-ui/templates/deployment.tpl b/charts/dashboard-ui/templates/deployment.tpl index a2afdf6..d17aa90 100644 --- a/charts/dashboard-ui/templates/deployment.tpl +++ b/charts/dashboard-ui/templates/deployment.tpl @@ -64,13 +64,7 @@ spec: httpGet: path: {{ .Values.ui.liveness_probe}} port: http - resources: - limits: - cpu: {{ .Values.ui.resources.limits.cpu }} - memory: {{ .Values.ui.resources.limits.memory }} - requests: - cpu: {{ .Values.ui.resources.requests.cpu }} - memory: {{ .Values.ui.resources.requests.memory }} + {{- include "common.uiResources" .Values.ui.resources | nindent 10 }} envFrom: - configMapRef: name: {{ include "common.fullname" . }} diff --git a/charts/dashboard-ui/templates/lib/_ui_resources.tpl b/charts/dashboard-ui/templates/lib/_ui_resources.tpl new file mode 100644 index 0000000..9e7afd8 --- /dev/null +++ b/charts/dashboard-ui/templates/lib/_ui_resources.tpl @@ -0,0 +1,21 @@ +{{/* +Renders the resources block for the ui deployment. + +Both `requests` and `limits` are optional — only the sub-blocks that are set +are rendered, so either can be omitted entirely. + +Usage: + {{- include "common.uiResources" .Values.ui.resources | nindent 10 }} +*/}} +{{- define "common.uiResources" -}} +{{- $resources := default (dict) . -}} +resources: +{{- with $resources.requests }} + requests: + {{- toYaml . | nindent 4 }} +{{- end }} +{{- with $resources.limits }} + limits: + {{- toYaml . | nindent 4 }} +{{- end }} +{{- end -}} diff --git a/charts/dashboard-ui/values.yaml b/charts/dashboard-ui/values.yaml index 71bd21a..9fdebce 100644 --- a/charts/dashboard-ui/values.yaml +++ b/charts/dashboard-ui/values.yaml @@ -42,6 +42,8 @@ ui: nodeSelector: {} # -- Tolerations for UI pods tolerations: [] + # -- Resources for the ui deployment. Both `requests` and `limits` are + # optional and fully overridable — either sub-block can be omitted entirely. resources: requests: # -- CPU request for UI containers