apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: default
  labels:
    service: dnscrypt
  name: dnscrypt
spec:
  strategy:
    type: Recreate
  replicas: 1
  selector:
    matchLabels:
      service: dnscrypt
  template:
    metadata:
      labels:
        service: dnscrypt
    spec:
      containers:
      - image: zquestz/dnscrypt-server:latest
        imagePullPolicy: Always
        name: dnscrypt
        ports:
        - containerPort: 5443
          protocol: UDP
        - containerPort: 5443
          protocol: TCP
        volumeMounts:
          - name: dnscrypt-keys
            mountPath: /opt/encrypted-dns/etc/keys
        command: ["/entrypoint.sh", "start"]
        resources:
          requests:
            memory: "64Mi"
      restartPolicy: Always
      volumes:
        - name: dnscrypt-keys
          gcePersistentDisk:
            pdName: dnscrypt-keys
            fsType: ext4
