Update chart

This commit is contained in:
Tomy Guichard 2023-06-03 11:21:01 +02:00
parent 8a3aa59272
commit e2089b202c
5 changed files with 48 additions and 16 deletions

View file

@ -2,5 +2,5 @@ apiVersion: v2
name: livebox-exporter
description: A prometheus exporter for Livebox
type: application
version: 0.2.0
appVersion: "v0.2.0"
version: 0.3.0
appVersion: "v0.3.0"

View file

@ -0,0 +1,10 @@
{{- if .Values.livebox.caCert }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "livebox-exporter.fullname" . }}
labels:
{{- include "livebox-exporter.labels" . | nindent 4 }}
data:
ca.crt: {{ toYaml .Values.livebox.caCert | indent 2 }}
{{- end }}

View file

@ -41,13 +41,26 @@ spec:
- name: ADMIN_PASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.adminPassword.secretKeyRef }}
name: {{ .Values.adminPassword.secretKeyRef.name}}
key: {{ .Values.adminPassword.secretKeyRef.key }}
{{- if .Values.livebox.adminPassword.secretKeyRef }}
name: {{ .Values.livebox.adminPassword.secretKeyRef.name}}
key: {{ .Values.livebox.adminPassword.secretKeyRef.key }}
{{- else }}
name: {{ include "livebox-exporter.fullname" . }}-admin
key: password
{{- end }}
{{- with .Values.livebox.address }}
- name: LIVEBOX_ADDRESS
value: {{ . }}
{{- end }}
{{- if .Values.livebox.caCert }}
- name: LIVEBOX_CACERT
value: /etc/livebox/certs/ca.crt
{{- end }}
{{- if .Values.livebox.caCert }}
volumeMounts:
- name: livebox-crt
mountPath: /etc/livebox/certs
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
@ -60,3 +73,9 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.livebox.caCert }}
volumes:
- name: livebox-crt
configMap:
name: {{ include "livebox-exporter.fullname" . }}
{{- end }}

View file

@ -1,4 +1,4 @@
{{- if not .Values.adminPassword.secretKeyRef }}
{{- if not .Values.livebox.adminPassword.secretKeyRef }}
apiVersion: v1
kind: Secret
metadata:
@ -7,5 +7,5 @@ metadata:
{{- include "livebox-exporter.labels" . | nindent 4 }}
type: Opaque
data:
password: {{ .Values.adminPassword.value | b64enc }}
password: {{ .Values.livebox.adminPassword.value | b64enc }}
{{- end }}

View file

@ -1,7 +1,3 @@
# Default values for livebox-exporter.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
@ -10,12 +6,19 @@ image:
# Overrides the image tag whose default is the chart appVersion.
tag: ""
adminPassword:
secretKeyRef: {}
# name: ""
# key: ""
livebox:
adminPassword:
secretKeyRef: {}
# name: ""
# key: ""
value: "changeme"
value: "changeme"
# Address of the Livebox. If empty the exporter will use its own default value.
address: ""
# CA cert of the Livebox.
caCert: ""
imagePullSecrets: []
nameOverride: ""