apiVersion: apps/v1
kind: Deployment
metadata:
  name: home-dns
  labels:
    k8s-app: home-dns
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: home-dns
  template:
    metadata:
      labels:
        k8s-app: home-dns
    spec:
      containers:
        - name: home-dns
          image: ssube/home-dns:{{ secrets.home_dns.tag }}
          imagePullPolicy: Always
          command:
            - /app/home-dns
          args:
            - /config/home.yml

          volumeMounts:
            - name: config
              mountPath: /config
              readOnly: true
            - name: creds
              mountPath: "/root/.aws"
              readOnly: true

      nodeSelector:
        node-role.kubernetes.io/server: ""
      
      volumes:
        - name: config
          configMap:
            name: home-dns
        - name: creds
          secret:
            secretName: home-dns-creds