blob: 2b73ada87d763fc2d946e6a35c460b695d156ddf [file] [log] [blame]
gioe72b54f2024-04-22 10:44:41 +04001import (
2 "strings"
3)
4
5input: {}
6
7name: "env-dns"
8namespace: "dns"
9readme: "env-dns"
10description: "Environment local DNS manager"
11icon: ""
12
gio7fbd4ad2024-08-27 10:06:39 +040013out: {
14 images: {
15 coredns: {
16 repository: "coredns"
17 name: "coredns"
18 tag: "1.11.1"
19 pullPolicy: "IfNotPresent"
20 }
21 api: {
22 repository: "giolekva"
23 name: "dns-api"
24 tag: "latest"
25 pullPolicy: "Always"
26 }
gioe72b54f2024-04-22 10:44:41 +040027 }
gioe72b54f2024-04-22 10:44:41 +040028
gio7fbd4ad2024-08-27 10:06:39 +040029 charts: {
30 coredns: {
31 kind: "GitRepository"
32 address: "https://code.v1.dodo.cloud/helm-charts"
33 branch: "main"
34 path: "charts/coredns"
35 }
36 api: {
37 kind: "GitRepository"
38 address: "https://code.v1.dodo.cloud/helm-charts"
39 branch: "main"
40 path: "charts/dns-api"
41 }
42 service: {
43 kind: "GitRepository"
44 address: "https://code.v1.dodo.cloud/helm-charts"
45 branch: "main"
46 path: "charts/service"
47 }
48 ipAddressPool: {
49 kind: "GitRepository"
50 address: "https://code.v1.dodo.cloud/helm-charts"
51 branch: "main"
52 path: "charts/metallb-ipaddresspool"
53 }
gioe72b54f2024-04-22 10:44:41 +040054 }
gioe72b54f2024-04-22 10:44:41 +040055
gio7fbd4ad2024-08-27 10:06:39 +040056 volumes: data: {
57 accessMode: "ReadWriteMany"
58 size: "5Gi"
59 }
gioe72b54f2024-04-22 10:44:41 +040060
gio7fbd4ad2024-08-27 10:06:39 +040061 helm: {
62 coredns: {
63 chart: charts.coredns
64 values: {
65 image: {
66 repository: images.coredns.fullName
67 tag: images.coredns.tag
68 pullPolicy: images.coredns.pullPolicy
gioe72b54f2024-04-22 10:44:41 +040069 }
gio7fbd4ad2024-08-27 10:06:39 +040070 replicaCount: 1
71 resources: {
72 limits: {
73 cpu: "100m"
74 memory: "128Mi"
gioe72b54f2024-04-22 10:44:41 +040075 }
gio7fbd4ad2024-08-27 10:06:39 +040076 requests: {
77 cpu: "100m"
78 memory: "128Mi"
79 }
80 }
81 rollingUpdate: {
82 maxUnavailable: 1
83 maxSurge: "25%"
84 }
85 terminationGracePeriodSeconds: 30
86 serviceType: "LoadBalancer"
87 service: {
88 name: "coredns"
89 annotations: {
90 "metallb.universe.tf/loadBalancerIPs": global.network.dns
91 }
92 }
93 serviceAccount: create: false
94 rbac: {
95 create: false
96 pspEnable: false
97 }
98 isClusterService: false
99 servers: [{
100 zones: [{
101 zone: "."
102 }]
103 port: 53
104 plugins: [
105 {
106 name: "log"
107 },
108 {
109 name: "health"
110 configBlock: "lameduck 5s"
111 },
112 {
113 name: "ready"
114 }
115 ]
116 }]
117 extraConfig: import: parameters: "\(_mountPath)/coredns.conf"
118 extraVolumes: [{
119 name: volumes.data.name
120 persistentVolumeClaim: claimName: volumes.data.name
121 }]
122 extraVolumeMounts: [{
123 name: volumes.data.name
124 mountPath: _mountPath
125 }]
126 livenessProbe: {
127 enabled: true
128 initialDelaySeconds: 60
129 periodSeconds: 10
130 timeoutSeconds: 5
131 failureThreshold: 5
132 successThreshold: 1
133 }
134 readinessProbe: {
135 enabled: true
136 initialDelaySeconds: 30
137 periodSeconds: 10
138 timeoutSeconds: 5
139 failureThreshold: 5
140 successThreshold: 1
141 }
142 zoneFiles: []
143 hpa: enabled: false
144 autoscaler: enabled: false
145 deployment: enabled: true
gioe72b54f2024-04-22 10:44:41 +0400146 }
147 }
gio7fbd4ad2024-08-27 10:06:39 +0400148 api: {
149 chart: charts.api
150 values: {
151 image: {
152 repository: images.api.fullName
153 tag: images.api.tag
154 pullPolicy: images.api.pullPolicy
155 }
156 config: "coredns.conf"
157 db: "records.db"
158 zone: networks.public.domain
159 publicIP: strings.Join(global.publicIP, ",")
160 privateIP: global.network.ingress
161 nameserverIP: strings.Join(global.nameserverIP, ",")
162 service: type: "ClusterIP"
163 volume: {
164 claimName: volumes.data.name
165 mountPath: _mountPath
166 }
gioe72b54f2024-04-22 10:44:41 +0400167 }
168 }
gio7fbd4ad2024-08-27 10:06:39 +0400169 "coredns-svc-cluster": {
170 chart: charts.service
171 values: {
172 name: "dns"
173 type: "LoadBalancer"
174 protocol: "TCP"
175 ports: [{
176 name: "udp-53"
177 port: 53
178 protocol: "UDP"
179 targetPort: 53
180 }]
181 targetPort: "http"
182 selector:{
183 "app.kubernetes.io/instance": "coredns"
184 "app.kubernetes.io/name": "coredns"
185 }
186 annotations: {
187 "metallb.universe.tf/loadBalancerIPs": global.network.dnsInClusterIP
188 }
189 }
gioe72b54f2024-04-22 10:44:41 +0400190 }
gio7fbd4ad2024-08-27 10:06:39 +0400191 "ipaddresspool-dns": {
192 chart: charts.ipAddressPool
193 values: {
194 name: "\(global.id)-dns"
195 autoAssign: false
196 from: global.network.dns
197 to: global.network.dns
198 namespace: "metallb-system"
199 }
200 }
201 "ipaddresspool-dns-in-cluster": {
202 chart: charts.ipAddressPool
203 values: {
204 name: "\(global.id)-dns-in-cluster"
205 autoAssign: false
206 from: global.network.dnsInClusterIP
207 to: global.network.dnsInClusterIP
208 namespace: "metallb-system"
209 }
gioe72b54f2024-04-22 10:44:41 +0400210 }
211 }
212}
213
214_mountPath: "/pcloud"