view deploy.yaml @ 27:32cfefe3155b

try harder to crash if there's an mqtt error, so k8s does a full restart
author drewp@bigasterisk.com
date Sat, 23 Mar 2024 15:25:02 -0700
parents 5a77696c6dab
children
line wrap: on
line source

apiVersion: apps/v1
kind: Deployment
metadata:
  name: light-bridge
spec:
  replicas: 1
  selector:
    matchLabels:
      app: light-bridge
  template:
    metadata:
      labels:
        app: light-bridge
    spec:

      volumes:
        - name: nginx-conf
          configMap:
            name: light-bridge-nginx-conf
      containers:
        - name: proxy
          image: docker.io/nginx:1.21.6
          ports:
            - containerPort: 80
          volumeMounts:
            - { name: nginx-conf, mountPath: "/etc/nginx/" }
        - name: light-bridge-vite
          image: reg:5000/light_bridge_image
          ports:
            - containerPort: 8002
          command:
            - pnpm
            - exec
            - vite
            - --port=8002
        - name: light-bridge-py
          image: reg:5000/light_bridge_image
          ports:
            - containerPort: 8001
          command:
          - pdm
          - run
          - python
          - light_bridge.py
---
apiVersion: v1
kind: Service
metadata:
  name: light-bridge
spec:
  ports:
  - {port: 80, targetPort: 80}
  selector:
    app: light-bridge