Skip to content

Commit 13c5ef8

Browse files
committed
refactor: move probes and resources to values.yaml
Move livenessProbe, readinessProbe, and resources from hardcoded values in deployment.yaml to configurable values.yaml.
1 parent 8acf5c5 commit 13c5ef8

File tree

4 files changed

+61
-23
lines changed

4 files changed

+61
-23
lines changed

charts/incubator/hyperswitch-card-vault/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.1.5
18+
version: 0.1.6
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/incubator/hyperswitch-card-vault/README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# hyperswitch-card-vault
22

3-
![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)
3+
![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)
44

55
"application"
66
A Helm chart for creating Hyperswitch Card Vault
@@ -175,8 +175,28 @@ external:
175175
| server.host | string | `"0.0.0.0"` | |
176176
| server.image | string | `"juspaydotin/hyperswitch-card-vault:v0.6.5-dev"` | |
177177
| server.imageRegistry | string | `"docker.juspay.io"` | |
178+
| server.livenessProbe.failureThreshold | int | `3` | |
179+
| server.livenessProbe.httpGet.path | string | `"/health"` | |
180+
| server.livenessProbe.httpGet.port | int | `8080` | |
181+
| server.livenessProbe.httpGet.scheme | string | `"HTTP"` | |
182+
| server.livenessProbe.initialDelaySeconds | int | `5` | |
183+
| server.livenessProbe.periodSeconds | int | `30` | |
184+
| server.livenessProbe.successThreshold | int | `1` | |
185+
| server.livenessProbe.timeoutSeconds | int | `1` | |
178186
| server.pod.annotations | object | `{}` | |
179187
| server.port | string | `"8080"` | |
188+
| server.readinessProbe.failureThreshold | int | `3` | |
189+
| server.readinessProbe.httpGet.path | string | `"/health"` | |
190+
| server.readinessProbe.httpGet.port | int | `8080` | |
191+
| server.readinessProbe.httpGet.scheme | string | `"HTTP"` | |
192+
| server.readinessProbe.initialDelaySeconds | int | `5` | |
193+
| server.readinessProbe.periodSeconds | int | `50` | |
194+
| server.readinessProbe.successThreshold | int | `1` | |
195+
| server.readinessProbe.timeoutSeconds | int | `1` | |
196+
| server.resources.limits.cpu | string | `"500m"` | |
197+
| server.resources.limits.memory | string | `"700Mi"` | |
198+
| server.resources.requests.cpu | string | `"100m"` | |
199+
| server.resources.requests.memory | string | `"200Mi"` | |
180200
| server.vault.url | string | `"http://127.0.0.1:8200"` | |
181201
| server.version | string | `"v0.6.5"` | |
182202
| tenant_secrets.public.master_key | string | `"8283d68fdbd89a78aef9bed8285ed1cd9310012f660eefbad865f20a3f3dd9498f06147da6a7d9b84677cafca95024990b3d2296fbafc55e10dd76df"` | |

charts/incubator/hyperswitch-card-vault/templates/deployment.yaml

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -162,35 +162,23 @@ spec:
162162
- /bin/bash
163163
- -c
164164
- pkill -15 node
165+
{{- with .Values.server.livenessProbe }}
165166
livenessProbe:
166-
failureThreshold: 3
167-
httpGet:
168-
path: /health
169-
port: 8080
170-
scheme: HTTP
171-
initialDelaySeconds: 5
172-
periodSeconds: 30
173-
successThreshold: 1
174-
timeoutSeconds: 1
167+
{{- toYaml . | nindent 12 }}
168+
{{- end }}
175169
name: tartarus
176170
ports:
177171
- containerPort: 8080
178172
name: http
179173
protocol: TCP
174+
{{- with .Values.server.readinessProbe }}
180175
readinessProbe:
181-
failureThreshold: 3
182-
httpGet:
183-
path: /health
184-
port: 8080
185-
scheme: HTTP
186-
initialDelaySeconds: 5
187-
periodSeconds: 50
188-
successThreshold: 1
189-
timeoutSeconds: 1
176+
{{- toYaml . | nindent 12 }}
177+
{{- end }}
178+
{{- with .Values.server.resources }}
190179
resources:
191-
requests:
192-
cpu: 100m
193-
memory: 200Mi
180+
{{- toYaml . | nindent 12 }}
181+
{{- end }}
194182

195183
securityContext:
196184
privileged: false

charts/incubator/hyperswitch-card-vault/values.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,36 @@ server:
6464
vault:
6565
url: "http://127.0.0.1:8200"
6666

67+
livenessProbe:
68+
failureThreshold: 3
69+
httpGet:
70+
path: /health
71+
port: 8080
72+
scheme: HTTP
73+
initialDelaySeconds: 5
74+
periodSeconds: 30
75+
successThreshold: 1
76+
timeoutSeconds: 1
77+
78+
readinessProbe:
79+
failureThreshold: 3
80+
httpGet:
81+
path: /health
82+
port: 8080
83+
scheme: HTTP
84+
initialDelaySeconds: 5
85+
periodSeconds: 50
86+
successThreshold: 1
87+
timeoutSeconds: 1
88+
89+
resources:
90+
requests:
91+
cpu: 100m
92+
memory: 200Mi
93+
limits:
94+
cpu: 500m
95+
memory: 700Mi
96+
6797
# Secrets configuration
6898
secrets:
6999
# Core secrets

0 commit comments

Comments
 (0)