01d7d57fb58dd24071cae1698787e3c0ba1f9e28
[yaml_builds.git] / site / dellgen10 / software / charts / kubernetes / dns / coredns.yaml
1 ---
2 ##############################################################################
3 # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.        #
4 #                                                                            #
5 # Licensed under the Apache License, Version 2.0 (the "License"); you may    #
6 # not use this file except in compliance with the License.                   #
7 #                                                                            #
8 # You may obtain a copy of the License at                                    #
9 #       http://www.apache.org/licenses/LICENSE-2.0                           #
10 #                                                                            #
11 # Unless required by applicable law or agreed to in writing, software        #
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
14 # See the License for the specific language governing permissions and        #
15 # limitations under the License.                                             #
16 ##############################################################################
17
18 schema: armada/Chart/v1
19 metadata:
20   schema: metadata/Document/v1
21   name: coredns
22   replacement: true
23   layeringDefinition:
24     abstract: false
25     layer: site
26     parentSelector:
27         name: coredns-global
28     actions:
29         - method: replace
30           path: .values.conf.coredns.corefile
31         - method: merge
32           path: .
33   storagePolicy: cleartext
34   substitutions:
35     # Zones
36     - src:
37         schema: pegleg/CommonAddresses/v1
38         name: common-addresses
39         path: .dns.cluster_domain
40       dest:
41         path: .values.conf.coredns.corefile
42         pattern: '(CLUSTER_DOMAIN)'
43     - src:
44         schema: pegleg/CommonAddresses/v1
45         name: common-addresses
46         path: .kubernetes.service_cidr
47       dest:
48         path: .values.conf.coredns.corefile
49         pattern: '(SERVICE_CIDR)'
50     - src:
51         schema: pegleg/CommonAddresses/v1
52         name: common-addresses
53         path: .kubernetes.pod_cidr
54       dest:
55         path:  .values.conf.coredns.corefile
56         pattern: '(POD_CIDR)'
57
58     - src:
59         schema: pegleg/CommonAddresses/v1
60         name: common-addresses
61         path: .dns.upstream_servers[0]
62       dest:
63         path: .values.conf.coredns.corefile
64         pattern: '(UPSTREAM1)'
65     - src:
66         schema: pegleg/CommonAddresses/v1
67         name: common-addresses
68         path: .dns.upstream_servers[1]
69       dest:
70         path: .values.conf.coredns.corefile
71         pattern: '(UPSTREAM2)'
72     - src:
73         schema: pegleg/CommonAddresses/v1
74         name: common-addresses
75         path: .dns.upstream_servers[2]
76       dest:
77         path: .values.conf.coredns.corefile
78         pattern: '(UPSTREAM3)'
79 data:
80   values:
81     conf:
82       coredns:
83         # TODO(alanmeadows) this needs to be adjusted to use substition
84         corefile: |
85           .:53 {
86               errors
87               health
88               autopath @kubernetes
89               kubernetes CLUSTER_DOMAIN SERVICE_CIDR POD_CIDR {
90                 pods insecure
91                 fallthrough in-addr.arpa ip6.arpa
92                 upstream UPSTREAM1
93                 upstream UPSTREAM2
94                 upstream UPSTREAM3
95               }
96               prometheus :9153
97               proxy . UPSTREAM1
98               proxy . UPSTREAM2
99               proxy . UPSTREAM3
100               cache 30
101           }
102 ...