Skip to content
This repository was archived by the owner on Oct 3, 2020. It is now read-only.

Add support for passing environment variables #101

Merged
merged 1 commit into from
Jul 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chart/kube-resource-report/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v1
appVersion: "0.14.1"
description: Report Kubernetes cluster and pod resource requests vs usage and generate static HTML
name: kube-resource-report
version: 0.2.1
version: 0.2.2
home: https://github.com/hjacobs/kube-resource-report.git
8 changes: 8 additions & 0 deletions chart/kube-resource-report/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ spec:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
# environment variables
{{- if .Values.env }}
env:
{{- end }}
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: {{ tpl $value $ | quote }}
{{- end }}
args:
- --update-interval-minutes={{ .Values.updateInterval }}
{{- if .Values.addtionalCostPerCluster }}
Expand Down
6 changes: 6 additions & 0 deletions chart/kube-resource-report/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,9 @@ nodeSelector: {}
tolerations: []

affinity: {}

# e.g.
# env:
# NODE_LABEL_SPOT: "a.com/spot"
# OBJECT_LABEL_APPLICATION: "app,chart"
env: {}