Skip to content

Commit

Permalink
add configmap for application settings (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasehlert authored Aug 15, 2024
1 parent e356b74 commit 8730875
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/tibiadata-api-go/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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: 1.1.3
version: 1.2.0

# 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
Expand Down
12 changes: 12 additions & 0 deletions charts/tibiadata-api-go/templates/configmaps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.configMap.create }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "tibiadata-api-go.fullname" . }}
labels:
{{- include "tibiadata-api-go.labels" . | nindent 4 }}
data:
{{- range $key, $value := .Values.configMap.settings }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/tibiadata-api-go/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ spec:
{{- toYaml .Values.resources | nindent 12 }}
env:
{{- toYaml .Values.env | nindent 12 }}
envFrom:
- configMapRef:
name: {{ include "tibiadata-api-go.fullname" . }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
13 changes: 13 additions & 0 deletions charts/tibiadata-api-go/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name: ""

configMap:
create: true
settings:
# generic settings
debug_mode: false
# Gin-related settings
gin_mode: release
gin_trusted_proxies: ""
# TibiaData-related settings
tibiadata_edition: open-source
tibiadata_host: undefined
tibiadata_restriction_mode: false

podAnnotations: {}

podSecurityContext:
Expand Down

0 comments on commit 8730875

Please sign in to comment.