Radarr

Watches for movie releases, grabs them, and hands them to the download stack

Radarr is the movie counterpart to Sonarr: watchlists, grabbing, and library renaming.

Manifests & templates

templates/radarr/radarr-rollout.yaml

Radarr Rollout

Show manifest
{{- $projectName  := .Values.global.projectName -}}
{{- $imagePullSecretsName  := .Values.global.imagePullSecretsName -}}
{{- $hostMediaMountPath  := .Values.global.hostMediaMountPath -}}
{{- $configBasePath := .Values.global.configBasePath -}}
{{- $timeZone := .Values.global.timeZone -}}
{{- $userID := .Values.global.userID -}}
{{- with .Values.applications.radarr }}
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: {{ .name  }}
  namespace: {{ $projectName }}
spec:
  replicas: 1
  strategy:
    canary:
      maxSurge: 0
      maxUnavailable: 1
      steps:
      - setWeight: 100
  selector:
    matchLabels:
      app: {{ .name  }}
  template:
    metadata:
      labels:
        app: {{ .name  }}
    spec:
      {{- include "media-systems.nodePlacement" $ | nindent 6 }}
      serviceAccount: {{ $projectName }}-service-account
      serviceAccountName: {{ $projectName }}-service-account
      automountServiceAccountToken: true
      containers:
      - name: {{ .name  }}
        image: {{ .image }}
        imagePullPolicy: IfNotPresent
        ports:
        - name: {{ .name | substr 0 9 }}-http
          containerPort: {{ .ports.http }}
          protocol: TCP
        env:
        - name: PGID
          value: {{ $userID | quote }}
        - name: PUID
          value: {{ $userID | quote }}
        - name: TZ
          value: {{ $timeZone | quote }}
        volumeMounts:
        - name: {{ .name }}-config
          mountPath: {{ .configMount }}
        - name: {{ .name }}-movies
          mountPath: {{ .mediaMount }}/movies
        - name: {{ .name }}-others
          mountPath: {{ .mediaMount }}/others
        - name: {{ .name }}-downloads-movies
          mountPath: {{ .downloadMount }}/movies
        - name: {{ .name }}-downloads-others
          mountPath: {{ .downloadMount }}/others
        - name:  {{ .name }}-media-cover
          mountPath: /config/MediaCover
          readOnly: false
        resources: {}
      initContainers:
      - name: {{ .name }}-configuration
        image: busybox
        command:
          - "/bin/sh"
          - "-c"
          - |
              echo "######## Mount config file #######";
              mkdir -p {{ .configMount }};
              cp /tmp/config.xml {{ .configMount }}/config.xml;
              chown {{ $userID }}:{{ $userID }} {{ .configMount }}/config.xml;
              chmod 400 {{ .configMount }}/config.xml;
              chown -R {{ $userID }}:{{ $userID }} {{ .configMount }};
              echo "Config Done";
        volumeMounts:
        - name: {{ .name }}-config
          mountPath: {{ .configMount }}
        - name: {{ .name }}-config-xml
          mountPath: /tmp/config.xml
          subPath: config.xml
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      volumes:
      - name: {{ .name }}-movies
        hostPath:
          path: {{ $hostMediaMountPath }}/movies
          type: Directory
      - name: {{ .name }}-others
        hostPath:
          path: {{ $hostMediaMountPath }}/others
          type: Directory
      - name: {{ .name }}-downloads-movies
        hostPath:
          path: {{ $hostMediaMountPath }}/downloads/movies
          type: Directory
      - name: {{ .name }}-downloads-others
        hostPath:
          path: {{ $hostMediaMountPath }}/downloads/others
          type: Directory
      - name: {{ .name }}-config
        emptyDir: {}
      - name: {{ .name }}-config-xml
        secret:
          secretName: apps-configs-secret
          items:
            - key: radarr_config
              path: config.xml
      - name: {{ .name }}-media-cover
        hostPath:
          path: {{ $configBasePath }}/{{ .name }}/MediaCover
          type: DirectoryOrCreate
{{- end -}}

templates/_shared-templates/config-tpl/radarr-configs-config-tpl.yaml

Config volume template: renders the Radarr config directory

Show manifest
apiVersion: v1
kind: ConfigMap
metadata:
  name: radarr-configs-config-tpl
  namespace: {{ .Release.Namespace }}
data:
  radarr_config: |
    <Config>
      <BindAddress>*</BindAddress>
      <Port>7878</Port>
      <SslPort>9898</SslPort>
      <EnableSsl>False</EnableSsl>
      <LaunchBrowser>True</LaunchBrowser>
      <ApiKey>{{ `{{ .radarr_api_key }}` }}</ApiKey>
      <AuthenticationMethod>Forms</AuthenticationMethod>
      <AuthenticationRequired>DisabledForLocalAddresses</AuthenticationRequired>
      <Branch>master</Branch>
      <LogLevel>debug</LogLevel>
      <SslCertPath></SslCertPath>
      <SslCertPassword></SslCertPassword>
      <UrlBase></UrlBase>
      <InstanceName>Radarr</InstanceName>
      <UpdateMechanism>Docker</UpdateMechanism>
      <PostgresUser>{{ `{{ .db_username }}` }}</PostgresUser>
      <PostgresPassword>{{ `{{ .db_password }}` }}</PostgresPassword>
      <PostgresPort>{{ `{{ .db_port }}` }}</PostgresPort>
      <PostgresHost>{{ `{{ .db_host_name }}` }}</PostgresHost>
      <PostgresMainDb>{{ `{{ .radarr_db_name }}` }}</PostgresMainDb>
      <PostgresLogDb>{{ `{{ .radarr_db_name }}` }}_logs</PostgresLogDb>
    </Config>
  • media-systems is one umbrella Application: the whole pipeline deploys as a unit, pinned to a single node with local SSD storage. Per-app settings live in the media chart, not here.
  • This app is a section of the shared media-systems values file above; the media stack deploys as one ArgoCD Application.

Trade-offs

Decision. The arr apps as one umbrella Application

Alternative. One ArgoCD Application per app

Why. The pipeline is one operational unit: same node pin, same storage claim, deployed and upgraded together.

← Back to Media · All service groups