apiVersion: apps/v1
kind: Deployment
metadata:
  name: external-dns
  namespace: ethereum-2
  labels:
    app.kubernetes.io/name: external-dns
    app.kubernetes.io/version: v0.7.6
spec:
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/name: external-dns
  template:
    metadata:
      labels:
        app.kubernetes.io/name: external-dns
        app.kubernetes.io/version: v0.7.6
    spec:
      serviceAccountName: external-dns
      containers:
      - name: external-dns
        image: k8s.gcr.io/external-dns/external-dns:v0.7.6
        args:
        - --source=node
        - --fqdn-template=ethereum-2.allyoucanstake.com
        - --provider=google
        - --policy=sync
        - --registry=txt
        - --txt-owner-id=kubernetes.io/cluster/ethereum-2
        - --interval=5m
        ports:
        - name: metrics
          containerPort: 7979
        readinessProbe:
          httpGet:
            path: /healthz
            port: metrics
          failureThreshold: 5
          initialDelaySeconds: 5
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 10
        livenessProbe:
          httpGet:
            path: /healthz
            port: metrics
          failureThreshold: 5
          initialDelaySeconds: 5
          periodSeconds: 60
          successThreshold: 1
          timeoutSeconds: 30
        resources:
          requests:
            cpu: 10m
            memory: 16Mi
          limits:
            cpu: 50m
            memory: 64Mi
        securityContext:
          runAsNonRoot: true
          runAsUser: 65534
          readOnlyRootFilesystem: true
          capabilities:
            drop: ["ALL"]
