Skip to content

Commit

Permalink
mount configmap with env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
rjonczy committed Apr 17, 2024
1 parent dd45857 commit c2b3e8a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions charts/cosmos-notifier/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "cosmos-notifier.fullname" . }}
labels:
{{- include "cosmos-notifier.labels" . | nindent 4 }}
data:
{{- range $key, $value := .Values.appConfig }}
{{ $key }}: {{ $value | quote }}
{{ end }}
3 changes: 3 additions & 0 deletions charts/cosmos-notifier/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ include "cosmos-notifier.fullname" . }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
6 changes: 6 additions & 0 deletions charts/cosmos-notifier/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
appConfig:
COSMOS_ENDPOINT: ""
SLACK_WEBHOOK_URL: https://hooks.slack.com/services/xxx/xxx/xxx
FETCH_INTERVAL: 15s
CHAIN_ID: ""

replicaCount: 1

image:
Expand Down

0 comments on commit c2b3e8a

Please sign in to comment.