From a08a780aff564a32d0b4edbce949f6fe931b6590 Mon Sep 17 00:00:00 2001 From: Dmytro Matviichuk Date: Wed, 10 Dec 2025 14:12:05 +0100 Subject: [PATCH] refactor: move probes and resources to values.yaml Move livenessProbe, readinessProbe, and resources from hardcoded values in deployment.yaml to configurable values.yaml. --- .../hyperswitch-card-vault/Chart.yaml | 2 +- .../hyperswitch-card-vault/README.md | 22 +++++++++++++- .../templates/deployment.yaml | 30 ++++++------------- .../hyperswitch-card-vault/values.yaml | 30 +++++++++++++++++++ 4 files changed, 61 insertions(+), 23 deletions(-) diff --git a/charts/incubator/hyperswitch-card-vault/Chart.yaml b/charts/incubator/hyperswitch-card-vault/Chart.yaml index 78b8a04e..696be77a 100644 --- a/charts/incubator/hyperswitch-card-vault/Chart.yaml +++ b/charts/incubator/hyperswitch-card-vault/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.5 +version: 0.1.6 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/incubator/hyperswitch-card-vault/README.md b/charts/incubator/hyperswitch-card-vault/README.md index 9772b279..87d4279d 100644 --- a/charts/incubator/hyperswitch-card-vault/README.md +++ b/charts/incubator/hyperswitch-card-vault/README.md @@ -1,6 +1,6 @@ # hyperswitch-card-vault -![Version: 0.1.5](https://img.shields.io/badge/Version-0.1.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) +![Version: 0.1.6](https://img.shields.io/badge/Version-0.1.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) "application" A Helm chart for creating Hyperswitch Card Vault @@ -175,8 +175,28 @@ external: | server.host | string | `"0.0.0.0"` | | | server.image | string | `"juspaydotin/hyperswitch-card-vault:v0.6.5-dev"` | | | server.imageRegistry | string | `"docker.juspay.io"` | | +| server.livenessProbe.failureThreshold | int | `3` | | +| server.livenessProbe.httpGet.path | string | `"/health"` | | +| server.livenessProbe.httpGet.port | int | `8080` | | +| server.livenessProbe.httpGet.scheme | string | `"HTTP"` | | +| server.livenessProbe.initialDelaySeconds | int | `5` | | +| server.livenessProbe.periodSeconds | int | `30` | | +| server.livenessProbe.successThreshold | int | `1` | | +| server.livenessProbe.timeoutSeconds | int | `1` | | | server.pod.annotations | object | `{}` | | | server.port | string | `"8080"` | | +| server.readinessProbe.failureThreshold | int | `3` | | +| server.readinessProbe.httpGet.path | string | `"/health"` | | +| server.readinessProbe.httpGet.port | int | `8080` | | +| server.readinessProbe.httpGet.scheme | string | `"HTTP"` | | +| server.readinessProbe.initialDelaySeconds | int | `5` | | +| server.readinessProbe.periodSeconds | int | `50` | | +| server.readinessProbe.successThreshold | int | `1` | | +| server.readinessProbe.timeoutSeconds | int | `1` | | +| server.resources.limits.cpu | string | `"500m"` | | +| server.resources.limits.memory | string | `"700Mi"` | | +| server.resources.requests.cpu | string | `"100m"` | | +| server.resources.requests.memory | string | `"200Mi"` | | | server.vault.url | string | `"http://127.0.0.1:8200"` | | | server.version | string | `"v0.6.5"` | | | tenant_secrets.public.master_key | string | `"8283d68fdbd89a78aef9bed8285ed1cd9310012f660eefbad865f20a3f3dd9498f06147da6a7d9b84677cafca95024990b3d2296fbafc55e10dd76df"` | | diff --git a/charts/incubator/hyperswitch-card-vault/templates/deployment.yaml b/charts/incubator/hyperswitch-card-vault/templates/deployment.yaml index 5b990087..12ba8fc5 100644 --- a/charts/incubator/hyperswitch-card-vault/templates/deployment.yaml +++ b/charts/incubator/hyperswitch-card-vault/templates/deployment.yaml @@ -162,35 +162,23 @@ spec: - /bin/bash - -c - pkill -15 node + {{- with .Values.server.livenessProbe }} livenessProbe: - failureThreshold: 3 - httpGet: - path: /health - port: 8080 - scheme: HTTP - initialDelaySeconds: 5 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 1 + {{- toYaml . | nindent 12 }} + {{- end }} name: tartarus ports: - containerPort: 8080 name: http protocol: TCP + {{- with .Values.server.readinessProbe }} readinessProbe: - failureThreshold: 3 - httpGet: - path: /health - port: 8080 - scheme: HTTP - initialDelaySeconds: 5 - periodSeconds: 50 - successThreshold: 1 - timeoutSeconds: 1 + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.server.resources }} resources: - requests: - cpu: 100m - memory: 200Mi + {{- toYaml . | nindent 12 }} + {{- end }} securityContext: privileged: false diff --git a/charts/incubator/hyperswitch-card-vault/values.yaml b/charts/incubator/hyperswitch-card-vault/values.yaml index d03379de..4b7f16b4 100644 --- a/charts/incubator/hyperswitch-card-vault/values.yaml +++ b/charts/incubator/hyperswitch-card-vault/values.yaml @@ -64,6 +64,36 @@ server: vault: url: "http://127.0.0.1:8200" + livenessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: 8080 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 1 + + readinessProbe: + failureThreshold: 3 + httpGet: + path: /health + port: 8080 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 50 + successThreshold: 1 + timeoutSeconds: 1 + + resources: + requests: + cpu: 100m + memory: 200Mi + limits: + cpu: 500m + memory: 700Mi + # Secrets configuration secrets: # Core secrets