diff --git a/frigate/README.md b/frigate/README.md index b71ad22..5f8a0c3 100644 --- a/frigate/README.md +++ b/frigate/README.md @@ -14,3 +14,7 @@ kustomize build . --enable-helm - Amcrest 5MP Turret PoE Outdoor IP Camera with Mic/Audio, 98ft NightVision, 132° FOV, MicroSD (256GB) IP5M-T1179EW-AI-V3 white Cameras are enumerated (with credentials) in secretspace. + +## Coral setup +1. Map USB to VM (#TODO: blog post coming up for exact steps) +2. `k label no worker91.kube.k-space.ee coral.ai/tpu=Exists` diff --git a/frigate/kustomization.yaml b/frigate/kustomization.yaml index 5512419..8c69a8b 100644 --- a/frigate/kustomization.yaml +++ b/frigate/kustomization.yaml @@ -16,5 +16,4 @@ resources: - ssh://git@git.k-space.ee/secretspace/kube/frigate # secrets (.env): go2rtc-config, frigate-mqtt-secret, frigate-rtsp-secret - ./auth.yml - ./rabbitmq.yml -- ./storage.yml - ./transcode.yml diff --git a/frigate/storage.yml b/frigate/storage.yml deleted file mode 100644 index a9f3c63..0000000 --- a/frigate/storage.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolume -metadata: - name: frigate-storage -spec: - persistentVolumeReclaimPolicy: Retain - capacity: - storage: 1Ti - accessModes: - - ReadWriteMany - storageClassName: "" - nfs: - server: 172.21.0.7 - path: /nas/k6/frigate - mountOptions: - - vers=4 - - minorversion=1 - - noac ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: frigate-storage -spec: - volumeName: frigate-storage - storageClassName: "" - accessModes: - - ReadWriteMany - resources: - requests: - storage: 1Ti diff --git a/frigate/transcode.yml b/frigate/transcode.yml index cc27448..e75dcd9 100644 --- a/frigate/transcode.yml +++ b/frigate/transcode.yml @@ -29,13 +29,6 @@ spec: values: - go2rtc topologyKey: "kubernetes.io/hostname" - nodeSelector: - dedicated: nvr - tolerations: - - key: dedicated - operator: Equal - value: nvr - effect: NoSchedule containers: - name: go2rtc image: alexxit/go2rtc diff --git a/frigate/values.yaml b/frigate/values.yaml index f2c5d89..0b0da69 100644 --- a/frigate/values.yaml +++ b/frigate/values.yaml @@ -125,24 +125,16 @@ ingress: - "*.k-space.ee" persistence: - config: - # WIP :) - enabled: false - storageClass: "null" - accessMode: ReadWriteOnce - size: 1000Mi - skipuninstall: false - media: enabled: true - existingClaim: "frigate-storage" - skipuninstall: true + storageClass: "hdd-ceph" + size: 1Ti # Force application to run on nvr node nodeSelector: - dedicated: nvr + coral.ai/tpu: Exists tolerations: - - key: dedicated + - key: coral.ai/tpu operator: Equal - value: nvr + value: Exists effect: NoSchedule diff --git a/storage-class.yaml b/storage-class.yaml index 25ad317..61c919c 100644 --- a/storage-class.yaml +++ b/storage-class.yaml @@ -114,6 +114,30 @@ volumeBindingMode: WaitForFirstConsumer --- apiVersion: storage.k8s.io/v1 kind: StorageClass +metadata: + name: hdd-ceph + annotations: + kubernetes.io/description: | + Generic HDD storage on CEPH. +provisioner: rook-ceph.rbd.csi.ceph.com +parameters: + clusterID: rook-ceph + csi.storage.k8s.io/controller-expand-secret-name: rook-csi-rbd-provisioner + csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph + csi.storage.k8s.io/fstype: xfs + csi.storage.k8s.io/node-stage-secret-name: rook-csi-rbd-node + csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph + csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner + csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph + imageFeatures: layering + imageFormat: '2' + pool: ks-hdd +reclaimPolicy: Retain +allowVolumeExpansion: true +volumeBindingMode: WaitForFirstConsumer +--- +apiVersion: storage.k8s.io/v1 +kind: StorageClass metadata: name: "null" annotations: