[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
appVersion: amd64-v0.2.0.1344-ls17
appVersion: v0.2.0.1480-ls58
description: Radarr is a movie downloading client
name: radarr
version: 3.1.0
version: 3.2.0
keywords:
- radarr
- usenet

View File

@ -32,29 +32,42 @@ 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.
| Parameter | Description | Default |
|----------------------------|-------------------------------------|---------------------------------------------------------|
|---------------------------------------------|----------------------------------------------------------------------------------------------|------------------------------------------------|
| `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` |
| `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` |
| `puid` | process userID the radarr instance should run as | `1001` |
| `pgid` | process groupID the radarr instance should run as | `1001` |
| `timezone` | Timezone the instance should run as, e.g. 'America/New_York' | `UTC` |
| `puid` | process userID the instance should run as | `1001` |
| `pgid` | process groupID the instance should run as | `1001` |
| `exportarr.enabled` | Enable Prometheus monitoring with [Exportarr](https://github.com/onedr0p/exportarr) | `false` |
| `exportarr.image.repository` | Exportarr image repository | `onedr0p/exportarr` |
| `exportarr.image.tag` | Exportarr image tag | `v0.3.0` |
| `exportarr.image.pullPolicy` | Exportarr image pullPolicy | `IfNotPresent` |
| `exportarr.port` | Prometheus scrape port | `9708` |
| `exportarr.url` | Radarr's URL | `http://radarr.default.svc.cluster.local:7878` |
| `exportarr.apikey` | Radarr's API Key | |
| `exportarr.serviceMonitor.enabled` | Enable Prometheus Operator ServiceMonitor monitoring | `false` |
| `exportarr.serviceMonitor.namespace` | Define namespace where to deploy the ServiceMonitor resource | (namespace where you are deploying) |
| `exportarr.serviceMonitor.path` | Prometheus scrape path | `/metrics` |
| `exportarr.serviceMonitor.interval` | Prometheus scrape interval | `4m` |
| `exportarr.serviceMonitor.scrapeTimeout` | Prometheus scrape timeout | `90s` |
| `exportarr.serviceMonitor.additionalLabels` | Add custom labels to ServiceMonitor | `{}` |
| `probes.liveness.initialDelaySeconds` | Specify liveness `initialDelaySeconds` parameter for the deployment | `60` |
| `probes.liveness.failureThreshold` | Specify liveness `failureThreshold` parameter for the deployment | `5` |
| `probes.liveness.timeoutSeconds` | Specify liveness `timeoutSeconds` parameter for the deployment | `10` |
| `probes.readiness.initialDelaySeconds` | Specify readiness `initialDelaySeconds` parameter for the deployment | `60` |
| `probes.readiness.failureThreshold` | Specify readiness `failureThreshold` parameter for the deployment | `5` |
| `probes.readiness.timeoutSeconds` | Specify readiness `timeoutSeconds` parameter for the deployment | `10` |
| `Service.type` | Kubernetes service type for the radarr GUI | `ClusterIP` |
| `Service.port` | Kubernetes port where the radarr GUI is exposed| `7878` |
| `Service.annotations` | Service annotations for the radarr GUI | `{}` |
| `Service.labels` | Custom labels | `{}` |
| `Service.loadBalancerIP` | Loadbalance IP for the radarr GUI | `{}` |
| `Service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to load balancer (if supported) | None
| `service.type` | Kubernetes service type for the GUI | `ClusterIP` |
| `service.port` | Kubernetes port where the GUI is exposed | `7878` |
| `service.annotations` | Service annotations for the GUI | `{}` |
| `service.labels` | Custom labels | `{}` |
| `service.loadBalancerIP` | Loadbalancer IP for the GUI | `{}` |
| `service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to load balancer (if supported) | None |
| `ingress.enabled` | Enables Ingress | `false` |
| `ingress.annotations` | Ingress annotations | `{}` |
| `ingress.labels` | Custom labels | `{}`
| `ingress.labels` | Custom labels | `{}` |
| `ingress.path` | Ingress path | `/` |
| `ingress.hosts` | Ingress accepted hostnames | `chart-example.local` |
| `ingress.tls` | Ingress TLS configuration | `[]` |

View File

@ -81,6 +81,42 @@ spec:
{{- end }}
resources:
{{ 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:
- name: config
{{- 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:
repository: linuxserver/radarr
tag: amd64-v0.2.0.1344-ls17
tag: v0.2.0.1480-ls58
pullPolicy: IfNotPresent
# upgrade strategy type (e.g. Recreate or RollingUpdate)
@ -21,6 +21,24 @@ probes:
failureThreshold: 5
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: ""
fullnameOverride: ""