mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
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: Thorsten Klein <iwilltry42@gmail.com>
This commit is contained in:
parent
4b57951fb0
commit
41ff19de71
@ -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
|
||||
|
@ -1,3 +1,4 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user