view deploy.yaml @ 59:1f8e66cb0108

deployment
author drewp@bigasterisk.com
date Fri, 06 Sep 2024 16:37:04 -0700
parents cb990883e52f
children 84141ef00bd7
line wrap: on
line source

apiVersion: apps/v1
kind: Deployment
metadata:
  name: gcalendarwatch
spec:
  replicas: 1
  selector:
    matchLabels:
      app: gcalendarwatch
  template:
    metadata:
      labels:
        app: gcalendarwatch
    spec:
      containers:
        - name: gcalendarwatch
          image: reg:5000/gcalendarwatch_image
          ports:
            - containerPort: 8000
          command:
          - pdm
          - run
          - uvicorn
          - '--port=8000'
          - '--host=0.0.0.0'
          - 'gcalendarwatch:app'
        - name: calsync
          image: reg:5000/gcalendarwatch_calsync_image
          ports:
            - containerPort: 8080
          command:
          - /opt/calsync
---
apiVersion: v1
kind: Service
metadata:
  name: gcalendarwatch
spec:
  ports:
  - {port: 80, targetPort: 8000, name: metrics}
  - {port: 8080, targetPort: 8080, name: calsync}
  selector:
    app: gcalendarwatch