Skip to content

dekonnection/gandynamic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

gandynamic

A dirty script to push a DNS record pointing to your dynamic IPv4 IP, using Gandi's LiveDNS service.

Usable as a K8s job.

This is based on this script, with some refinements.

A full rewrite to a proper language is planned.

K8s cronjonb example

Push your Gandi API key in a K8s secret

kubectl create secret generic gandynamic --from-literal="API_KEY=<YOUR_GANDI_APIKEY>"

Cronjob manifest

apiVersion: batch/v1
kind: CronJob
metadata:
  name: gandynamic
spec:
  schedule: "*/10 * * * *"
  jobTemplate:
    spec:
      ttlSecondsAfterFinished: 600
      template:
        spec:
          containers:
          - name: gandynamic
            image: ghcr.io/dekonnection/gandynamic:latest
            imagePullPolicy: IfNotPresent
            envFrom:
              - configMapRef:
                  name: gandynamic
            env:
              - name: API_KEY
                valueFrom:
                  secretKeyRef:
                    name: gandynamic
                    key: API_KEY
          restartPolicy: OnFailure
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: gandynamic
data:
  DOMAIN: <your_domain>
  SUBDOMAIN: <your_dns_record>
  TTL: "600" # Gandi rejects TTLs lower than 300

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages