apiVersion: apps/v1
kind: Deployment
metadata:
  name: stator
  labels:
    app.kubernetes.io/name: takahe
    app.kubernetes.io/component: stator
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: takahe
      app.kubernetes.io/component: stator
  replicas: 1
  template:
    metadata:
      labels:
        app.kubernetes.io/name: takahe
        app.kubernetes.io/component: stator
    spec:
      containers:
        - name: stator
          image: jointakahe/takahe:0.8.0
          args:
            - python3
            - manage.py
            - runstator
          env:
            - name: PGPASSWORD
              valueFrom:
                secretKeyRef:
                  name: postgresql-creds
                  key: USER_PASSWORD
          envFrom:
            - configMapRef:
                name: takahe-config
            - secretRef:
                name: takahe-secrets
          resources:
            limits:
              memory: "1024Mi"
              cpu: 1