apiVersion: apps/v1
kind: Deployment
metadata:
  name: ddns-badges
  namespace: home-apps
spec:
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      app: ddns-badges
  replicas: 1
  template:
    metadata:
      labels:
        app: ddns-badges
    spec:
      # k create secret generic cloudflare-toozhao-com -n home-apps --from-literal=api-key=xxx
      containers:
        - name: ddns-toozhao-com
          image: mirror.gcr.io/oznu/cloudflare-ddns
          env:
            - name: API_KEY
              valueFrom:
                secretKeyRef:
                  name: cloudflare-toozhao-com
                  key: api-key
            - name: ZONE
              value: toozhao.com
            - name: SUBDOMAIN
              value: "badges"
            - name: INTERVAL
              value: "60s"
          resources:
            requests:
              cpu: 20m
              memory: 64Mi
            limits:
              cpu: 100m
              memory: 128Mi

---

apiVersion: apps/v1
kind: Deployment
metadata:
  name: ddns-junv-cc
  namespace: home-apps
spec:
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      app: ddns-junv-cc
  replicas: 1
  template:
    metadata:
      labels:
        app: ddns-junv-cc
    spec:
      containers:
        - name: ddns-junv-cc
          image: mirror.gcr.io/oznu/cloudflare-ddns
          env:
            - name: API_KEY
              valueFrom:
                secretKeyRef:
                  name: cloudflare-toozhao-com
                  key: api-key
            - name: ZONE
              value: junv.cc
            - name: SUBDOMAIN
              value: "*"
            - name: INTERVAL
              value: "60s"
          resources:
            requests:
              cpu: 20m
              memory: 64Mi
            limits:
              cpu: 100m
              memory: 128Mi
