apiVersion: apps/v1
kind: Deployment
metadata:
  name: scheduler
spec:
  replicas: 2
  selector:
    matchLabels:
      app: scheduler
  template:
    metadata:
      labels:
        app: scheduler
    spec:
      containers:
      - name: scheduler
        image: akorn/scheduler
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 8080
        env:
        - name: PGHOST
          value: scheduler-db
        - name: PGDATABASE
          value: postgres
        - name: PGUSER
          value: postgres
        - name: PGPASSWORD
          value: ''
        - name: PGSSLMODE
          value: disable
        resources:
          requests:
            cpu: 100m
            memory: 16Mi
          limits:
            cpu: 200m
            memory: 24Mi
        readinessProbe:
          initialDelaySeconds: 10
          httpGet:
            port: 8080
            path: /health
        livenessProbe:
          initialDelaySeconds: 10
          httpGet:
            port: 8080
            path: /health
