Skip to content

Commit 8730875

Browse files
authored
add configmap for application settings (#19)
1 parent e356b74 commit 8730875

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
lines changed

charts/tibiadata-api-go/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type: application
2424
# This is the chart version. This version number should be incremented each time you make changes
2525
# to the chart and its templates, including the app version.
2626
# Versions are expected to follow Semantic Versioning (https://semver.org/)
27-
version: 1.1.3
27+
version: 1.2.0
2828

2929
# This is the version number of the application being deployed. This version number should be
3030
# incremented each time you make changes to the application. Versions are not expected to
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- if .Values.configMap.create }}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ include "tibiadata-api-go.fullname" . }}
6+
labels:
7+
{{- include "tibiadata-api-go.labels" . | nindent 4 }}
8+
data:
9+
{{- range $key, $value := .Values.configMap.settings }}
10+
{{ $key }}: {{ $value | quote }}
11+
{{- end }}
12+
{{- end }}

charts/tibiadata-api-go/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ spec:
4949
{{- toYaml .Values.resources | nindent 12 }}
5050
env:
5151
{{- toYaml .Values.env | nindent 12 }}
52+
envFrom:
53+
- configMapRef:
54+
name: {{ include "tibiadata-api-go.fullname" . }}
5255
{{- with .Values.nodeSelector }}
5356
nodeSelector:
5457
{{- toYaml . | nindent 8 }}

charts/tibiadata-api-go/values.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ serviceAccount:
2424
# If not set and create is true, a name is generated using the fullname template
2525
name: ""
2626

27+
configMap:
28+
create: true
29+
settings:
30+
# generic settings
31+
debug_mode: false
32+
# Gin-related settings
33+
gin_mode: release
34+
gin_trusted_proxies: ""
35+
# TibiaData-related settings
36+
tibiadata_edition: open-source
37+
tibiadata_host: undefined
38+
tibiadata_restriction_mode: false
39+
2740
podAnnotations: {}
2841

2942
podSecurityContext:

0 commit comments

Comments
 (0)