apiVersion: apps/v1
kind: Deployment
metadata:
  name: kubernetes-cloudflare-syncer
  labels:
    app: kubernetes-cloudflare-syncer
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kubernetes-cloudflare-syncer
  template:
    metadata:
      labels:
        app: kubernetes-cloudflare-syncer
    spec:
      serviceAccountName: kubernetes-cloudflare-syncer
      containers:
      - name: kubernetes-cloudflare-syncer
        image: ghcr.io/matts966/kubernetes-cloudflare-syncer/gcloud:latest
        args:
        - --dns-name=[[[kubernetes.example.com]]]
        - --project=[[[your-project]]]
        - --filter="status = RUNNING"
        env:
        - name: CF_API_KEY
          valueFrom:
            secretKeyRef:
              name: cloudflare
              key: api-key
        - name: CF_API_EMAIL
          valueFrom:
            secretKeyRef:
              name: cloudflare
              key: email
        - name: GOOGLE_APPLICATION_CREDENTIALS
          value: /var/secrets/google/gcp_credentials.json
        volumeMounts:
          - name: iplister-gcp-cred
            mountPath: /var/secrets/google
      volumes:
      - name: iplister-gcp-cred
        secret:
          secretName: iplister-gcp-cred
