From 3537161cdf2e5fbf5952fc84a0e7e3d30181cb5e Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Tue, 16 May 2023 20:10:10 +0200 Subject: [PATCH] Allow to configure affinity for tornjak-frontend Signed-off-by: Marco Franssen --- charts/spire/README.md | 1 + charts/spire/charts/tornjak-frontend/README.md | 1 + .../spire/charts/tornjak-frontend/templates/deployment.yaml | 4 ++++ charts/spire/charts/tornjak-frontend/values.yaml | 2 ++ 4 files changed, 8 insertions(+) diff --git a/charts/spire/README.md b/charts/spire/README.md index 9d63c91..de36056 100644 --- a/charts/spire/README.md +++ b/charts/spire/README.md @@ -365,6 +365,7 @@ Kubernetes: `>=1.21.0-0` | spire-server.upstreamAuthority.disk.secret.create | bool | `true` | If disabled requires you to create a secret with the given keys (certificate, key and optional bundle) yourself. | | spire-server.upstreamAuthority.disk.secret.data | object | `{"bundle":"","certificate":"","key":""}` | If secret creation is enabled, will create a secret with following certificate info | | spire-server.upstreamAuthority.disk.secret.name | string | `"spiffe-upstream-ca"` | If secret creation is disabled, the secret with this name will be used. | +| tornjak-frontend.affinity | object | `{}` | | | tornjak-frontend.apiServerURL | string | `"http://localhost:10000/"` | URL of the Tornjak APIs (backend) Since Tornjak Frontend runs in the browser, this URL must be accessible from the machine running a browser. | | tornjak-frontend.fullnameOverride | string | `""` | | | tornjak-frontend.image.pullPolicy | string | `"IfNotPresent"` | | diff --git a/charts/spire/charts/tornjak-frontend/README.md b/charts/spire/charts/tornjak-frontend/README.md index b8a254f..9bf6e65 100644 --- a/charts/spire/charts/tornjak-frontend/README.md +++ b/charts/spire/charts/tornjak-frontend/README.md @@ -49,6 +49,7 @@ port forwarding. See the chart NOTES output for more details. | Key | Type | Default | Description | |-----|------|---------|-------------| +| affinity | object | `{}` | | | apiServerURL | string | `"http://localhost:10000/"` | URL of the Tornjak APIs (backend) Since Tornjak Frontend runs in the browser, this URL must be accessible from the machine running a browser. | | fullnameOverride | string | `""` | | | image.pullPolicy | string | `"IfNotPresent"` | | diff --git a/charts/spire/charts/tornjak-frontend/templates/deployment.yaml b/charts/spire/charts/tornjak-frontend/templates/deployment.yaml index 8566a31..68aac56 100644 --- a/charts/spire/charts/tornjak-frontend/templates/deployment.yaml +++ b/charts/spire/charts/tornjak-frontend/templates/deployment.yaml @@ -55,6 +55,10 @@ spec: nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} volumes: - name: cache emptyDir: {} diff --git a/charts/spire/charts/tornjak-frontend/values.yaml b/charts/spire/charts/tornjak-frontend/values.yaml index e17d532..9b7a48e 100644 --- a/charts/spire/charts/tornjak-frontend/values.yaml +++ b/charts/spire/charts/tornjak-frontend/values.yaml @@ -45,6 +45,8 @@ service: nodeSelector: kubernetes.io/arch: amd64 +affinity: {} + # -- Provide minimal resources to prevent accidental crashes due to resource exhaustion # resources: # requests: