use octodns
This commit is contained in:
		
							
								
								
									
										52
									
								
								infrastructure/external-dns/cronjob.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								infrastructure/external-dns/cronjob.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,52 @@ | ||||
| apiVersion: batch/v1beta1 | ||||
| kind: CronJob | ||||
| metadata: | ||||
|   name: octodns-deployment | ||||
| spec: | ||||
|   schedule: "*/1 * * * *" | ||||
|   jobTemplate: | ||||
|     spec: | ||||
|       template: | ||||
|         spec: | ||||
|           containers: | ||||
|             - name: git | ||||
|               image: alpine/git | ||||
|               command: ["git"] | ||||
|               args: | ||||
|                 - clone | ||||
|                 - https://git.kluster.moll.re/remoll/dns.git | ||||
|                 - /etc/octodns/dns | ||||
|               volumeMounts: | ||||
|                 - name: octodns-config | ||||
|                   mountPath: /etc/octodns | ||||
|  | ||||
|             - name: octodns | ||||
|               image: octodns | ||||
|               env: | ||||
|                 - name: CLOUDFLARE_ACCOUNT_ID | ||||
|                   valueFrom: | ||||
|                     secretKeyRef: | ||||
|                       name: cloudflare-api | ||||
|                       key: CLOUDFLARE_ACCOUNT_ID | ||||
|                 - name: CLOUDFLARE_API_TOKEN | ||||
|                   valueFrom: | ||||
|                     secretKeyRef: | ||||
|                       name: cloudflare-api | ||||
|                       key: CLOUDFLARE_API_TOKEN | ||||
|                 - name: CLOUDFLARE_EMAIL | ||||
|                   valueFrom: | ||||
|                     secretKeyRef: | ||||
|                       name: cloudflare-api | ||||
|                       key: CLOUDFLARE_EMAIL | ||||
|  | ||||
|               command: ["octodns-sync"] | ||||
|               args: | ||||
|                 - octodns-sync --config-file /etc/octodns/config.yaml # --doit | ||||
|               volumeMounts: | ||||
|                 - name: octodns-config | ||||
|                   mountPath: /etc/octodns | ||||
|  | ||||
|           volumes: | ||||
|           - name: octodns-config | ||||
|             emptyDir: {} | ||||
|           restartPolicy: Never | ||||
		Reference in New Issue
	
	Block a user