---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: age-api
  namespace: age-api
spec:
  replicas: 1
  selector:
    matchLabels:
      app: age-api
  template:
    metadata:
      annotations:
        configmap.reloader.stakater.com/auto: "true"
      labels:
        app: age-api
    spec:
      containers:
        - name: age-api
          image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/age-api:v0.1.0
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 8080
              name: http
              protocol: TCP
          env:
            - name: CONFIG_PATH
              value: /etc/age-api/config.yaml
          resources:
            limits:
              cpu: 100m
              memory: 64Mi
            requests:
              cpu: 10m
              memory: 32Mi
          volumeMounts:
            - mountPath: /etc/age-api/config.yaml
              name: config
              subPath: config.yaml
      restartPolicy: Always
      volumes:
        - name: config
          configMap:
            name: age-api-config
