blob: adc8b3b5e72b669712ef3393c937250b75d25887 [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
13images: {
14 coredns: {
15 repository: "coredns"
16 name: "coredns"
17 tag: "1.11.1"
18 pullPolicy: "IfNotPresent"
19 }
20 api: {
21 repository: "giolekva"
22 name: "dns-api"
23 tag: "latest"
24 pullPolicy: "Always"
25 }
26}
27
28charts: {
29 coredns: {
giof8843412024-05-22 16:38:05 +040030 kind: "GitRepository"
gio9877f292024-08-17 15:11:15 +040031 address: "https://code.v1.dodo.cloud/helm-charts"
giof8843412024-05-22 16:38:05 +040032 branch: "main"
33 path: "charts/coredns"
gioe72b54f2024-04-22 10:44:41 +040034 }
35 api: {
giof8843412024-05-22 16:38:05 +040036 kind: "GitRepository"
gio9877f292024-08-17 15:11:15 +040037 address: "https://code.v1.dodo.cloud/helm-charts"
giof8843412024-05-22 16:38:05 +040038 branch: "main"
39 path: "charts/dns-api"
gioe72b54f2024-04-22 10:44:41 +040040 }
gioe72b54f2024-04-22 10:44:41 +040041 service: {
giof8843412024-05-22 16:38:05 +040042 kind: "GitRepository"
gio9877f292024-08-17 15:11:15 +040043 address: "https://code.v1.dodo.cloud/helm-charts"
giof8843412024-05-22 16:38:05 +040044 branch: "main"
45 path: "charts/service"
gioe72b54f2024-04-22 10:44:41 +040046 }
47 ipAddressPool: {
giof8843412024-05-22 16:38:05 +040048 kind: "GitRepository"
gio9877f292024-08-17 15:11:15 +040049 address: "https://code.v1.dodo.cloud/helm-charts"
giof8843412024-05-22 16:38:05 +040050 branch: "main"
51 path: "charts/metallb-ipaddresspool"
gioe72b54f2024-04-22 10:44:41 +040052 }
53}
54
gio01cf5cb2024-06-28 00:18:18 +040055volumes: data: {
56 accessMode: "ReadWriteMany"
57 size: "5Gi"
gioe72b54f2024-04-22 10:44:41 +040058}
59
60helm: {
61 coredns: {
62 chart: charts.coredns
63 values: {
64 image: {
65 repository: images.coredns.fullName
66 tag: images.coredns.tag
67 pullPolicy: images.coredns.pullPolicy
68 }
69 replicaCount: 1
70 resources: {
71 limits: {
72 cpu: "100m"
73 memory: "128Mi"
74 }
75 requests: {
76 cpu: "100m"
77 memory: "128Mi"
78 }
79 }
80 rollingUpdate: {
81 maxUnavailable: 1
82 maxSurge: "25%"
83 }
84 terminationGracePeriodSeconds: 30
85 serviceType: "LoadBalancer"
86 service: {
87 name: "coredns"
88 annotations: {
89 "metallb.universe.tf/loadBalancerIPs": global.network.dns
90 }
91 }
92 serviceAccount: create: false
93 rbac: {
94 create: false
95 pspEnable: false
96 }
97 isClusterService: false
98 servers: [{
99 zones: [{
100 zone: "."
101 }]
102 port: 53
103 plugins: [
104 {
105 name: "log"
106 },
107 {
108 name: "health"
109 configBlock: "lameduck 5s"
110 },
111 {
112 name: "ready"
113 }
114 ]
115 }]
116 extraConfig: import: parameters: "\(_mountPath)/coredns.conf"
117 extraVolumes: [{
118 name: volumes.data.name
119 persistentVolumeClaim: claimName: volumes.data.name
120 }]
121 extraVolumeMounts: [{
122 name: volumes.data.name
123 mountPath: _mountPath
124 }]
125 livenessProbe: {
126 enabled: true
127 initialDelaySeconds: 60
128 periodSeconds: 10
129 timeoutSeconds: 5
130 failureThreshold: 5
131 successThreshold: 1
132 }
133 readinessProbe: {
134 enabled: true
135 initialDelaySeconds: 30
136 periodSeconds: 10
137 timeoutSeconds: 5
138 failureThreshold: 5
139 successThreshold: 1
140 }
141 zoneFiles: []
142 hpa: enabled: false
143 autoscaler: enabled: false
144 deployment: enabled: true
145 }
146 }
147 api: {
148 chart: charts.api
149 values: {
150 image: {
151 repository: images.api.fullName
152 tag: images.api.tag
153 pullPolicy: images.api.pullPolicy
154 }
155 config: "coredns.conf"
156 db: "records.db"
gio7841f4f2024-07-26 19:53:49 +0400157 zone: networks.public.domain
gioe72b54f2024-04-22 10:44:41 +0400158 publicIP: strings.Join(global.publicIP, ",")
159 privateIP: global.network.ingress
160 nameserverIP: strings.Join(global.nameserverIP, ",")
161 service: type: "ClusterIP"
162 volume: {
163 claimName: volumes.data.name
164 mountPath: _mountPath
165 }
166 }
167 }
gioe72b54f2024-04-22 10:44:41 +0400168 "coredns-svc-cluster": {
169 chart: charts.service
170 values: {
171 name: "dns"
172 type: "LoadBalancer"
173 protocol: "TCP"
174 ports: [{
175 name: "udp-53"
176 port: 53
177 protocol: "UDP"
178 targetPort: 53
179 }]
180 targetPort: "http"
181 selector:{
182 "app.kubernetes.io/instance": "coredns"
183 "app.kubernetes.io/name": "coredns"
184 }
185 annotations: {
186 "metallb.universe.tf/loadBalancerIPs": global.network.dnsInClusterIP
187 }
188 }
189 }
190 "ipaddresspool-dns": {
191 chart: charts.ipAddressPool
192 values: {
193 name: "\(global.id)-dns"
194 autoAssign: false
195 from: global.network.dns
196 to: global.network.dns
197 namespace: "metallb-system"
198 }
199 }
200 "ipaddresspool-dns-in-cluster": {
201 chart: charts.ipAddressPool
202 values: {
203 name: "\(global.id)-dns-in-cluster"
204 autoAssign: false
205 from: global.network.dnsInClusterIP
206 to: global.network.dnsInClusterIP
207 namespace: "metallb-system"
208 }
209 }
210}
211
212_mountPath: "/pcloud"