This repository was archived by the owner on Sep 30, 2020. It is now read-only.
File tree 5 files changed +47
-4
lines changed
5 files changed +47
-4
lines changed Original file line number Diff line number Diff line change @@ -1212,7 +1212,7 @@ kubernetes:
1212
1212
selfHosting:
1213
1213
type: canal # either "canal" or "flannel"
1214
1214
typha: false # enable for type 'canal' for 50+ node clusters
1215
- # typhaResources: # control k8s resources assigned to Typha pods
1215
+ # typhaResources: # control k8s resources assigned to Typha pods
1216
1216
# requests:
1217
1217
# cpu: "100m"
1218
1218
# memory: "100Mi"
@@ -1342,7 +1342,7 @@ kubernetesDashboard:
1342
1342
kubeDns:
1343
1343
# Define which DNS provider to use (kube-dns or coredns), default coredns.
1344
1344
provider: coredns
1345
-
1345
+
1346
1346
# Defines resources for the CoreDNS Deployment. Ignored if using kubedns.
1347
1347
# dnsDeploymentResources:
1348
1348
# requests:
@@ -1375,9 +1375,17 @@ kubeDns:
1375
1375
coresPerReplica: 256
1376
1376
nodesPerReplica: 16
1377
1377
min: 2
1378
- # Allows to add extra configuration into CoreDNS config map
1378
+ # Allows addition of extra configuration into CoreDNS config map's root zone.
1379
1379
# extraCoreDNSConfig: |
1380
1380
# rewrite name substring demo.app.org app.default.svc.cluster.local
1381
+ # This configuration is injected into the CoreDNS config map after the root
1382
+ # zone (".") and can be used to add configuration for additional zones.
1383
+ # additionalZoneCoreDNSConfig: |
1384
+ # global:53 {
1385
+ # errors
1386
+ # cache 30
1387
+ # forward . 1.2.3.4:53
1388
+ # }
1381
1389
1382
1390
kubeProxy:
1383
1391
# Use IPVS kube-proxy mode instead of [default] iptables one (requires Kubernetes 1.9.0+ to work reliably)
Original file line number Diff line number Diff line change @@ -3904,6 +3904,9 @@ write_files:
3904
3904
reload
3905
3905
loadbalance
3906
3906
}
3907
+ {{- if and (eq .KubeDns.Provider "coredns") .KubeDns.AdditionalZoneCoreDNSConfig }}
3908
+ {{ .KubeDns.AdditionalZoneCoreDNSConfig }}
3909
+ {{- end }}
3907
3910
{{- else }}
3908
3911
- path: /srv/kubernetes/manifests/kube-dns-sa.yaml
3909
3912
content: |
Original file line number Diff line number Diff line change @@ -181,7 +181,8 @@ func NewDefaultCluster() *Cluster {
181
181
Cpu : "200m" ,
182
182
},
183
183
},
184
- ExtraCoreDNSConfig : "" ,
184
+ ExtraCoreDNSConfig : "" ,
185
+ AdditionalZoneCoreDNSConfig : "" ,
185
186
},
186
187
KubeSystemNamespaceLabels : make (map [string ]string ),
187
188
KubernetesDashboard : KubernetesDashboard {
Original file line number Diff line number Diff line change @@ -225,6 +225,7 @@ type KubeDns struct {
225
225
Autoscaler KubeDnsAutoscaler `yaml:"autoscaler"`
226
226
DnsDeploymentResources ComputeResources `yaml:"dnsDeploymentResources,omitempty"`
227
227
ExtraCoreDNSConfig string `yaml:"extraCoreDNSConfig"`
228
+ AdditionalZoneCoreDNSConfig string `yaml:"additionalZoneCoreDNSConfig"`
228
229
}
229
230
230
231
func (c * KubeDns ) MergeIfEmpty (other KubeDns ) {
Original file line number Diff line number Diff line change @@ -1382,6 +1382,36 @@ kubeDns:
1382
1382
ExtraCoreDNSConfig : "rewrite name substring demo.app.org app.default.svc.cluster.local" ,
1383
1383
},
1384
1384
},
1385
+ {
1386
+ conf : `
1387
+ kubeDns:
1388
+ provider: coredns
1389
+ additionalZoneCoreDNSConfig: global:53 { forward . 1.2.3.4 }
1390
+ ` ,
1391
+ kubeDns : api.KubeDns {
1392
+ Provider : "coredns" ,
1393
+ NodeLocalResolver : false ,
1394
+ DeployToControllers : false ,
1395
+ AntiAffinityAvailabilityZone : false ,
1396
+ TTL : 30 ,
1397
+ Autoscaler : api.KubeDnsAutoscaler {
1398
+ CoresPerReplica : 256 ,
1399
+ NodesPerReplica : 16 ,
1400
+ Min : 2 ,
1401
+ },
1402
+ DnsDeploymentResources : api.ComputeResources {
1403
+ Requests : api.ResourceQuota {
1404
+ Memory : "70Mi" ,
1405
+ Cpu : "100m" ,
1406
+ },
1407
+ Limits : api.ResourceQuota {
1408
+ Memory : "170Mi" ,
1409
+ Cpu : "200m" ,
1410
+ },
1411
+ },
1412
+ AdditionalZoneCoreDNSConfig : "global:53 { forward . 1.2.3.4 }" ,
1413
+ },
1414
+ },
1385
1415
}
1386
1416
1387
1417
for _ , conf := range validConfigs {
You can’t perform that action at this time.
0 commit comments