Strato DynDNS Controller updates your domains' DNS records on STRATO AG using Kubernetes Custom Resources and Controller
THIS SOFTWARE IS IN NO WAY ASSOCIATED OR AFFILIATED WITH STRATO AG
A custom Controller is observing Domain CRs and syncing their desired state with STRATO DNS servers. You can either define explicitely an IPv4 address (Manual mode) or let the Controller discover you public IPv4 assigned to you by your ISP (Dynamic mode)
You’ll need a Kubernetes cluster to run against. You can use KIND or K3D to get a local cluster for testing, or run against a remote cluster.
Note: Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster kubectl cluster-info
shows).
- Build and push your image to the location specified by
IMG
inMakefile
:
# Image URL to use all building/pushing image targets
IMG_TAG ?= $(shell git rev-parse --short HEAD)
IMG_NAME ?= strato-dyndns
DOCKER_HUB_NAME ?= $(shell docker info | sed '/Username:/!d;s/.* //')
IMG ?= $(DOCKER_HUB_NAME)/$(IMG_NAME):$(IMG_TAG)
make docker-build docker-push
- Deploy the controller to the cluster with the image using
IMG
:
make deploy
or
- Deploy the controller to the cluster with the image using Helm chart:
helm install strato-dyndns config/helm/
- Install Instances of Custom Resources:
Encode your STRATO DynDNS password for your domain or your STRATO DynDNS master password:
echo -n "password" | base64
Create a Secret containing the base64 encoded password for your Domain:
apiVersion: v1
kind: Secret
metadata:
name: strato-dyndns-password
type: Opaque
data:
password: cGFzc3dvcmQ=
Create a Domain pointing to the FQDN of your domain registered with STRATO and bind it with the Secret containing the password for this DynDNS account:
apiVersion: dyndns.contrib.strato.com/v1alpha1
kind: Domain
metadata:
name: www-example-de
spec:
fqdn: "www.example.de"
enabled: true
interval: 5
password:
name: strato-dyndns-password
Deploy these resources to your Kubernetes cluster:
kubectl apply -f config/samples/
To delete the CRDs from the cluster:
make uninstall
UnDeploy the controller to the cluster:
make undeploy
or if you have installed via Helm:
helm uninstall strato-dyndns
Please refer to our Contributing Guidelines
This project aims to follow the Kubernetes Operator pattern
It uses Controllers which provides a reconcile function responsible for synchronizing resources untile the desired state is reached on the cluster
- Install the CRDs into the cluster:
make install
- Run your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):
make run
NOTE: You can also run this in one step by running: make install run
If you are editing the API definitions, generate the manifests such as CRs or CRDs using:
make manifests
NOTE: Run make --help
for more information on all potential make
targets
More information can be found via the Kubebuilder Documentation