[radarr] Add exportarr for Radarr (#199)

* first attempt at adding exportarr

* add appVersion back
This commit is contained in:
Devin Buhl 2020-04-14 09:04:58 -04:00 committed by GitHub
parent 99e23213ff
commit 9bef0aac5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 166 additions and 55 deletions

View File

@ -1,8 +1,8 @@
apiVersion: v1 apiVersion: v1
appVersion: amd64-v0.2.0.1344-ls17 appVersion: v0.2.0.1480-ls58
description: Radarr is a movie downloading client description: Radarr is a movie downloading client
name: radarr name: radarr
version: 3.1.0 version: 3.2.0
keywords: keywords:
- radarr - radarr
- usenet - usenet

View File

@ -31,58 +31,71 @@ The command removes all the Kubernetes components associated with the chart and
The following tables lists the configurable parameters of the Sentry chart and their default values. The following tables lists the configurable parameters of the Sentry chart and their default values.
| Parameter | Description | Default | | Parameter | Description | Default |
|----------------------------|-------------------------------------|---------------------------------------------------------| |---------------------------------------------|----------------------------------------------------------------------------------------------|------------------------------------------------|
| `image.repository` | Image repository | `linuxserver/radarr` | | `image.repository` | Image repository | `linuxserver/radarr` |
| `image.tag` | Image tag. Possible values listed [here](https://hub.docker.com/r/linuxserver/radarr/tags/).| `amd64-v0.2.0.1344-ls17`| | `image.tag` | Image tag. Possible values listed [here](https://hub.docker.com/r/linuxserver/radarr/tags/). | `v0.2.0.1480-ls58` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` | | `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `strategyType` | Specifies the strategy used to replace old Pods by new ones | `Recreate` | | `strategyType` | Specifies the strategy used to replace old Pods by new ones | `Recreate` |
| `timezone` | Timezone the radarr instance should run as, e.g. 'America/New_York' | `UTC` | | `timezone` | Timezone the instance should run as, e.g. 'America/New_York' | `UTC` |
| `puid` | process userID the radarr instance should run as | `1001` | | `puid` | process userID the instance should run as | `1001` |
| `pgid` | process groupID the radarr instance should run as | `1001` | | `pgid` | process groupID the instance should run as | `1001` |
| `probes.liveness.initialDelaySeconds` | Specify liveness `initialDelaySeconds` parameter for the deployment | `60` | | `exportarr.enabled` | Enable Prometheus monitoring with [Exportarr](https://github.com/onedr0p/exportarr) | `false` |
| `probes.liveness.failureThreshold` | Specify liveness `failureThreshold` parameter for the deployment | `5` | | `exportarr.image.repository` | Exportarr image repository | `onedr0p/exportarr` |
| `probes.liveness.timeoutSeconds` | Specify liveness `timeoutSeconds` parameter for the deployment | `10` | | `exportarr.image.tag` | Exportarr image tag | `v0.3.0` |
| `probes.readiness.initialDelaySeconds` | Specify readiness `initialDelaySeconds` parameter for the deployment | `60` | | `exportarr.image.pullPolicy` | Exportarr image pullPolicy | `IfNotPresent` |
| `probes.readiness.failureThreshold` | Specify readiness `failureThreshold` parameter for the deployment | `5` | | `exportarr.port` | Prometheus scrape port | `9708` |
| `probes.readiness.timeoutSeconds` | Specify readiness `timeoutSeconds` parameter for the deployment | `10` | | `exportarr.url` | Radarr's URL | `http://radarr.default.svc.cluster.local:7878` |
| `Service.type` | Kubernetes service type for the radarr GUI | `ClusterIP` | | `exportarr.apikey` | Radarr's API Key | |
| `Service.port` | Kubernetes port where the radarr GUI is exposed| `7878` | | `exportarr.serviceMonitor.enabled` | Enable Prometheus Operator ServiceMonitor monitoring | `false` |
| `Service.annotations` | Service annotations for the radarr GUI | `{}` | | `exportarr.serviceMonitor.namespace` | Define namespace where to deploy the ServiceMonitor resource | (namespace where you are deploying) |
| `Service.labels` | Custom labels | `{}` | | `exportarr.serviceMonitor.path` | Prometheus scrape path | `/metrics` |
| `Service.loadBalancerIP` | Loadbalance IP for the radarr GUI | `{}` | | `exportarr.serviceMonitor.interval` | Prometheus scrape interval | `4m` |
| `Service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to load balancer (if supported) | None | `exportarr.serviceMonitor.scrapeTimeout` | Prometheus scrape timeout | `90s` |
| `ingress.enabled` | Enables Ingress | `false` | | `exportarr.serviceMonitor.additionalLabels` | Add custom labels to ServiceMonitor | `{}` |
| `ingress.annotations` | Ingress annotations | `{}` | | `probes.liveness.initialDelaySeconds` | Specify liveness `initialDelaySeconds` parameter for the deployment | `60` |
| `ingress.labels` | Custom labels | `{}` | `probes.liveness.failureThreshold` | Specify liveness `failureThreshold` parameter for the deployment | `5` |
| `ingress.path` | Ingress path | `/` | | `probes.liveness.timeoutSeconds` | Specify liveness `timeoutSeconds` parameter for the deployment | `10` |
| `ingress.hosts` | Ingress accepted hostnames | `chart-example.local` | | `probes.readiness.initialDelaySeconds` | Specify readiness `initialDelaySeconds` parameter for the deployment | `60` |
| `ingress.tls` | Ingress TLS configuration | `[]` | | `probes.readiness.failureThreshold` | Specify readiness `failureThreshold` parameter for the deployment | `5` |
| `persistence.config.enabled` | Use persistent volume to store configuration data | `true` | | `probes.readiness.timeoutSeconds` | Specify readiness `timeoutSeconds` parameter for the deployment | `10` |
| `persistence.config.size` | Size of persistent volume claim | `1Gi` | | `service.type` | Kubernetes service type for the GUI | `ClusterIP` |
| `persistence.config.existingClaim`| Use an existing PVC to persist data | `nil` | | `service.port` | Kubernetes port where the GUI is exposed | `7878` |
| `persistence.config.storageClass` | Type of persistent volume claim | `-` | | `service.annotations` | Service annotations for the GUI | `{}` |
| `persistence.config.accessMode` | Persistence access mode | `ReadWriteOnce` | | `service.labels` | Custom labels | `{}` |
| `persistence.config.skipuninstall` | Do not delete the pvc upon helm uninstall | `false` | | `service.loadBalancerIP` | Loadbalancer IP for the GUI | `{}` |
| `persistence.downloads.enabled` | Use persistent volume to store configuration data | `true` | | `service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to load balancer (if supported) | None |
| `persistence.downloads.size` | Size of persistent volume claim | `10Gi` | | `ingress.enabled` | Enables Ingress | `false` |
| `persistence.downloads.existingClaim`| Use an existing PVC to persist data | `nil` | | `ingress.annotations` | Ingress annotations | `{}` |
| `persistence.downloads.storageClass` | Type of persistent volume claim | `-` | | `ingress.labels` | Custom labels | `{}` |
| `persistence.downloads.accessMode` | Persistence access mode | `ReadWriteOnce` | | `ingress.path` | Ingress path | `/` |
| `persistence.downloads.skipuninstall` | Do not delete the pvc upon helm uninstall | `false` | | `ingress.hosts` | Ingress accepted hostnames | `chart-example.local` |
| `persistence.movies.enabled` | Use persistent volume to store configuration data | `true` | | `ingress.tls` | Ingress TLS configuration | `[]` |
| `persistence.movies.size` | Size of persistent volume claim | `10Gi` | | `persistence.config.enabled` | Use persistent volume to store configuration data | `true` |
| `persistence.movies.existingClaim`| Use an existing PVC to persist data | `nil` | | `persistence.config.size` | Size of persistent volume claim | `1Gi` |
| `persistence.movies.storageClass` | Type of persistent volume claim | `-` | | `persistence.config.existingClaim` | Use an existing PVC to persist data | `nil` |
| `persistence.movies.accessMode` | Persistence access mode | `ReadWriteOnce` | | `persistence.config.storageClass` | Type of persistent volume claim | `-` |
| `persistence.movies.skipuninstall` | Do not delete the pvc upon helm uninstall | `false` | | `persistence.config.accessMode` | Persistence access mode | `ReadWriteOnce` |
| `persistence.extraExistingClaimMounts` | Optionally add multiple existing claims | `[]` | | `persistence.config.skipuninstall` | Do not delete the pvc upon helm uninstall | `false` |
| `resources` | CPU/Memory resource requests/limits | `{}` | | `persistence.downloads.enabled` | Use persistent volume to store configuration data | `true` |
| `nodeSelector` | Node labels for pod assignment | `{}` | | `persistence.downloads.size` | Size of persistent volume claim | `10Gi` |
| `tolerations` | Toleration labels for pod assignment | `[]` | | `persistence.downloads.existingClaim` | Use an existing PVC to persist data | `nil` |
| `affinity` | Affinity settings for pod assignment | `{}` | | `persistence.downloads.storageClass` | Type of persistent volume claim | `-` |
| `podAnnotations` | Key-value pairs to add as pod annotations | `{}` | | `persistence.downloads.accessMode` | Persistence access mode | `ReadWriteOnce` |
| `deploymentAnnotations` | Key-value pairs to add as deployment annotations | `{}` | | `persistence.downloads.skipuninstall` | Do not delete the pvc upon helm uninstall | `false` |
| `persistence.movies.enabled` | Use persistent volume to store configuration data | `true` |
| `persistence.movies.size` | Size of persistent volume claim | `10Gi` |
| `persistence.movies.existingClaim` | Use an existing PVC to persist data | `nil` |
| `persistence.movies.storageClass` | Type of persistent volume claim | `-` |
| `persistence.movies.accessMode` | Persistence access mode | `ReadWriteOnce` |
| `persistence.movies.skipuninstall` | Do not delete the pvc upon helm uninstall | `false` |
| `persistence.extraExistingClaimMounts` | Optionally add multiple existing claims | `[]` |
| `resources` | CPU/Memory resource requests/limits | `{}` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `tolerations` | Toleration labels for pod assignment | `[]` |
| `affinity` | Affinity settings for pod assignment | `{}` |
| `podAnnotations` | Key-value pairs to add as pod annotations | `{}` |
| `deploymentAnnotations` | Key-value pairs to add as deployment annotations | `{}` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

View File

@ -81,6 +81,42 @@ spec:
{{- end }} {{- end }}
resources: resources:
{{ toYaml .Values.resources | indent 12 }} {{ toYaml .Values.resources | indent 12 }}
{{- if .Values.exportarr.enabled }}
- name: radarr-exporter
image: "{{ .Values.exportarr.image.repository }}:{{ .Values.exportarr.image.tag }}"
imagePullPolicy: {{ .Values.exportarr.image.pullPolicy }}
command: ["exportarr"]
args: ["radarr"]
env:
- name: PORT
value: "{{ .Values.exportarr.port }}"
- name: URL
value: "{{ .Values.exportarr.url }}"
- name: APIKEY
value: "{{ .Values.exportarr.apikey }}"
ports:
- name: monitoring
containerPort: {{ .Values.exportarr.port }}
livenessProbe:
httpGet:
path: /healthz
port: monitoring
failureThreshold: 5
periodSeconds: 10
readinessProbe:
httpGet:
path: /healthz
port: monitoring
failureThreshold: 5
periodSeconds: 10
resources:
requests:
cpu: 100m
memory: 64Mi
limits:
cpu: 500m
memory: 256Mi
{{- end }}
volumes: volumes:
- name: config - name: config
{{- if .Values.persistence.config.enabled }} {{- if .Values.persistence.config.enabled }}

View File

@ -0,0 +1,20 @@
{{- if .Values.exportarr.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "radarr.fullname" . }}-exporter
labels:
app.kubernetes.io/name: {{ include "radarr.name" . }}
helm.sh/chart: {{ include "radarr.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
clusterIP: None
ports:
- name: monitoring
port: {{ .Values.exportarr.port }}
targetPort: monitoring
selector:
app.kubernetes.io/name: {{ include "radarr.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

View File

@ -0,0 +1,24 @@
{{- if .Values.exportarr.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "radarr.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "radarr.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "radarr.chart" . }}
{{- with .Values.exportarr.serviceMonitor.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ include "radarr.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
endpoints:
- port: monitoring
interval: {{ .Values.exportarr.serviceMonitor.interval }}
scrapeTimeout: {{ .Values.exportarr.serviceMonitor.scrapeTimeout }}
path: {{ .Values.exportarr.serviceMonitor.path }}
{{- end }}

View File

@ -4,7 +4,7 @@
image: image:
repository: linuxserver/radarr repository: linuxserver/radarr
tag: amd64-v0.2.0.1344-ls17 tag: v0.2.0.1480-ls58
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# upgrade strategy type (e.g. Recreate or RollingUpdate) # upgrade strategy type (e.g. Recreate or RollingUpdate)
@ -21,6 +21,24 @@ probes:
failureThreshold: 5 failureThreshold: 5
timeoutSeconds: 10 timeoutSeconds: 10
# Prometheus Metrics
exportarr:
enabled: false
image:
repository: onedr0p/exportarr
tag: v0.3.0
pullPolicy: IfNotPresent
url: "http://radarr.default.svc.cluster.local:7878"
apikey:
port: 9708
serviceMonitor:
enabled: false
namespace: default
path: /metrics
interval: 4m
scrapeTimeout: 90s
additionalLabels: {}
nameOverride: "" nameOverride: ""
fullnameOverride: "" fullnameOverride: ""