blob: d24a679735430eaf482145f8e6dc24a3ef7d4fd7 [file] [log] [blame]
gioe72b54f2024-04-22 10:44:41 +04001import (
2 "strings"
3)
4
5input: {}
6
gio9bd87ca2025-04-20 08:05:34 +04007name: "env-dns"
8namespace: "dns"
9readme: "env-dns"
gioe72b54f2024-04-22 10:44:41 +040010description: "Environment local DNS manager"
gio9bd87ca2025-04-20 08:05:34 +040011icon: ""
gioe72b54f2024-04-22 10:44:41 +040012
gio7fbd4ad2024-08-27 10:06:39 +040013out: {
14 images: {
15 coredns: {
16 repository: "coredns"
gio9bd87ca2025-04-20 08:05:34 +040017 name: "coredns"
18 tag: "1.11.1"
gio7fbd4ad2024-08-27 10:06:39 +040019 pullPolicy: "IfNotPresent"
20 }
21 api: {
22 repository: "giolekva"
gio9bd87ca2025-04-20 08:05:34 +040023 name: "dns-api"
24 tag: "latest"
gio7fbd4ad2024-08-27 10:06:39 +040025 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: {
gio9bd87ca2025-04-20 08:05:34 +040031 kind: "GitRepository"
gio7fbd4ad2024-08-27 10:06:39 +040032 address: "https://code.v1.dodo.cloud/helm-charts"
gio9bd87ca2025-04-20 08:05:34 +040033 branch: "main"
34 path: "charts/coredns"
gio7fbd4ad2024-08-27 10:06:39 +040035 }
36 api: {
gio9bd87ca2025-04-20 08:05:34 +040037 kind: "GitRepository"
gio7fbd4ad2024-08-27 10:06:39 +040038 address: "https://code.v1.dodo.cloud/helm-charts"
gio9bd87ca2025-04-20 08:05:34 +040039 branch: "main"
40 path: "charts/dns-api"
gio7fbd4ad2024-08-27 10:06:39 +040041 }
42 service: {
gio9bd87ca2025-04-20 08:05:34 +040043 kind: "GitRepository"
gio7fbd4ad2024-08-27 10:06:39 +040044 address: "https://code.v1.dodo.cloud/helm-charts"
gio9bd87ca2025-04-20 08:05:34 +040045 branch: "main"
46 path: "charts/service"
gio7fbd4ad2024-08-27 10:06:39 +040047 }
48 ipAddressPool: {
gio9bd87ca2025-04-20 08:05:34 +040049 kind: "GitRepository"
gio7fbd4ad2024-08-27 10:06:39 +040050 address: "https://code.v1.dodo.cloud/helm-charts"
gio9bd87ca2025-04-20 08:05:34 +040051 branch: "main"
52 path: "charts/metallb-ipaddresspool"
gio7fbd4ad2024-08-27 10:06:39 +040053 }
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"
gio9bd87ca2025-04-20 08:05:34 +040058 size: "5Gi"
gio7fbd4ad2024-08-27 10:06:39 +040059 }
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
gio9bd87ca2025-04-20 08:05:34 +040068 tag: images.coredns.tag
gio7fbd4ad2024-08-27 10:06:39 +040069 pullPolicy: images.coredns.pullPolicy
gioe72b54f2024-04-22 10:44:41 +040070 }
gio7fbd4ad2024-08-27 10:06:39 +040071 replicaCount: 1
72 resources: {
73 limits: {
gio9bd87ca2025-04-20 08:05:34 +040074 cpu: "100m"
gio7fbd4ad2024-08-27 10:06:39 +040075 memory: "128Mi"
gioe72b54f2024-04-22 10:44:41 +040076 }
gio7fbd4ad2024-08-27 10:06:39 +040077 requests: {
gio9bd87ca2025-04-20 08:05:34 +040078 cpu: "100m"
gio7fbd4ad2024-08-27 10:06:39 +040079 memory: "128Mi"
80 }
81 }
82 rollingUpdate: {
83 maxUnavailable: 1
gio9bd87ca2025-04-20 08:05:34 +040084 maxSurge: "25%"
gio7fbd4ad2024-08-27 10:06:39 +040085 }
86 terminationGracePeriodSeconds: 30
gio9bd87ca2025-04-20 08:05:34 +040087 serviceType: "LoadBalancer"
gio7fbd4ad2024-08-27 10:06:39 +040088 service: {
89 name: "coredns"
90 annotations: {
91 "metallb.universe.tf/loadBalancerIPs": global.network.dns
92 }
93 }
94 serviceAccount: create: false
95 rbac: {
gio9bd87ca2025-04-20 08:05:34 +040096 create: false
gio7fbd4ad2024-08-27 10:06:39 +040097 pspEnable: false
98 }
99 isClusterService: false
100 servers: [{
101 zones: [{
102 zone: "."
103 }]
104 port: 53
105 plugins: [
106 {
107 name: "log"
108 },
109 {
gio9bd87ca2025-04-20 08:05:34 +0400110 name: "health"
gio7fbd4ad2024-08-27 10:06:39 +0400111 configBlock: "lameduck 5s"
112 },
113 {
114 name: "ready"
gio9bd87ca2025-04-20 08:05:34 +0400115 },
gio7fbd4ad2024-08-27 10:06:39 +0400116 ]
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: [{
gio9bd87ca2025-04-20 08:05:34 +0400124 name: volume.data.name
gio7fbd4ad2024-08-27 10:06:39 +0400125 mountPath: _mountPath
126 }]
127 livenessProbe: {
gio9bd87ca2025-04-20 08:05:34 +0400128 enabled: true
gio7fbd4ad2024-08-27 10:06:39 +0400129 initialDelaySeconds: 60
gio9bd87ca2025-04-20 08:05:34 +0400130 periodSeconds: 10
131 timeoutSeconds: 5
132 failureThreshold: 5
133 successThreshold: 1
gio7fbd4ad2024-08-27 10:06:39 +0400134 }
135 readinessProbe: {
gio9bd87ca2025-04-20 08:05:34 +0400136 enabled: true
gio7fbd4ad2024-08-27 10:06:39 +0400137 initialDelaySeconds: 30
gio9bd87ca2025-04-20 08:05:34 +0400138 periodSeconds: 10
139 timeoutSeconds: 5
140 failureThreshold: 5
141 successThreshold: 1
gio7fbd4ad2024-08-27 10:06:39 +0400142 }
143 zoneFiles: []
gio9bd87ca2025-04-20 08:05:34 +0400144 hpa: enabled: false
gio7fbd4ad2024-08-27 10:06:39 +0400145 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
gio9bd87ca2025-04-20 08:05:34 +0400154 tag: images.api.tag
gio7fbd4ad2024-08-27 10:06:39 +0400155 pullPolicy: images.api.pullPolicy
156 }
gio9bd87ca2025-04-20 08:05:34 +0400157 config: "coredns.conf"
158 db: "records.db"
159 zone: networks.public.domain
160 publicIP: strings.Join(global.publicIP, ",")
161 privateIP: global.network.ingress
gio7fbd4ad2024-08-27 10:06:39 +0400162 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: {
gio9bd87ca2025-04-20 08:05:34 +0400173 name: "dns"
174 type: "LoadBalancer"
gio7fbd4ad2024-08-27 10:06:39 +0400175 protocol: "TCP"
176 ports: [{
gio9bd87ca2025-04-20 08:05:34 +0400177 name: "udp-53"
178 port: 53
179 protocol: "UDP"
gio7fbd4ad2024-08-27 10:06:39 +0400180 targetPort: 53
181 }]
182 targetPort: "http"
gio9bd87ca2025-04-20 08:05:34 +0400183 selector: {
gio7fbd4ad2024-08-27 10:06:39 +0400184 "app.kubernetes.io/instance": "coredns"
gio9bd87ca2025-04-20 08:05:34 +0400185 "app.kubernetes.io/name": "coredns"
gio7fbd4ad2024-08-27 10:06:39 +0400186 }
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: {
gio9bd87ca2025-04-20 08:05:34 +0400195 name: "\(global.id)-dns"
gio7fbd4ad2024-08-27 10:06:39 +0400196 autoAssign: false
gio9bd87ca2025-04-20 08:05:34 +0400197 from: global.network.dns
198 to: global.network.dns
199 namespace: "metallb-system"
gio7fbd4ad2024-08-27 10:06:39 +0400200 }
201 }
202 "ipaddresspool-dns-in-cluster": {
203 chart: charts.ipAddressPool
204 values: {
gio9bd87ca2025-04-20 08:05:34 +0400205 name: "\(global.id)-dns-in-cluster"
gio7fbd4ad2024-08-27 10:06:39 +0400206 autoAssign: false
gio9bd87ca2025-04-20 08:05:34 +0400207 from: global.network.dnsInClusterIP
208 to: global.network.dnsInClusterIP
209 namespace: "metallb-system"
gio7fbd4ad2024-08-27 10:06:39 +0400210 }
gioe72b54f2024-04-22 10:44:41 +0400211 }
212 }
213}
214
215_mountPath: "/pcloud"