apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: acmedns
  name: acmedns
spec:
  replicas: 1
  selector:
    matchLabels:
      app: acmedns
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: acmedns
    spec:
      containers:
        - image: docker.io/joohoi/acme-dns:v1.0
          name: acmedns
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 5353
              protocol: UDP
            - containerPort: 8080
              protocol: TCP
              name: api
          volumeMounts:
            - name: config
              mountPath: /etc/acme-dns
            - name: data
              mountPath: /var/lib/acme-dns
      volumes:
        - name: config
          configMap:
            name: acmedns-config
        - name: data
          persistentVolumeClaim:
            claimName: data
