diff --git a/cluster/apps/home/frigate/helm-release.yaml b/cluster/apps/home/frigate/helm-release.yaml new file mode 100644 index 000000000..3012086c9 --- /dev/null +++ b/cluster/apps/home/frigate/helm-release.yaml @@ -0,0 +1,111 @@ +--- +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: frigate + namespace: home +spec: + interval: 5m + chart: + spec: + # renovate: registryUrl=https://blakeblackshear.github.io/blakeshome-charts/ + chart: frigate + version: 5.0.1 + sourceRef: + kind: HelmRepository + name: blakeshome-charts + namespace: flux-system + interval: 5m + values: + image: + repository: blakeblackshear/frigate + tag: 0.8.4-amd64 + coral: + enabled: true + shmSize: 2Gi + timezone: "Europe/Paris" + config: | + mqtt: + host: vernemq + topic_prefix: frigate + + database: + path: /data/frigate.db + + detectors: + coral: + type: edgetpu + device: usb + + objects: + track: + - person + - dog + - cat + filters: + person: + min_area: 2500 + max_area: 100000 + threshold: 0.7 + dog: + min_area: 1000 + max_area: 10000 + threshold: 0.7 + cat: + min_area: 1000 + max_area: 10000 + threshold: 0.7 + + ffmpeg: + hwaccel_args: + - -hwaccel + - vaapi + - -hwaccel_device + - /dev/dri/renderD128 + - -hwaccel_output_format + - yuv420p + + ingress: + enabled: true + annotations: + kubernetes.io/ingress.class: "nginx" + nginx.ingress.kubernetes.io/auth-url: "http://authelia.networking.svc.cluster.local/api/verify" + nginx.ingress.kubernetes.io/auth-signin: "https://login.${SECRET_CLUSTER_DOMAIN}/" + hosts: + - "frigate.${SECRET_CLUSTER_DOMAIN}" + tls: + - hosts: + - "frigate.${SECRET_CLUSTER_DOMAIN}" + persistence: + data: + enabled: true + existingClaim: frigate-config + mountPath: /data + extraVolumes: + - name: cache + emptyDir: + medium: Memory + extraVolumeMounts: + - name: cache + mountPath: /tmp/cache + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: feature.node.kubernetes.io/custom-coral-tpu + operator: In + values: + - "true" + - key: feature.node.kubernetes.io/custom-intel-gpu + operator: In + values: + - "true" + resources: + requests: + gpu.intel.com/i915: 1 + memory: 100Mi + cpu: 500m + limits: + gpu.intel.com/i915: 1 + memory: 2000Mi diff --git a/cluster/apps/home/frigate/kustomization.yaml b/cluster/apps/home/frigate/kustomization.yaml new file mode 100644 index 000000000..21f1d9e05 --- /dev/null +++ b/cluster/apps/home/frigate/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - helm-release.yaml + - volume.yaml diff --git a/cluster/apps/home/frigate/volume.yaml b/cluster/apps/home/frigate/volume.yaml new file mode 100644 index 000000000..6bd9bbc57 --- /dev/null +++ b/cluster/apps/home/frigate/volume.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: frigate-config + namespace: home + labels: + kasten-io-snapshots: "enable" +spec: + accessModes: + - ReadWriteOnce + storageClassName: rook-ceph-block + resources: + requests: + storage: 1Gi diff --git a/cluster/apps/home/kustomization.yaml b/cluster/apps/home/kustomization.yaml index 5ea233b62..915585525 100644 --- a/cluster/apps/home/kustomization.yaml +++ b/cluster/apps/home/kustomization.yaml @@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - esphome + - frigate - home-assistant - node-red - vernemq diff --git a/cluster/apps/media/jellyfin/helm-release.yaml b/cluster/apps/media/jellyfin/helm-release.yaml index c2c11a31c..673a84748 100644 --- a/cluster/apps/media/jellyfin/helm-release.yaml +++ b/cluster/apps/media/jellyfin/helm-release.yaml @@ -71,3 +71,14 @@ spec: tls: - hosts: - "jellyfin.${SECRET_CLUSTER_DOMAIN}" + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: feature.node.kubernetes.io/custom-coral-tpu + operator: In + values: + - "true" diff --git a/cluster/base-custom/charts/blakeshome-charts.yaml b/cluster/base-custom/charts/blakeshome-charts.yaml new file mode 100644 index 000000000..d99f1fcf8 --- /dev/null +++ b/cluster/base-custom/charts/blakeshome-charts.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: source.toolkit.fluxcd.io/v1beta1 +kind: HelmRepository +metadata: + name: blakeshome-charts + namespace: flux-system +spec: + interval: 10m + url: https://blakeblackshear.github.io/blakeshome-charts/ + timeout: 3m diff --git a/cluster/base-custom/charts/kustomization.yaml b/cluster/base-custom/charts/kustomization.yaml index 2e7e6bfc1..3f69a009f 100644 --- a/cluster/base-custom/charts/kustomization.yaml +++ b/cluster/base-custom/charts/kustomization.yaml @@ -3,6 +3,7 @@ kind: Kustomization resources: - banzaicloud-charts.yaml - bitnami-charts.yaml + - blakeshome-charts.yaml - cert-manager-webhook-ovh.yaml - coredns-charts.yaml - drone-charts.yaml diff --git a/cluster/core/infrastructure/node-feature-discovery/helm-release.yaml b/cluster/core/infrastructure/node-feature-discovery/helm-release.yaml index 7902a3687..8757f980a 100644 --- a/cluster/core/infrastructure/node-feature-discovery/helm-release.yaml +++ b/cluster/core/infrastructure/node-feature-discovery/helm-release.yaml @@ -65,12 +65,10 @@ spec: class: ["ff"] vendor: ["1a86"] device: ["7523"] - - name: "rflink" + - name: "coral-tpu" matchOn: - usbId: - class: ["02"] - vendor: ["2341"] - device: ["0042"] + vendor: ["1a6e", "18d1"] - name: "intel-gpu" matchOn: - pciId: