diff --git a/charts/plex-exporter/Chart.yaml b/charts/plex-exporter/Chart.yaml index 0b74ffb..859ab90 100644 --- a/charts/plex-exporter/Chart.yaml +++ b/charts/plex-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 0.2.2 description: A prometheus exporter for Plex Media Server name: plex-exporter -version: 0.0.1 +version: 0.0.2 kubeVersion: ">=1.16.0-0" keywords: - plex-exporter diff --git a/charts/plex-exporter/README.md b/charts/plex-exporter/README.md index 5cc30cf..5201aca 100644 --- a/charts/plex-exporter/README.md +++ b/charts/plex-exporter/README.md @@ -1,6 +1,6 @@ # plex-exporter -![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![AppVersion: 0.2.2](https://img.shields.io/badge/AppVersion-0.2.2-informational?style=flat-square) +![Version: 0.0.2](https://img.shields.io/badge/Version-0.0.2-informational?style=flat-square) ![AppVersion: 0.2.2](https://img.shields.io/badge/AppVersion-0.2.2-informational?style=flat-square) A prometheus exporter for Plex Media Server @@ -56,7 +56,7 @@ Specify each parameter using the `--set key=value[,key=value]` argument to `helm ```console helm install plex-exporter \ - --set plex.server="http://192.168.1.1:32400"\ + --set plex.token="000000"\ nikdoof-helm-charts/plex-exporter ``` @@ -68,7 +68,7 @@ helm install plex-exporter nikdoof-helm-charts/plex-exporter -f values.yaml ## Custom configuration -N/A +Your Plex token can either be passed as a value in values.yml, or you can provide a environment variable of `PLEX_TOKEN` or `TOKEN` by a method of your choice. ## Values @@ -87,7 +87,9 @@ N/A | metrics.serviceMonitor.interval | string | `"1m"` | | | metrics.serviceMonitor.labels | object | `{}` | | | metrics.serviceMonitor.scrapeTimeout | string | `"30s"` | | -| plex.server | string | `nil` | Server address of your Plex server, as a URL, including the port | +| plex.autodiscover | bool | `true` | Enable autodiscover using plex.tv | +| plex.server | string | `nil` | Manual server address of your Plex server, as a URL, including the port | +| plex.token | string | `nil` | Authentication token to connect to your Plex instance | | service | object | See values.yaml | Configures service settings for the chart. | ## Changelog diff --git a/charts/plex-exporter/README.md.gotmpl b/charts/plex-exporter/README.md.gotmpl index ecff32e..a84816a 100644 --- a/charts/plex-exporter/README.md.gotmpl +++ b/charts/plex-exporter/README.md.gotmpl @@ -76,7 +76,7 @@ Specify each parameter using the `--set key=value[,key=value]` argument to `helm ```console helm install {{ template "chart.name" . }} \ - --set plex.server="http://192.168.1.1:32400"\ + --set plex.token="000000"\ {{ template "custom.helm.path" . }} ``` {{- end -}} diff --git a/charts/plex-exporter/README_CHANGELOG.md.gotmpl b/charts/plex-exporter/README_CHANGELOG.md.gotmpl index 01fd766..af44a85 100644 --- a/charts/plex-exporter/README_CHANGELOG.md.gotmpl +++ b/charts/plex-exporter/README_CHANGELOG.md.gotmpl @@ -9,6 +9,20 @@ All notable changes to this application Helm chart will be documented in this fi The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +### [0.0.2] + +#### Added + +- Support for auto discovery + +#### Changed + +- N/A + +#### Removed + +- N/A + ### [0.0.1] #### Added diff --git a/charts/plex-exporter/README_CONFIG.md.gotmpl b/charts/plex-exporter/README_CONFIG.md.gotmpl index e93d80b..3a4a0cd 100644 --- a/charts/plex-exporter/README_CONFIG.md.gotmpl +++ b/charts/plex-exporter/README_CONFIG.md.gotmpl @@ -5,5 +5,5 @@ {{- define "custom.custom.configuration" -}} {{ template "custom.custom.configuration.header" . }} -N/A +Your Plex token can either be passed as a value in values.yml, or you can provide a environment variable of `PLEX_TOKEN` or `TOKEN` by a method of your choice. {{- end -}} diff --git a/charts/plex-exporter/ci/test-values.yaml b/charts/plex-exporter/ci/autodiscovery.yml similarity index 55% rename from charts/plex-exporter/ci/test-values.yaml rename to charts/plex-exporter/ci/autodiscovery.yml index 5bf54a3..42c7531 100644 --- a/charts/plex-exporter/ci/test-values.yaml +++ b/charts/plex-exporter/ci/autodiscovery.yml @@ -1,3 +1,4 @@ --- plex: server: test + token: a0a0a0a0a0 diff --git a/charts/plex-exporter/ci/manual.yaml b/charts/plex-exporter/ci/manual.yaml new file mode 100644 index 0000000..ab76007 --- /dev/null +++ b/charts/plex-exporter/ci/manual.yaml @@ -0,0 +1,5 @@ +--- +plex: + autodiscovery: false + server: http://test:32400 + token: a0a0a0a0a0 diff --git a/charts/plex-exporter/templates/common.yaml b/charts/plex-exporter/templates/common.yaml index 190a982..5744596 100644 --- a/charts/plex-exporter/templates/common.yaml +++ b/charts/plex-exporter/templates/common.yaml @@ -4,8 +4,16 @@ {{/* Append the hardcoded settings */}} {{- define "plex-exporter.harcodedValues" -}} args: + {{- if .Values.plex.autodiscover -}} + - "--auto-discover" + {{- else -}} - "--plex-server" - "{{ .Values.plex.server }}" + {{- end -}} + {{- if .Values.plex.token -}} + - "--token" + - "{{ .Values.plex.token }}" + {{- end -}} {{- end -}} {{- $_ := mergeOverwrite .Values (include "plex-exporter.harcodedValues" . | fromYaml) -}} diff --git a/charts/plex-exporter/values.yaml b/charts/plex-exporter/values.yaml index a3b2224..3b1281c 100644 --- a/charts/plex-exporter/values.yaml +++ b/charts/plex-exporter/values.yaml @@ -36,8 +36,12 @@ ingress: enabled: false plex: - # -- Server address of your Plex server, as a URL, including the port + # -- Manual server address of your Plex server, as a URL, including the port server: + # -- Authentication token to connect to your Plex instance + token: + # -- Enable autodiscover using plex.tv + autodiscover: true metrics: # -- Enable and configure a Prometheus serviceMonitor for the chart under this key.