blob: f5b8ac25ec3636779de6945991921a71ad3258fa [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
giofc441e32024-11-11 16:26:14 +040056 volume: data: {
gio7fbd4ad2024-08-27 10:06:39 +040057 accessMode: "ReadWriteMany"
58 size: "5Gi"
59 }
giofc441e32024-11-11 16:26:14 +040060 _volume: volume
gioe72b54f2024-04-22 10:44:41 +040061
gio7fbd4ad2024-08-27 10:06:39 +040062 helm: {
63 coredns: {
64 chart: charts.coredns
65 values: {
66 image: {
67 repository: images.coredns.fullName
68 tag: images.coredns.tag
69 pullPolicy: images.coredns.pullPolicy
gioe72b54f2024-04-22 10:44:41 +040070 }
gio7fbd4ad2024-08-27 10:06:39 +040071 replicaCount: 1
72 resources: {
73 limits: {
74 cpu: "100m"
75 memory: "128Mi"
gioe72b54f2024-04-22 10:44:41 +040076 }
gio7fbd4ad2024-08-27 10:06:39 +040077 requests: {
78 cpu: "100m"
79 memory: "128Mi"
80 }
81 }
82 rollingUpdate: {
83 maxUnavailable: 1
84 maxSurge: "25%"
85 }
86 terminationGracePeriodSeconds: 30
87 serviceType: "LoadBalancer"
88 service: {
89 name: "coredns"
90 annotations: {
91 "metallb.universe.tf/loadBalancerIPs": global.network.dns
92 }
93 }
94 serviceAccount: create: false
95 rbac: {
96 create: false
97 pspEnable: false
98 }
99 isClusterService: false
100 servers: [{
101 zones: [{
102 zone: "."
103 }]
104 port: 53
105 plugins: [
106 {
107 name: "log"
108 },
109 {
110 name: "health"
111 configBlock: "lameduck 5s"
112 },
113 {
114 name: "ready"
115 }
116 ]
117 }]
118 extraConfig: import: parameters: "\(_mountPath)/coredns.conf"
119 extraVolumes: [{
giofc441e32024-11-11 16:26:14 +0400120 name: volume.data.name
121 persistentVolumeClaim: claimName: volume.data.name
gio7fbd4ad2024-08-27 10:06:39 +0400122 }]
123 extraVolumeMounts: [{
giofc441e32024-11-11 16:26:14 +0400124 name: volume.data.name
gio7fbd4ad2024-08-27 10:06:39 +0400125 mountPath: _mountPath
126 }]
127 livenessProbe: {
128 enabled: true
129 initialDelaySeconds: 60
130 periodSeconds: 10
131 timeoutSeconds: 5
132 failureThreshold: 5
133 successThreshold: 1
134 }
135 readinessProbe: {
136 enabled: true
137 initialDelaySeconds: 30
138 periodSeconds: 10
139 timeoutSeconds: 5
140 failureThreshold: 5
141 successThreshold: 1
142 }
143 zoneFiles: []
144 hpa: enabled: false
145 autoscaler: enabled: false
146 deployment: enabled: true
gioe72b54f2024-04-22 10:44:41 +0400147 }
148 }
gio7fbd4ad2024-08-27 10:06:39 +0400149 api: {
150 chart: charts.api
151 values: {
152 image: {
153 repository: images.api.fullName
154 tag: images.api.tag
155 pullPolicy: images.api.pullPolicy
156 }
157 config: "coredns.conf"
158 db: "records.db"
159 zone: networks.public.domain
160 publicIP: strings.Join(global.publicIP, ",")
161 privateIP: global.network.ingress
162 nameserverIP: strings.Join(global.nameserverIP, ",")
163 service: type: "ClusterIP"
164 volume: {
giofc441e32024-11-11 16:26:14 +0400165 claimName: _volume.data.name
gio7fbd4ad2024-08-27 10:06:39 +0400166 mountPath: _mountPath
167 }
gioe72b54f2024-04-22 10:44:41 +0400168 }
169 }
gio7fbd4ad2024-08-27 10:06:39 +0400170 "coredns-svc-cluster": {
171 chart: charts.service
172 values: {
173 name: "dns"
174 type: "LoadBalancer"
175 protocol: "TCP"
176 ports: [{
177 name: "udp-53"
178 port: 53
179 protocol: "UDP"
180 targetPort: 53
181 }]
182 targetPort: "http"
183 selector:{
184 "app.kubernetes.io/instance": "coredns"
185 "app.kubernetes.io/name": "coredns"
186 }
187 annotations: {
188 "metallb.universe.tf/loadBalancerIPs": global.network.dnsInClusterIP
189 }
190 }
gioe72b54f2024-04-22 10:44:41 +0400191 }
gio7fbd4ad2024-08-27 10:06:39 +0400192 "ipaddresspool-dns": {
193 chart: charts.ipAddressPool
194 values: {
195 name: "\(global.id)-dns"
196 autoAssign: false
197 from: global.network.dns
198 to: global.network.dns
199 namespace: "metallb-system"
200 }
201 }
202 "ipaddresspool-dns-in-cluster": {
203 chart: charts.ipAddressPool
204 values: {
205 name: "\(global.id)-dns-in-cluster"
206 autoAssign: false
207 from: global.network.dnsInClusterIP
208 to: global.network.dnsInClusterIP
209 namespace: "metallb-system"
210 }
gioe72b54f2024-04-22 10:44:41 +0400211 }
212 }
213}
214
215_mountPath: "/pcloud"