Add test dns

This commit is contained in:
Ruben Hensen
2026-03-14 21:41:41 +01:00
parent 72e0ba8cce
commit bc2f75294d
2 changed files with 57 additions and 56 deletions
+53 -56
View File
@@ -1,64 +1,61 @@
apiVersion: batch/v1 apiVersion: batch/v1
kind: CronJob kind: Job
metadata: metadata:
name: dns-sync name: dns-sync
annotations:
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
spec: spec:
schedule: "*/5 * * * *" backoffLimit: 1
concurrencyPolicy: Forbid template:
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 3
jobTemplate:
spec: spec:
backoffLimit: 1 serviceAccountName: dns-sync
template: restartPolicy: Never
spec: containers:
serviceAccountName: dns-sync - name: sync
restartPolicy: Never image: python:3.12-alpine
containers: command:
- name: sync - sh
image: python:3.12-alpine - -c
command: - |
- sh pip install --quiet cryptography requests pyyaml &&
- -c python /config/sync.py
- | env:
pip install --quiet cryptography requests pyyaml && - name: TRANSIP_ACCOUNT_NAME
python /config/sync.py valueFrom:
env: secretKeyRef:
- name: TRANSIP_ACCOUNT_NAME name: transip-credentials
valueFrom: key: account_name
secretKeyRef: - name: TRANSIP_PRIVATE_KEY_PATH
name: transip-credentials value: /secrets/private_key
key: account_name volumeMounts:
- name: TRANSIP_PRIVATE_KEY_PATH
value: /secrets/private_key
volumeMounts:
- name: secrets
mountPath: /secrets
readOnly: true
- name: script
mountPath: /config/sync.py
subPath: sync.py
readOnly: true
- name: domains
mountPath: /config/domains
readOnly: true
resources:
requests:
memory: "128Mi"
cpu: "50m"
limits:
memory: "256Mi"
cpu: "200m"
volumes:
- name: secrets - name: secrets
secret: mountPath: /secrets
secretName: transip-credentials readOnly: true
items:
- key: private_key
path: private_key
- name: script - name: script
configMap: mountPath: /config/sync.py
name: dns-sync-script subPath: sync.py
readOnly: true
- name: domains - name: domains
configMap: mountPath: /config/domains
name: dns-domains readOnly: true
resources:
requests:
memory: "128Mi"
cpu: "50m"
limits:
memory: "256Mi"
cpu: "200m"
volumes:
- name: secrets
secret:
secretName: transip-credentials
items:
- key: private_key
path: private_key
- name: script
configMap:
name: dns-sync-script
- name: domains
configMap:
name: dns-domains
+4
View File
@@ -15,3 +15,7 @@ records:
expire: 86400 expire: 86400
type: CNAME type: CNAME
content: "@" content: "@"
- name: "test"
expire: 86400
type: CNAME
content: "@"