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

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