add frigate deployment with london camera enabled and 2 valchedrym cameras disabled [ci skip]
This commit is contained in:
parent
e65f05b3d3
commit
a0ecf2ba1e
3 changed files with 77 additions and 20 deletions
3
main.tf
3
main.tf
|
|
@ -65,6 +65,7 @@ variable "ingress_crowdsec_captcha_site_key" {}
|
||||||
variable "vaultwarden_smtp_password" {}
|
variable "vaultwarden_smtp_password" {}
|
||||||
variable "resume_database_url" {}
|
variable "resume_database_url" {}
|
||||||
variable "resume_redis_url" {}
|
variable "resume_redis_url" {}
|
||||||
|
variable "frigate_valchedrym_camera_credentials" { default = "" }
|
||||||
|
|
||||||
variable "ansible_prefix" {
|
variable "ansible_prefix" {
|
||||||
default = "ANSIBLE_VAULT_PASSWORD_FILE=~/.ansible/vault_pass.txt ansible-playbook -i playbook/hosts.yaml playbook/linux.yml -t linux/initial_setup"
|
default = "ANSIBLE_VAULT_PASSWORD_FILE=~/.ansible/vault_pass.txt ansible-playbook -i playbook/hosts.yaml playbook/linux.yml -t linux/initial_setup"
|
||||||
|
|
@ -339,6 +340,8 @@ module "kubernetes_cluster" {
|
||||||
|
|
||||||
resume_redis_url = var.resume_redis_url
|
resume_redis_url = var.resume_redis_url
|
||||||
resume_database_url = var.resume_database_url
|
resume_database_url = var.resume_database_url
|
||||||
|
|
||||||
|
frigate_valchedrym_camera_credentials = var.frigate_valchedrym_camera_credentials
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
variable "tls_secret_name" {}
|
variable "tls_secret_name" {}
|
||||||
|
variable "valchedrym_camera_credentials" {
|
||||||
|
// in the format:
|
||||||
|
// username:password
|
||||||
|
default = ""
|
||||||
|
}
|
||||||
|
|
||||||
resource "kubernetes_namespace" "frigate" {
|
resource "kubernetes_namespace" "frigate" {
|
||||||
metadata {
|
metadata {
|
||||||
|
|
@ -30,22 +35,54 @@ resource "kubernetes_config_map" "config" {
|
||||||
mqtt:
|
mqtt:
|
||||||
enabled: False
|
enabled: False
|
||||||
cameras:
|
cameras:
|
||||||
|
# Temp disabled until valchedrym is back up
|
||||||
valchedrym-cam-1:
|
valchedrym-cam-1:
|
||||||
ffmpeg:
|
enabled: false
|
||||||
inputs:
|
ffmpeg:
|
||||||
- path: rtsp://admin:REDACTED_RTSP_PW@192.168.0.11:554/Streaming/Channels/101 # <----- The stream you want to use for detection
|
inputs:
|
||||||
detect:
|
- path: rtsp://${var.valchedrym_camera_credentials}@192.168.0.11:554/Streaming/Channels/101 # <----- The stream you want to use for detection
|
||||||
enabled: False # <---- disable detection until you have a working camera feed
|
detect:
|
||||||
width: 704 # <---- update for your camera's resolution
|
enabled: False # <---- disable detection until you have a working camera feed
|
||||||
height: 576 # <---- update for your camera's resolution
|
width: 704 # <---- update for your camera's resolution
|
||||||
|
height: 576 # <---- update for your camera's resolution
|
||||||
valchedrym-cam-2:
|
valchedrym-cam-2:
|
||||||
|
enabled: false
|
||||||
|
ffmpeg:
|
||||||
|
inputs:
|
||||||
|
- path: rtsp://${var.valchedrym_camera_credentials}@192.168.0.11:554/Streaming/Channels/201 # <----- The stream you want to use for detection
|
||||||
|
detect:
|
||||||
|
enabled: False # <---- disable detection until you have a working camera feed
|
||||||
|
width: 704 # <---- update for your camera's resolution
|
||||||
|
height: 576 # <---- update for your camera's resolution
|
||||||
|
london-ipcam:
|
||||||
|
enabled: true
|
||||||
ffmpeg:
|
ffmpeg:
|
||||||
inputs:
|
inputs:
|
||||||
- path: rtsp://admin:REDACTED_RTSP_PW@192.168.0.11:554/Streaming/Channels/201 # <----- The stream you want to use for detection
|
- path: rtsp://192.168.2.2:8554/london_cam # <----- The stream you want to use for detection
|
||||||
|
roles:
|
||||||
|
- rtmp
|
||||||
|
- record
|
||||||
|
- detect
|
||||||
detect:
|
detect:
|
||||||
enabled: False # <---- disable detection until you have a working camera feed
|
enabled: True
|
||||||
width: 704 # <---- update for your camera's resolution
|
width: 1280
|
||||||
height: 576 # <---- update for your camera's resolution
|
height: 720
|
||||||
|
record:
|
||||||
|
enabled: False # Not needed for this camera but keeping for reference
|
||||||
|
events:
|
||||||
|
retain:
|
||||||
|
default: 10
|
||||||
|
objects:
|
||||||
|
# Optional: list of objects to track from labelmap.txt (full list - https://docs.frigate.video/configuration/objects)
|
||||||
|
track:
|
||||||
|
- person
|
||||||
|
- shoe
|
||||||
|
- handbag
|
||||||
|
- wine glass
|
||||||
|
- knife
|
||||||
|
- pizza
|
||||||
|
- laptop
|
||||||
|
- book
|
||||||
EOT
|
EOT
|
||||||
}
|
}
|
||||||
# Password hashes are different each time and avoid changing secret constantly.
|
# Password hashes are different each time and avoid changing secret constantly.
|
||||||
|
|
@ -110,6 +147,14 @@ resource "kubernetes_deployment" "frigate" {
|
||||||
mount_path = "/config/config.yml"
|
mount_path = "/config/config.yml"
|
||||||
sub_path = "config.yml"
|
sub_path = "config.yml"
|
||||||
}
|
}
|
||||||
|
volume_mount {
|
||||||
|
name = "media"
|
||||||
|
mount_path = "/media/frigate"
|
||||||
|
}
|
||||||
|
volume_mount {
|
||||||
|
name = "dshm"
|
||||||
|
mount_path = "/dev/shm"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
volume {
|
volume {
|
||||||
name = "config"
|
name = "config"
|
||||||
|
|
@ -117,13 +162,20 @@ resource "kubernetes_deployment" "frigate" {
|
||||||
name = "config"
|
name = "config"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# volume {
|
volume {
|
||||||
# name = "audiobooks"
|
name = "dshm"
|
||||||
# nfs {
|
empty_dir {
|
||||||
# path = "/mnt/main/frigate/audiobooks"
|
medium = "Memory"
|
||||||
# server = "10.0.10.15"
|
size_limit = "1Gi"
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
|
volume {
|
||||||
|
name = "media"
|
||||||
|
nfs {
|
||||||
|
path = "/mnt/main/frigate"
|
||||||
|
server = "10.0.10.15"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ variable "ingress_crowdsec_captcha_site_key" {}
|
||||||
variable "vaultwarden_smtp_password" {}
|
variable "vaultwarden_smtp_password" {}
|
||||||
variable "resume_database_url" {}
|
variable "resume_database_url" {}
|
||||||
variable "resume_redis_url" {}
|
variable "resume_redis_url" {}
|
||||||
|
variable "frigate_valchedrym_camera_credentials" { default = "" }
|
||||||
|
|
||||||
resource "null_resource" "core_services" {
|
resource "null_resource" "core_services" {
|
||||||
# List all the core modules that must be provisioned first
|
# List all the core modules that must be provisioned first
|
||||||
|
|
@ -395,6 +396,7 @@ module "audiobookshelf" {
|
||||||
}
|
}
|
||||||
|
|
||||||
module "frigate" {
|
module "frigate" {
|
||||||
source = "./frigate"
|
source = "./frigate"
|
||||||
tls_secret_name = var.tls_secret_name
|
tls_secret_name = var.tls_secret_name
|
||||||
|
valchedrym_camera_credentials = var.frigate_valchedrym_camera_credentials
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue