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 name: livebox-exporter
description: A prometheus exporter for Livebox description: A prometheus exporter for Livebox
type: application type: application
version: 0.2.0 version: 0.3.0
appVersion: "v0.2.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 - name: ADMIN_PASSWORD
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
{{- if .Values.adminPassword.secretKeyRef }} {{- if .Values.livebox.adminPassword.secretKeyRef }}
name: {{ .Values.adminPassword.secretKeyRef.name}} name: {{ .Values.livebox.adminPassword.secretKeyRef.name}}
key: {{ .Values.adminPassword.secretKeyRef.key }} key: {{ .Values.livebox.adminPassword.secretKeyRef.key }}
{{- else }} {{- else }}
name: {{ include "livebox-exporter.fullname" . }}-admin name: {{ include "livebox-exporter.fullname" . }}-admin
key: password key: password
{{- end }} {{- 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 }} {{- with .Values.nodeSelector }}
nodeSelector: nodeSelector:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
@ -60,3 +73,9 @@ spec:
tolerations: tolerations:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- 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 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
@ -7,5 +7,5 @@ metadata:
{{- include "livebox-exporter.labels" . | nindent 4 }} {{- include "livebox-exporter.labels" . | nindent 4 }}
type: Opaque type: Opaque
data: data:
password: {{ .Values.adminPassword.value | b64enc }} password: {{ .Values.livebox.adminPassword.value | b64enc }}
{{- end }} {{- 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 replicaCount: 1
image: image:
@ -10,13 +6,20 @@ image:
# Overrides the image tag whose default is the chart appVersion. # Overrides the image tag whose default is the chart appVersion.
tag: "" tag: ""
adminPassword: livebox:
adminPassword:
secretKeyRef: {} secretKeyRef: {}
# name: "" # name: ""
# key: "" # 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: [] imagePullSecrets: []
nameOverride: "" nameOverride: ""
fullnameOverride: "" fullnameOverride: ""