From a11cfc99ac23854120f3815127e92e11a3561de3 Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Fri, 12 May 2023 19:52:38 +0200 Subject: [PATCH] Allow to define the resources for tornjak backend Signed-off-by: Marco Franssen --- charts/spire/charts/spire-server/README.md | 1 + .../charts/spire-server/templates/statefulset.yaml | 2 ++ charts/spire/charts/spire-server/values.yaml | 11 +++++++++++ 3 files changed, 14 insertions(+) diff --git a/charts/spire/charts/spire-server/README.md b/charts/spire/charts/spire-server/README.md index 7c051c3..60f3158 100644 --- a/charts/spire/charts/spire-server/README.md +++ b/charts/spire/charts/spire-server/README.md @@ -110,6 +110,7 @@ A Helm chart to install the SPIRE server. | tornjak.enabled | bool | `false` | Deploys Tornjak API (backend) | | tornjak.image | object | `{"pullPolicy":"IfNotPresent","registry":"ghcr.io","repository":"spiffe/tornjak-backend","version":"v1.2.0"}` | Tornjak API image | | tornjak.image.version | string | `"v1.2.0"` | Overrides the image tag whose default is the chart appVersion. | +| tornjak.resources | object | `{}` | | | tornjak.service.annotations | object | `{}` | | | tornjak.service.port | int | `10000` | | | tornjak.service.type | string | `"ClusterIP"` | | diff --git a/charts/spire/charts/spire-server/templates/statefulset.yaml b/charts/spire/charts/spire-server/templates/statefulset.yaml index 3a1322b..dc67dab 100644 --- a/charts/spire/charts/spire-server/templates/statefulset.yaml +++ b/charts/spire/charts/spire-server/templates/statefulset.yaml @@ -182,6 +182,8 @@ spec: - name: tornjak containerPort: 10000 protocol: TCP + resources: + {{- toYaml .Values.tornjak.resources | nindent 12 }} volumeMounts: - name: {{ include "spire-tornjak.config" . }} mountPath: /run/spire/tornjak-config diff --git a/charts/spire/charts/spire-server/values.yaml b/charts/spire/charts/spire-server/values.yaml index 904dcc1..96fc425 100644 --- a/charts/spire/charts/spire-server/values.yaml +++ b/charts/spire/charts/spire-server/values.yaml @@ -276,3 +276,14 @@ tornjak: dataStore: driver: "sqlite3" file: "/run/spire/data/tornjak.sqlite3" + resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi