Skip to content

Commit

Permalink
Merge pull request #23 from homeylab/fix_args_nut
Browse files Browse the repository at this point in the history
fix args for runtime flags for nut
  • Loading branch information
pchang388 authored Dec 5, 2023
2 parents 658483a + c9806d0 commit d917e36
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/nut-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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: 0.0.3
version: 0.0.5

# 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
14 changes: 7 additions & 7 deletions charts/nut-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.extraRunFlags }}
{{- if or .Values.extraRunFlags .Values.webconfig_file }}
args:
{{- range $key, $value := .Values.extraRunFlags }}
{{- if $value }}
Expand Down Expand Up @@ -82,23 +82,23 @@ spec:
# port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.webconfig_file }}
- mountPath: /webconfig.yml
name: webconfig
subPath: webconfig.yml
{{- end }}
{{- end }}
{{- with .Values.volumes }}
volumes:
{{- with .Values.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.webconfig_file }}
- name: webconfig
configMap:
name: {{ include "nut-exporter.fullname" . }}
{{- end }}
configMap:
name: {{ include "nut-exporter.fullname" . }}-webconfig
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down
4 changes: 2 additions & 2 deletions charts/nut-exporter/templates/webconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "nut-exporter.fullname" . }}
name: {{ include "nut-exporter.fullname" . }}-webconfig
data:
webconfig_file: {{- .Values.webconfig_file | toYaml | indent 1 }}
webconfig_file.yml: {{- .Values.webconfig_file | toYaml | indent 1 }}
{{- end }}

0 comments on commit d917e36

Please sign in to comment.