Skip to content

Commit d3cf540

Browse files
committed
refactor(hyperswitch-card-vault): move locker log console config to values.yaml
- Move LOCKER__LOG__CONSOLE__ENABLED, LOCKER__LOG__CONSOLE__LEVEL, and LOCKER__LOG__CONSOLE__LOG_FORMAT from hardcoded values to values.yaml - Add helper functions in _helpers.tpl using include pattern: - locker.log.console.enabled - locker.log.console.level - locker.log.console.log_format - Update deployment.yaml to use include functions instead of hardcoded values - Add server.log.console configuration section to values.yaml with defaults
1 parent a155092 commit d3cf540

5 files changed

Lines changed: 42 additions & 5 deletions

File tree

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: 4 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,6 +175,9 @@ 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.log.console.enabled | bool | `true` | Enable console logging |
179+
| server.log.console.level | string | `"DEBUG"` | Log level for console logs (ERROR, WARN, INFO, DEBUG) |
180+
| server.log.console.log_format | string | `"default"` | Log format for console logs (default or json) |
178181
| server.pod.annotations | object | `{}` | |
179182
| server.port | string | `"8080"` | |
180183
| server.vault.url | string | `"http://127.0.0.1:8200"` | |

charts/incubator/hyperswitch-card-vault/templates/_helpers.tpl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,31 @@ LOCKER server port
149149
{{- default "8080" .Values.server.port | quote }}
150150
{{- end }}
151151

152+
{{/*
153+
LOCKER log console enabled
154+
*/}}
155+
{{- define "locker.log.console.enabled" -}}
156+
{{- if hasKey .Values.server.log.console "enabled" -}}
157+
{{- .Values.server.log.console.enabled | toString | lower | quote }}
158+
{{- else -}}
159+
{{- "true" | quote }}
160+
{{- end -}}
161+
{{- end }}
162+
163+
{{/*
164+
LOCKER log console level
165+
*/}}
166+
{{- define "locker.log.console.level" -}}
167+
{{- default "DEBUG" .Values.server.log.console.level | quote }}
168+
{{- end }}
169+
170+
{{/*
171+
LOCKER log console format
172+
*/}}
173+
{{- define "locker.log.console.log_format" -}}
174+
{{- default "default" .Values.server.log.console.log_format | quote }}
175+
{{- end }}
176+
152177
{{- define "locker.externalKeyManager.url" -}}
153178
{{- default "http://localhost:5000" .Values.server.externalKeyManager.url -}}
154179
{{- end -}}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ spec:
4343
containers:
4444
- env:
4545
- name: LOCKER__LOG__CONSOLE__ENABLED
46-
value: "true"
46+
value: {{ include "locker.log.console.enabled" . }}
4747
- name: LOCKER__LOG__CONSOLE__LEVEL
48-
value: DEBUG
48+
value: {{ include "locker.log.console.level" . }}
4949
- name: LOCKER__LOG__CONSOLE__LOG_FORMAT
50-
value: default
50+
value: {{ include "locker.log.console.log_format" . }}
5151
- name: LOCKER__SERVER__HOST
5252
value: {{ include "locker.server.host" . }}
5353
- name: LOCKER__SERVER__PORT

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

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

67+
log:
68+
console:
69+
# -- Enable console logging
70+
enabled: true
71+
# -- Log level for console logs (ERROR, WARN, INFO, DEBUG)
72+
level: DEBUG
73+
# -- Log format for console logs (default or json)
74+
log_format: default
75+
6776
# Secrets configuration
6877
secrets:
6978
# Core secrets

0 commit comments

Comments
 (0)