-
Notifications
You must be signed in to change notification settings - Fork 4
/
ddns-k8s-deployment.yml
46 lines (45 loc) · 1.19 KB
/
ddns-k8s-deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Kubernetes deployment file for Google DDNS Updater
# Creates secrets which are accessed as environment variables
# within a pod, launched (hourly) as a Kubernetes CronJob
# Secrets:
apiVersion: v1
kind: Secret
metadata:
name: googddnssecret
type: Opaque
stringData:
hostname: CHANGEME
username: CHANGEME
password: CHANGEME
---
# CronJob Definition:
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: google-ddns-updater
spec:
schedule: "@hourly"
jobTemplate:
spec:
template:
spec:
containers:
- name: google-ddns-updater
image: ghcr.io/clayshek/google-ddns-updater
env:
- name: GOOG_DDNS_HOSTNAME
valueFrom:
secretKeyRef:
name: googddnssecret
key: hostname
- name: GOOG_DDNS_USERNAME
valueFrom:
secretKeyRef:
name: googddnssecret
key: username
- name: GOOG_DDNS_PASSWORD
valueFrom:
secretKeyRef:
name: googddnssecret
key: password
restartPolicy: OnFailure