Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 1, 2025

Creates Ansible role to deploy Frigate NVR to k3s via Argo CD Application, following existing *_deploy role patterns.

Role Structure

  • meta/argument_specs.yml - All inputs with frigate_deploy_ prefix
  • defaults/main.yml - Homelab defaults (Longhorn storage, Tailscale ingress, chart v7.8.0)
  • tasks/main.yml - Render + apply via k8s_object_manager, persist via role_artifacts
  • templates/frigate-application.yml.j2 - Argo Application with Helm valuesObject
  • templates/frigate-homepage-ingress.yml.j2 - Homepage discovery ingress

Key Features

  • Uses official blakeshome-charts Helm chart
  • Longhorn for config persistence, optional Synology for media storage
  • Tailscale-only ingress exposure (no public access)
  • Homepage annotations for dashboard discovery
  • Proper Helm values merging via frigate_deploy_values_overrides dict

Example Usage

- name: Deploy Frigate
  ansible.builtin.include_role:
    name: frigate_deploy
  vars:
    frigate_deploy_kubeconfig: "{{ kubeconfig_path }}"
    frigate_deploy_context: "{{ context_name }}"
    frigate_deploy_storage_class_synology: synology-nfs  # optional media storage
    frigate_deploy_values_overrides:
      frigate:
        mqtt:
          host: mqtt.local

Passes ansible-lint production profile.

Original prompt

This section details on the original issue you should resolve

<issue_title>Frigate Deployment</issue_title>
<issue_description># Deploy Frigate Argo Application with proper configuration

Goal
Create a new Ansible role that deploys Frigate NVR to the homelab k3s cluster via an Argo CD Application resource, following the same patterns and quality bar as the existing deployment roles:

  • ansible/roles/homepage_deploy
  • ansible/roles/longhorn_deploy
  • ansible/roles/tailscale_operator_deploy
  • ansible/roles/synology_csi_deploy

This role should render a complete, production ready Argo CD Application spec using the official Frigate Helm chart from blakeshome-charts, wired into the existing HA k3s + Tailscale + Longhorn + Synology stack.([GitHub][1])

Scope
This issue is only for:

  • Creating ansible/roles/frigate_deploy
  • Defining its argument specs and defaults
  • Rendering the Frigate Argo Application YAML and Helm valuesObject into the standard artifacts tree
  • Optionally applying the Application, if that matches the pattern of the other deploy roles

It does not cover configuring individual cameras, MQTT broker deployment, Home Assistant integration, or detailed Frigate configuration beyond what is required for a sane initial deployment.

Role structure and conventions
Follow the same structure and conventions as the existing *_deploy roles:

  • ansible/roles/frigate_deploy/meta/argument_specs.yml
  • ansible/roles/frigate_deploy/defaults/main.yml
  • ansible/roles/frigate_deploy/tasks/main.yml

Rules:

  • Use fully qualified collection names for all Ansible modules.
  • All variables for this role must be prefixed with frigate_deploy_.
  • The role must be idempotent and pass Ansible lint.
  • Use the existing role_artifacts role exactly the same way other deploy roles do as the single source of truth for where rendered files are written.
  • Keep tasks minimal and focused. If generic Argo handling starts to creep in, that belongs in shared roles in future tickets, not in this one.

Argo CD Application spec requirements
Use Argo CD’s Application spec as the reference.

The role should:

  1. Render a complete Argo Application manifest for Frigate:

    • apiVersion: argoproj.io/v1alpha1

    • kind: Application

    • metadata.name: frigate

    • metadata.namespace: Argo CD namespace, derived or provided the same way as in other deploy roles.

    • spec.project: the same Argo project used for other homelab applications.

    • spec.source:

      • repoURL: https://blakeblackshear.github.io/blakeshome-charts/
      • chart: frigate
      • targetRevision: latest stable chart version by default, overridable via frigate_deploy_helm_chart_version.([GitHub][1])
      • helm.valuesObject: see Helm section below.
    • spec.destination:

      • server: in cluster API server, consistent with the other deploy roles.
      • namespace: default frigate, configurable via frigate_deploy_namespace.
    • spec.syncPolicy:

      • Match the sync policy pattern used by the other homelab app roles (automated or manual, syncOptions, retry).
  2. Write the Application YAML to the artifacts directory using role_artifacts:

    • Follow the same pattern as the other application deploy roles. For example:

      • .artifacts/{{ deploy_env }}/argo/applications/frigate-application.yaml
    • All paths must be derived from role_artifacts outputs and not hard coded.

  3. Optionally apply the Application to the cluster:

    • Provide frigate_deploy_apply_application (bool).
    • If true, apply using kubernetes.core.k8s or a kubectl based flow consistent with the existing deploy roles, including their CLI validation and context handling.

Helm configuration and values
Use the official Frigate Helm chart from blakeshome-charts which is the published chart on ArtifactHub.([Artifact Hub][2])

Key rules:

  • Only put overrides in spec.source.helm.valuesObject.
  • If the chart default for a value is sufficient, do not include it in valuesObject.
  • frigate_deploy_values_overrides should be a dict that is merged directly into valuesObject and is the single source of override truth.

Values must:

  1. Respect the HA k3s layout:

    • Ensure the Frigate pod(s) schedule correctly on HA k3s.
    • If the chart exposes replica count, resource requests and limits, affinity or tolerations, only override these where needed for this cluster, and leave all other defaults alone.
    • Allow for hardware acceleration configuration (for example Coral, Nvidia, Intel vaapi) via frigate_deploy_values_overrides but do not hard code any particular accelerator mode. Expose the chart’s gpu settings and host device mappings as pass through values.([...

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 1, 2025 03:27
Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Ansible role for deploying Frigate NVR Add frigate_deploy role for Frigate NVR Argo CD deployment Dec 1, 2025
Copilot AI requested a review from SRF-Audio December 1, 2025 03:34
@SRF-Audio SRF-Audio marked this pull request as ready for review December 5, 2025 04:48
@SRF-Audio SRF-Audio merged commit eb58026 into main Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frigate Deployment

2 participants