From af03e463b5707dab5cd33ad51604da1acf7bd70e Mon Sep 17 00:00:00 2001 From: tbrink Date: Mon, 4 Dec 2023 14:44:15 +0100 Subject: [PATCH] Improved Helm Chart --- charts/enviroplus-exporter/Chart.yaml | 2 +- .../templates/deployment.yaml | 23 ++++++++++++------- charts/enviroplus-exporter/values.yaml | 19 +++++++++++++++ 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/charts/enviroplus-exporter/Chart.yaml b/charts/enviroplus-exporter/Chart.yaml index 1ec110f..2d7d0b0 100644 --- a/charts/enviroplus-exporter/Chart.yaml +++ b/charts/enviroplus-exporter/Chart.yaml @@ -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.1.2 +version: 0.1.3 # 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 diff --git a/charts/enviroplus-exporter/templates/deployment.yaml b/charts/enviroplus-exporter/templates/deployment.yaml index 0a42c79..b840e3f 100644 --- a/charts/enviroplus-exporter/templates/deployment.yaml +++ b/charts/enviroplus-exporter/templates/deployment.yaml @@ -36,19 +36,26 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + command: ["python3", "enviroplus_exporter.py"] args: ["--bind=0.0.0.0", "--port=8000"] ports: - name: http containerPort: {{ .Values.service.port }} protocol: TCP - # livenessProbe: - # httpGet: - # path: / - # port: http - # readinessProbe: - # httpGet: - # path: / - # port: http + livenessProbe: + httpGet: + path: / + port: http + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 10 + readinessProbe: + httpGet: + path: / + port: http + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 10 resources: {{- toYaml .Values.resources | nindent 12 }} volumes: diff --git a/charts/enviroplus-exporter/values.yaml b/charts/enviroplus-exporter/values.yaml index b6780b3..c4ca509 100644 --- a/charts/enviroplus-exporter/values.yaml +++ b/charts/enviroplus-exporter/values.yaml @@ -11,6 +11,25 @@ image: pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "" + # Overrides the arguments that are passed to the enviroplus_exporter + # + # usage: enviroplus_exporter.py [-h] [-b ADDRESS] [-p PORT] [-f FACTOR] [-e ENVIRO] [-d DEBUG] [-i INFLUXDB] [-l LUFTDATEN] + # options: + # -h, --help show this help message and exit + # -b ADDRESS, --bind ADDRESS + # Specify alternate bind address [default: 0.0.0.0] + # -p PORT, --port PORT Specify alternate port [default: 8000] + # -f FACTOR, --factor FACTOR + # The compensation factor to get better temperature results when the Enviro+ pHAT is too close to the Raspberry Pi board + # -e ENVIRO, --enviro ENVIRO + # Device is an Enviro (not Enviro+) so don't fetch data from gas and particulate sensors as they don't exist + # -d DEBUG, --debug DEBUG + # Turns on more verbose logging, showing sensor output and post responses [default: false] + # -i INFLUXDB, --influxdb INFLUXDB + # Post sensor data to InfluxDB [default: false] + # -l LUFTDATEN, --luftdaten LUFTDATEN + # Post sensor data to Luftdaten [default: false] + #args: ["--bind=0.0.0.0", "--port=8000", ] imagePullSecrets: [] nameOverride: ""