Commit 41ff19de authored by Thorsten Klein's avatar Thorsten Klein Committed by Brad Davidson

Feature: Add CoreDNS Customization Options

Problem: Before, to customize CoreDNS, one had to edit the default configmap, which gets re-written on every K3s server restart. Solution: Mount an additional coredns-custom configmap into the CoreDNS container and import overrides and additional server blocks from the included files. Signed-off-by: 's avatarThorsten Klein <iwilltry42@gmail.com>
parent 4b57951f
......@@ -73,6 +73,7 @@ data:
reload
loadbalance
}
import /etc/coredns/custom/*.server
---
apiVersion: apps/v1
kind: Deployment
......@@ -131,6 +132,9 @@ spec:
- name: config-volume
mountPath: /etc/coredns
readOnly: true
- name: custom-config-volume
mountPath: /etc/coredns/custom
readOnly: true
ports:
- containerPort: 53
name: dns
......@@ -179,6 +183,10 @@ spec:
path: Corefile
- key: NodeHosts
path: NodeHosts
- name: custom-config-volume
configMap:
name: coredns-custom
optional: true
---
apiVersion: v1
kind: Service
......
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment