diff --git a/cfddns/k8s/.gitignore b/cfddns/k8s/.gitignore new file mode 100644 index 0000000..4a424df --- /dev/null +++ b/cfddns/k8s/.gitignore @@ -0,0 +1 @@ +secret.yaml diff --git a/cfddns/k8s/deployment.yaml b/cfddns/k8s/deployment.yaml new file mode 100644 index 0000000..e0015d8 --- /dev/null +++ b/cfddns/k8s/deployment.yaml @@ -0,0 +1,32 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cfddns + labels: + app: cfddns +spec: + replicas: 1 + selector: + matchLabels: + app: cfddns + template: + metadata: + labels: + app: cfddns + spec: + hostNetwork: true + dnsPolicy: ClusterFirstWithHostNet + containers: + - name: cloudflare-ddns + image: timothyjmiller/cloudflare-ddns:latest + imagePullPolicy: Always + resources: + requests: + memory: "32Mi" + cpu: "50m" + limits: + memory: "64Mi" + cpu: "100m" + envFrom: + - secretRef: + name: cfddns-secrets diff --git a/cfddns/k8s/secret.yaml.example b/cfddns/k8s/secret.yaml.example new file mode 100644 index 0000000..da84b0b --- /dev/null +++ b/cfddns/k8s/secret.yaml.example @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Secret +metadata: + name: cfddns-secrets +type: Opaque +stringData: + CLOUDFLARE_API_TOKEN: your_token + DOMAINS: "example.com,www.example.com" + IP4_PROVIDER: cloudflare.trace + IP6_PROVIDER: none + UPDATE_CRON: "@every 5m" + UPDATE_ON_START: "true" + DELETE_ON_STOP: "false" + DELETE_ON_FAILURE: "true" + TTL: "1" + PROXIED: "true" + EMOJI: "true" + REJECT_CLOUDFLARE_IPS: "true"