Skip to content

ccordoui/container-gandi-ddns

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gandi Dynamic DNS

Dynamic DNS Update Client for Gandi's LiveDNS.

Install

Docker Hub

Pull the latest image from Quay:

podman pull quay.io/ccordoui/container-gandi-ddns

Build From Source

Clone this repository, and run buildah bud -t container-gandi-ddns . to build an image:

git clone https://github.com/ccordoui/container-gandi-ddns.git
cd container-gandi-ddns
buildah bud -t container-gandi-ddns .

Run

Configuration

Configuration is accomplished through the use of environment variables.

# cm.yaml
--- 
apiVersion: v1
kind: ConfigMap
metadata:
  name: game-demo
data:
  GANDI_DOMAIN: "example.com"
  GANDI_RECORD: "www"
---
# secrets.yaml
apiVersion: v1
kind: Secret
metadata:
  name: gandi-ddns
data:
  GANDI_TOKEN: "My Secret Token"

Data

It is better to keep the cache in a PV, you just have to mount it in the data folder

Run

Deploy a crontab in kubernetes:

---
# cronjob.yaml
apiVersion: batch/v1
kind: CronJob
metadata:
  name: gandi-ddns
spec:
  schedule: "*/15 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: gandi-ddns
            image: quay.io/ccordoui/container-gandi-ddns:stable
            imagePullPolicy: Always
            concurrencyPolicy: Replace
            restartPolicy: Never
            command:
            - python3
            - gandi-ddns.py
          restartPolicy: OnFailure
          envFrom:
            - configMapRef:
                name: gandi-ddns
            - secretRef:
                name: gandi-ddns

Environment Variables

Variable Default Description
CACHE_PATH data The base path for the ip cache (should be on PV)
GANDI_URL https://dns.api.gandi.net/api/v5 URL of the Gandi API.
GANDI_TOKEN - API Key for your Gandi.net account
GANDI_DOMAIN - Your Gandi.net domain name
GANDI_RECORD @ Record to update with your IP address
GANDI_TTL 300 TTL of the entry
PROTOCOLS ipv4,ipv6 What need to be updated (can be ipv4, ipv6 or ipv4,ipv6

License

The content of this project itself is licensed under the MIT License.

About

Dynamic DNS Update Client for Gandi's LiveDNS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 72.5%
  • Shell 14.4%
  • Dockerfile 13.1%