Compare commits
10 Commits
702ef6ecee
...
caf62609d3
| Author | SHA1 | Date | |
|---|---|---|---|
| caf62609d3 | |||
| 4183831d2f | |||
| ae6ed770a9 | |||
| 59d936d467 | |||
| 9b56ce5e4f | |||
| 2424ad440b | |||
| dff138ba31 | |||
| d95eb6f4ab | |||
| 5252f209f5 | |||
| e7348b2718 |
2
Makefile
2
Makefile
@@ -3,7 +3,7 @@ install-router:
|
|||||||
|
|
||||||
gen-talos-config:
|
gen-talos-config:
|
||||||
mkdir -p talos/generated
|
mkdir -p talos/generated
|
||||||
talosctl gen config --with-secrets secrets.yaml --config-patch @talos/patches/controlplane.patch --config-patch @talos/patches/openebs.patch --config-patch @talos/patches/openbao.patch --config-patch @talos/patches/anapistula-delrosalae.patch --output-types controlplane -o talos/generated/anapistula-delrosalae.yaml homelab https://kube-api.homelab.lumpiasty.xyz:6443
|
talosctl gen config --with-secrets secrets.yaml --config-patch @talos/patches/controlplane.patch --config-patch @talos/patches/openebs.patch --config-patch @talos/patches/openbao.patch --config-patch @talos/patches/ollama.patch --config-patch @talos/patches/frigate.patch --config-patch @talos/patches/anapistula-delrosalae.patch --output-types controlplane -o talos/generated/anapistula-delrosalae.yaml homelab https://kube-api.homelab.lumpiasty.xyz:6443
|
||||||
talosctl gen config --with-secrets secrets.yaml --config-patch @talos/patches/controlplane.patch --output-types worker -o talos/generated/worker.yaml homelab https://kube-api.homelab.lumpiasty.xyz:6443
|
talosctl gen config --with-secrets secrets.yaml --config-patch @talos/patches/controlplane.patch --output-types worker -o talos/generated/worker.yaml homelab https://kube-api.homelab.lumpiasty.xyz:6443
|
||||||
talosctl gen config --with-secrets secrets.yaml --output-types talosconfig -o talos/generated/talosconfig homelab https://kube-api.homelab.lumpiasty.xyz:6443
|
talosctl gen config --with-secrets secrets.yaml --output-types talosconfig -o talos/generated/talosconfig homelab https://kube-api.homelab.lumpiasty.xyz:6443
|
||||||
talosctl config endpoint kube-api.homelab.lumpiasty.xyz
|
talosctl config endpoint kube-api.homelab.lumpiasty.xyz
|
||||||
|
|||||||
@@ -2,4 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
|
- secret.yaml
|
||||||
- release.yaml
|
- release.yaml
|
||||||
|
- webrtc-svc.yaml
|
||||||
|
|||||||
@@ -27,22 +27,111 @@ spec:
|
|||||||
config: |
|
config: |
|
||||||
mqtt:
|
mqtt:
|
||||||
enabled: False
|
enabled: False
|
||||||
|
|
||||||
|
tls:
|
||||||
|
enabled: False
|
||||||
|
|
||||||
|
auth:
|
||||||
|
enabled: True
|
||||||
|
cookie_secure: True
|
||||||
|
|
||||||
|
record:
|
||||||
|
enabled: True
|
||||||
|
retain:
|
||||||
|
days: 90
|
||||||
|
mode: motion
|
||||||
|
|
||||||
cameras:
|
cameras:
|
||||||
dummy_camera:
|
dom:
|
||||||
enabled: False
|
enabled: True
|
||||||
ffmpeg:
|
ffmpeg:
|
||||||
inputs:
|
inputs:
|
||||||
- path: rtsp://127.0.0.1:554/rtsp
|
- path: rtsp://127.0.0.1:8554/dom
|
||||||
roles:
|
roles:
|
||||||
|
- audio
|
||||||
- detect
|
- detect
|
||||||
|
- record
|
||||||
|
output_args:
|
||||||
|
record: preset-record-generic-audio-copy
|
||||||
|
garaz:
|
||||||
|
enabled: True
|
||||||
|
ffmpeg:
|
||||||
|
inputs:
|
||||||
|
- path: rtsp://127.0.0.1:8554/garaz
|
||||||
|
roles:
|
||||||
|
- audio
|
||||||
|
- detect
|
||||||
|
- record
|
||||||
|
output_args:
|
||||||
|
record: preset-record-generic-audio-copy
|
||||||
|
|
||||||
|
ffmpeg:
|
||||||
|
hwaccel_args: preset-vaapi
|
||||||
|
|
||||||
|
detectors:
|
||||||
|
ov_0:
|
||||||
|
type: openvino
|
||||||
|
device: CPU
|
||||||
|
model:
|
||||||
|
width: 300
|
||||||
|
height: 300
|
||||||
|
input_tensor: nhwc
|
||||||
|
input_pixel_format: bgr
|
||||||
|
path: /openvino-model/ssdlite_mobilenet_v2.xml
|
||||||
|
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
|
||||||
|
|
||||||
|
go2rtc:
|
||||||
|
streams:
|
||||||
|
dom:
|
||||||
|
- rtsp://{FRIGATE_RTSP_DOM_USER}:{FRIGATE_RTSP_DOM_PASSWORD_URLENCODED}@192.168.3.10:554/Streaming/Channels/101
|
||||||
|
garaz:
|
||||||
|
- rtsp://{FRIGATE_RTSP_GARAZ_USER}:{FRIGATE_RTSP_GARAZ_PASSWORD_URLENCODED}@192.168.3.11:554/Streaming/Channels/101
|
||||||
|
webrtc:
|
||||||
|
candidates:
|
||||||
|
- frigate-rtc.lumpiasty.xyz:8555
|
||||||
persistence:
|
persistence:
|
||||||
media:
|
media:
|
||||||
enabled: true
|
enabled: true
|
||||||
size: 100Gi
|
size: 500Gi
|
||||||
storageClass: mayastor-single-hdd
|
storageClass: mayastor-single-hdd
|
||||||
skipuninstall: true
|
skipuninstall: true
|
||||||
config:
|
config:
|
||||||
enabled: true
|
enabled: true
|
||||||
size: 100Mi
|
size: 1Gi
|
||||||
storageClass: mayastor-single-hdd
|
storageClass: mayastor-single-hdd
|
||||||
skipuninstall: true
|
skipuninstall: true
|
||||||
|
envFromSecrets:
|
||||||
|
- frigate-camera-rtsp
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt
|
||||||
|
nginx.org/websocket-services: frigate
|
||||||
|
hosts:
|
||||||
|
- host: frigate.lumpiasty.xyz
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
portName: http-auth
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- frigate.lumpiasty.xyz
|
||||||
|
secretName: frigate-ingress
|
||||||
|
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/hostname: anapistula-delrosalae
|
||||||
|
|
||||||
|
# GPU access
|
||||||
|
extraVolumes:
|
||||||
|
- name: dri
|
||||||
|
hostPath:
|
||||||
|
path: /dev/dri/renderD128
|
||||||
|
type: CharDevice
|
||||||
|
|
||||||
|
extraVolumeMounts:
|
||||||
|
- name: dri
|
||||||
|
mountPath: /dev/dri/renderD128
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
# Not ideal
|
||||||
|
privileged: true
|
||||||
|
|||||||
43
apps/frigate/secret.yaml
Normal file
43
apps/frigate/secret.yaml
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: camera
|
||||||
|
namespace: frigate
|
||||||
|
---
|
||||||
|
apiVersion: secrets.hashicorp.com/v1beta1
|
||||||
|
kind: VaultAuth
|
||||||
|
metadata:
|
||||||
|
name: camera
|
||||||
|
namespace: frigate
|
||||||
|
spec:
|
||||||
|
method: kubernetes
|
||||||
|
mount: kubernetes
|
||||||
|
kubernetes:
|
||||||
|
role: frigate-camera
|
||||||
|
serviceAccount: camera
|
||||||
|
---
|
||||||
|
apiVersion: secrets.hashicorp.com/v1beta1
|
||||||
|
kind: VaultStaticSecret
|
||||||
|
metadata:
|
||||||
|
name: frigate-camera-rtsp
|
||||||
|
namespace: frigate
|
||||||
|
spec:
|
||||||
|
type: kv-v2
|
||||||
|
|
||||||
|
mount: secret
|
||||||
|
path: cameras
|
||||||
|
|
||||||
|
destination:
|
||||||
|
create: true
|
||||||
|
name: frigate-camera-rtsp
|
||||||
|
type: Opaque
|
||||||
|
transformation:
|
||||||
|
excludeRaw: true
|
||||||
|
templates:
|
||||||
|
FRIGATE_RTSP_DOM_PASSWORD_URLENCODED:
|
||||||
|
text: '{{ urlquery (get .Secrets "FRIGATE_RTSP_DOM_PASSWORD") }}'
|
||||||
|
FRIGATE_RTSP_GARAZ_PASSWORD_URLENCODED:
|
||||||
|
text: '{{ urlquery (get .Secrets "FRIGATE_RTSP_GARAZ_PASSWORD") }}'
|
||||||
|
|
||||||
|
vaultAuthRef: camera
|
||||||
20
apps/frigate/webrtc-svc.yaml
Normal file
20
apps/frigate/webrtc-svc.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: go2rtc
|
||||||
|
namespace: frigate
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/instance: frigate
|
||||||
|
app.kubernetes.io/name: frigate
|
||||||
|
ipFamilyPolicy: RequireDualStack
|
||||||
|
ports:
|
||||||
|
- name: webrtc-tcp
|
||||||
|
protocol: TCP
|
||||||
|
port: 8555
|
||||||
|
targetPort: webrtc-tcp
|
||||||
|
- name: webrtc-udp
|
||||||
|
protocol: UDP
|
||||||
|
port: 8555
|
||||||
|
targetPort: webrtc-udp
|
||||||
@@ -18,7 +18,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: ollama
|
chart: ollama
|
||||||
version: 1.22.0
|
version: 1.23.0
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: ollama-helm
|
name: ollama-helm
|
||||||
|
|||||||
@@ -16,3 +16,5 @@ parameters:
|
|||||||
poolAffinityTopologyLabel: |
|
poolAffinityTopologyLabel: |
|
||||||
type: hdd
|
type: hdd
|
||||||
provisioner: io.openebs.csi-mayastor
|
provisioner: io.openebs.csi-mayastor
|
||||||
|
# Allow expansion of volumes
|
||||||
|
allowVolumeExpansion: true
|
||||||
|
|||||||
11
talos/patches/frigate.patch
Normal file
11
talos/patches/frigate.patch
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# CSI driver requirement
|
||||||
|
cluster:
|
||||||
|
apiServer:
|
||||||
|
admissionControl:
|
||||||
|
- name: PodSecurity
|
||||||
|
configuration:
|
||||||
|
apiVersion: pod-security.admission.config.k8s.io/v1beta1
|
||||||
|
kind: PodSecurityConfiguration
|
||||||
|
exemptions:
|
||||||
|
namespaces:
|
||||||
|
- frigate
|
||||||
6
vault/kubernetes-roles/frigate-camera.yaml
Normal file
6
vault/kubernetes-roles/frigate-camera.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
bound_service_account_names:
|
||||||
|
- camera
|
||||||
|
bound_service_account_namespaces:
|
||||||
|
- frigate
|
||||||
|
token_policies:
|
||||||
|
- frigate
|
||||||
4
vault/policy/frigate.hcl
Normal file
4
vault/policy/frigate.hcl
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
path "secret/data/cameras" {
|
||||||
|
capabilities = ["read"]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user