apiVersion: apps/v1
kind: Deployment
metadata:
  name: docker-wyze-bridge 
  namespace: home
  labels:
    app.kubernetes.io/name: docker-wyze-bridge 
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: docker-wyze-bridge 
  template:
    metadata:
      labels:
        app.kubernetes.io/name: docker-wyze-bridge 
    spec:
      containers:
        - name: docker-wyze-bridge
          image: mrlt8/wyze-bridge:latest
          imagePullPolicy: IfNotPresent
          resources:
            requests:
              cpu: 250m
              memory: 500Mi
          ports:
            - name: rtmp-port
              protocol: TCP
              containerPort: 1935
            - name: rtsp-port
              protocol: TCP
              containerPort: 8554
            - name: hls-port
              protocol: TCP
              containerPort: 8888
          startupProbe:
            tcpSocket:
              port: rtsp-port
            initialDelaySeconds: 0
            timeoutSeconds: 1
            periodSeconds: 5
            successThreshold: 1
            failureThreshold: 30
          livenessProbe:
            tcpSocket:
              port: rtsp-port
            initialDelaySeconds: 0
            timeoutSeconds: 1
            periodSeconds: 10
            successThreshold: 1
            failureThreshold: 3
          readinessProbe:
            tcpSocket:
              port: rtsp-port
            initialDelaySeconds: 0
            timeoutSeconds: 1
            periodSeconds: 10
            successThreshold: 1
            failureThreshold: 3
          env:
            - name: WYZE_EMAIL
              value: "${WYZE_EMAIL}"
            - name: WYZE_PASSWORD
              value: "${WYZE_PASSWORD}"
            - name: NET_MODE
              value: P2P
