Bazarr

Fetches and syncs subtitles for everything Sonarr and Radarr download

Bazarr fetches and syncs subtitles for everything Sonarr and Radarr collect.

Manifests & templates

templates/bazarr/bazarr-rollout.yaml

Bazarr Rollout

Show manifest
{{- $projectName  := .Values.global.projectName }}
{{- $imagePullSecretsName  := .Values.global.imagePullSecretsName }}
{{- $hostMediaMountPath  := .Values.global.hostMediaMountPath -}}
{{- $timeZone := .Values.global.timeZone -}}
{{- $userID := .Values.global.userID -}}
{{- with .Values.applications.bazarr }}
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: /data/movies
        - name: {{ .name  }}-series
          mountPath: /data/series
        - name: {{ .name  }}-anime
          mountPath: /data/anime
        - name: {{ .name  }}-others
          mountPath: /data/others
        resources:
          requests:
            memory: "364Mi"
            cpu: "500m"
      initContainers:
      - name: {{ .name }}-configuration
        image: busybox
        command:
          - "/bin/sh"
          - "-c"
          - |
              echo "######## Mount config file #######";
              mkdir -p {{ .configMount }}/config;
              cp /tmp/config.yaml {{ .configMount }}/config/config.yaml;
              chown {{ $userID }}:{{ $userID }} {{ .configMount }}/config/config.yaml;
              chmod 644 {{ .configMount }}/config/config.yaml;
              chown -R {{ $userID }}:{{ $userID }} {{ .configMount }};
              echo "Config Done";
        volumeMounts:
        - name: {{ .name }}-config
          mountPath: {{ .configMount }}
        - name: {{ .name }}-config-conf
          mountPath: /tmp/config.yaml
          subPath: config.yaml
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      volumes:
      - name: {{ .name }}-config
        emptyDir: {}
      - name: {{ .name }}-config-conf
        secret:
          secretName: apps-configs-secret
          items:
            - key: bazarr_config
              path: config.yaml
      - name: {{ .name }}-movies
        hostPath:
          path: {{ $hostMediaMountPath }}/movies
          type: Directory
      - name: {{ .name }}-series
        hostPath:
          path: {{ $hostMediaMountPath }}/series
          type: Directory
      - name: {{ .name }}-anime
        hostPath:
          path: {{ $hostMediaMountPath }}/anime
          type: Directory
      - name: {{ .name }}-others
        hostPath:
          path: {{ $hostMediaMountPath }}/others
          type: Directory
{{- end -}}

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

Config volume template: renders the Bazarr config directory

Show manifest
apiVersion: v1
kind: ConfigMap
metadata:
  name: bazarr-configs-config-tpl
  namespace: {{ .Release.Namespace }}
data:
  bazarr_config: |
    addic7ed:
      cookies: ''
      password: ''
      user_agent: ''
      username: ''
      vip: false
    analytics:
      enabled: false
    anticaptcha:
      anti_captcha_key: ''
    assrt:
      token: ''
    auth:
      apikey: {{ `{{ .bazarr_api_key }}` }}
      type: form
      username: {{ `{{ .main_username }}` }}
      password: {{ `{{ .main_password }}` }}
    backup:
      day: 6
      folder: /config/backup
      frequency: Weekly
      hour: 3
      retention: 31
    betaseries:
      token: ''
    cors:
      enabled: true
    deathbycaptcha:
      password: ''
      username: ''
    embeddedsubtitles:
      hi_fallback: false
      included_codecs: []
      timeout: 600
      unknown_as_english: false
    general:
      adaptive_searching: true
      adaptive_searching_delay: 3w
      adaptive_searching_delta: 1w
      anti_captcha_provider: null
      auto_update: true
      base_url: ''
      branch: master
      chmod: '0640'
      chmod_enabled: false
      days_to_upgrade_subs: 7
      debug: false
      default_und_audio_lang: en
      default_und_embedded_subtitles_lang: en
      dont_notify_manual_actions: false
      embedded_subs_show_desired: true
      embedded_subtitles_parser: ffprobe
      enabled_providers:
      - subdl
      - whisperai
      flask_secret_key: {{ `{{ .flask_secret_key }}` }}
      hi_extension: hi
      ignore_ass_subs: false
      ignore_pgs_subs: false
      ignore_vobsub_subs: false
      ip: 0.0.0.0
      language_equals: []
      minimum_score: 90
      minimum_score_movie: 70
      movie_default_enabled: false
      movie_default_profile: ''
      multithreading: true
      page_size: 500
      parse_embedded_audio_track: true
      path_mappings:
      - - /series/
        - /data/series/
      - - /anime/
        - /data/anime/
      path_mappings_movie:
      - - /movies/
        - /data/movies/
      - - /others/
        - /data/others/
      port: 6767
      postprocessing_cmd: ''
      postprocessing_threshold: 90
      postprocessing_threshold_movie: 70
      serie_default_enabled: false
      serie_default_profile: ''
      single_language: false
      skip_hashing: false
      subfolder: current
      subfolder_custom: ''
      subzero_mods: color(name=yellow)
      theme: light
      upgrade_frequency: 12
      upgrade_manual: true
      upgrade_subs: true
      use_embedded_subs: true
      use_postprocessing: false
      use_postprocessing_threshold: false
      use_postprocessing_threshold_movie: false
      use_radarr: true
      use_scenename: true
      use_sonarr: true
      utf8_encode: true
      wanted_search_frequency: 6
      wanted_search_frequency_movie: 6
    hdbits:
      passkey: ''
      username: ''
    karagarga:
      f_password: ''
      f_username: ''
      password: ''
      username: ''
    ktuvit:
      email: ''
      hashed_password: ''
    legendasdivx:
      password: ''
      skip_wrong_fps: false
      username: ''
    movie_scores:
      audio_codec: 3
      edition: 1
      hash: 119
      hearing_impaired: 1
      release_group: 13
      resolution: 2
      source: 7
      streaming_service: 1
      title: 60
      video_codec: 2
      year: 30
    napisy24:
      password: ''
      username: ''
    podnapisi:
      verify_ssl: true
    postgresql:
      database: {{ `{{ .bazarr_db_name }}` }}
      enabled: true
      host: {{ `{{ .db_host_name }}` }}
      port: {{ `{{ .db_port }}` }}
      username: {{ `{{ .db_username }}` }}
      password: {{ `{{ .db_password }}` }}
    proxy:
      exclude:
      - localhost
      - 127.0.0.1
      password: ''
      port: ''
      type: null
      url: ''
      username: ''
    radarr:
      apikey: {{ `{{ .radarr_api_key }}` }}
      base_url: ''
      defer_search_signalr: false
      excluded_tags: []
      full_update: Daily
      full_update_day: 6
      full_update_hour: 4
      http_timeout: 60
      ip: radarr-service.media-systems
      movies_sync: 60
      only_monitored: false
      port: 7878
      ssl: false
      sync_only_monitored_movies: false
      use_ffprobe_cache: true
    series_scores:
      audio_codec: 3
      episode: 30
      hash: 359
      hearing_impaired: 1
      release_group: 14
      resolution: 2
      season: 30
      series: 180
      source: 7
      streaming_service: 1
      video_codec: 2
      year: 90
    sonarr:
      apikey: {{ `{{ .sonarr_api_key }}` }}
      base_url: ''
      defer_search_signalr: false
      episodes_sync: 60
      exclude_season_zero: false
      excluded_series_types: []
      excluded_tags: []
      full_update: Daily
      full_update_day: 6
      full_update_hour: 4
      http_timeout: 60
      ip: sonarr-service.media-systems
      only_monitored: false
      port: 8989
      series_sync: 60
      ssl: false
      sync_only_monitored_episodes: false
      sync_only_monitored_series: false
      use_ffprobe_cache: true
    subf2m:
      user_agent: ''
      verify_ssl: true
    subdl:
      api_key: {{ `{{ .subdl_api_key }}` }}
    subscene:
      password: ''
      username: ''
    subsync:
      checker:
        blacklisted_languages: []
        blacklisted_providers: []
      debug: false
      force_audio: true
      gss: true
      max_offset_seconds: 60
      no_fix_framerate: true
      subsync_movie_threshold: 70
      subsync_threshold: 90
      use_subsync: true
      use_subsync_movie_threshold: false
      use_subsync_threshold: false
    titlovi:
      password: ''
      username: ''
    titulky:
      approved_only: false
      password: ''
      username: ''
    tvsubtitles: {}
    whisperai:
      endpoint: http://whisper-service.media-systems:9000
      loglevel: INFO
      response: 5
      timeout: 3600
    xsubs:
      password: ''
      username: ''
  • 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. Subtitles as an app inside the same pipeline

Alternative. A separate subsystem

Why. It consumes the library directly and shares the pipeline storage; separating it would only add moving parts.

← Back to Media · All service groups