From 60fb514ee10b8342d3c44df76745afb6823c866a Mon Sep 17 00:00:00 2001 From: Ariel Sosnovsky Date: Tue, 7 Nov 2023 16:01:41 -0500 Subject: [PATCH] tweaking resources --- k8s/apps/frigate/templates/loadbalancer.yaml | 65 ++++++++++++++++++++ k8s/apps/frigate/templates/nodeport.yaml | 44 +------------ k8s/apps/frigate/values.yaml | 6 +- k8s/apps/videohosting/values.yaml | 14 ++--- 4 files changed, 78 insertions(+), 51 deletions(-) create mode 100644 k8s/apps/frigate/templates/loadbalancer.yaml diff --git a/k8s/apps/frigate/templates/loadbalancer.yaml b/k8s/apps/frigate/templates/loadbalancer.yaml new file mode 100644 index 0000000..060bc7e --- /dev/null +++ b/k8s/apps/frigate/templates/loadbalancer.yaml @@ -0,0 +1,65 @@ +--- +kind: Service +apiVersion: v1 +metadata: + name: frigate-nodeport +spec: + selector: + homelab/app: frigate + type: NodePort + ports: + - port: 1984 + nodePort: 30001 + targetPort: 1984 + name: go2rtc + protocol: TCP + - port: 5000 + nodePort: 30000 + targetPort: 5000 + name: http + protocol: TCP + - port: 8554 + nodePort: 30554 + targetPort: 8554 + name: rtsp + protocol: TCP + - port: 8555 + nodePort: 30555 + targetPort: 8555 + name: webrtc-tcp + protocol: TCP + - port: 8555 + nodePort: 30555 + targetPort: 8555 + name: webrtc-udp + protocol: UDP +--- +kind: Service +apiVersion: v1 +metadata: + name: go2rtc-nodeport +spec: + selector: + homelab/app: go2rtc + type: NodePort + ports: + - port: 8554 + targetPort: 8554 + nodePort: 31054 + name: rtsp + protocol: TCP + - port: 8555 + targetPort: 8555 + nodePort: 31055 + name: webrtc-tcp + protocol: TCP + - port: 8555 + targetPort: 8555 + nodePort: 31055 + name: webrtc-udp + protocol: UDP + - port: 80 + targetPort: 1984 + nodePort: 31084 + name: http + protocol: TCP diff --git a/k8s/apps/frigate/templates/nodeport.yaml b/k8s/apps/frigate/templates/nodeport.yaml index 060bc7e..996a1e8 100644 --- a/k8s/apps/frigate/templates/nodeport.yaml +++ b/k8s/apps/frigate/templates/nodeport.yaml @@ -2,55 +2,18 @@ kind: Service apiVersion: v1 metadata: - name: frigate-nodeport -spec: - selector: - homelab/app: frigate - type: NodePort - ports: - - port: 1984 - nodePort: 30001 - targetPort: 1984 - name: go2rtc - protocol: TCP - - port: 5000 - nodePort: 30000 - targetPort: 5000 - name: http - protocol: TCP - - port: 8554 - nodePort: 30554 - targetPort: 8554 - name: rtsp - protocol: TCP - - port: 8555 - nodePort: 30555 - targetPort: 8555 - name: webrtc-tcp - protocol: TCP - - port: 8555 - nodePort: 30555 - targetPort: 8555 - name: webrtc-udp - protocol: UDP ---- -kind: Service -apiVersion: v1 -metadata: - name: go2rtc-nodeport + name: go2rtc-lb spec: selector: homelab/app: go2rtc - type: NodePort + type: LoadBalancer ports: - port: 8554 targetPort: 8554 - nodePort: 31054 name: rtsp protocol: TCP - port: 8555 targetPort: 8555 - nodePort: 31055 name: webrtc-tcp protocol: TCP - port: 8555 @@ -58,8 +21,7 @@ spec: nodePort: 31055 name: webrtc-udp protocol: UDP - - port: 80 + - port: 1984 targetPort: 1984 - nodePort: 31084 name: http protocol: TCP diff --git a/k8s/apps/frigate/values.yaml b/k8s/apps/frigate/values.yaml index 26ea1e0..ac11fa2 100644 --- a/k8s/apps/frigate/values.yaml +++ b/k8s/apps/frigate/values.yaml @@ -25,15 +25,15 @@ coral: resources: frigate: requests: - memory: "1Gi" - cpu: "3" + memory: "4Gi" + cpu: "2" limits: memory: "4Gi" cpu: "3" go2rtc: requests: memory: "100Mi" - cpu: "100m" + cpu: "500m" limits: memory: "500Mi" cpu: "1" diff --git a/k8s/apps/videohosting/values.yaml b/k8s/apps/videohosting/values.yaml index b036e06..3dd632f 100644 --- a/k8s/apps/videohosting/values.yaml +++ b/k8s/apps/videohosting/values.yaml @@ -15,7 +15,7 @@ linuxserverServices: tag: "latest" podResources: limits: - cpu: 1 + cpu: 2 memory: "2Gi" requests: cpu: 250m @@ -33,7 +33,7 @@ linuxserverServices: tag: "latest" podResources: limits: - cpu: 1 + cpu: 2 memory: "2Gi" requests: cpu: 250m @@ -53,8 +53,8 @@ linuxserverServices: AUTO_UPDATE: "true" podResources: limits: - cpu: 1 - memory: "2Gi" + cpu: 250m + memory: "500M" requests: cpu: 250m memory: "500M" @@ -77,11 +77,11 @@ linuxserverServices: 6881: 6881 podResources: limits: - cpu: 1 - memory: "4Gi" + cpu: 2 + memory: "8Gi" requests: cpu: 800m - memory: "1.5Gi" + memory: "4Gi" configVolumesResources: requests: storage: 10Gi