blob: bca02df0c86d7940842ff5565b01aa85f9bb077d [file] [log] [blame]
gioe72b54f2024-04-22 10:44:41 +04001input: {
2 servers: [...#Server]
3}
4
5#Server: {
6 zone: string
7 address: string
8}
9
10name: "dns-gateway"
11namespace: "dns-gateway"
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 }
gioe72b54f2024-04-22 10:44:41 +040021 }
gioe72b54f2024-04-22 10:44:41 +040022
gio7fbd4ad2024-08-27 10:06:39 +040023 charts: {
24 coredns: {
25 kind: "GitRepository"
26 address: "https://code.v1.dodo.cloud/helm-charts"
27 branch: "main"
28 path: "charts/coredns"
29 }
gioe72b54f2024-04-22 10:44:41 +040030 }
gioe72b54f2024-04-22 10:44:41 +040031
gio7fbd4ad2024-08-27 10:06:39 +040032 helm: {
33 coredns: {
34 chart: charts.coredns
35 values: {
36 image: {
37 repository: images.coredns.fullName
38 tag: images.coredns.tag
39 pullPolicy: images.coredns.pullPolicy
gioe72b54f2024-04-22 10:44:41 +040040 }
gio7fbd4ad2024-08-27 10:06:39 +040041 replicaCount: 1
42 resources: {
43 limits: {
44 cpu: "100m"
45 memory: "128Mi"
46 }
47 requests: {
48 cpu: "100m"
49 memory: "128Mi"
50 }
gioe72b54f2024-04-22 10:44:41 +040051 }
gio7fbd4ad2024-08-27 10:06:39 +040052 rollingUpdate: {
53 maxUnavailable: 1
54 maxSurge: "25%"
55 }
56 terminationGracePeriodSeconds: 30
57 serviceType: "ClusterIP"
58 service: name: "coredns"
59 serviceAccount: create: false
60 rbac: {
61 create: false
62 pspEnable: false
63 }
64 isClusterService: false
65 if len(input.servers) > 0 {
66 servers: [
67 for s in input.servers {
68 zones: [{
69 zone: s.zone
70 }]
71 port: 53
72 plugins: [{
73 name: "log"
74 }, {
75 name: "forward"
76 parameters: ". \(s.address)"
77 }, {
78 name: "health"
79 configBlock: "lameduck 5s"
80 }, {
81 name: "ready"
82 }]
83 }
84 ]
85 }
86 if len(input.servers) == 0 {
87 servers: [{
gioe72b54f2024-04-22 10:44:41 +040088 zones: [{
gio7fbd4ad2024-08-27 10:06:39 +040089 zone: "."
gioe72b54f2024-04-22 10:44:41 +040090 }]
91 port: 53
92 plugins: [{
gioe72b54f2024-04-22 10:44:41 +040093 name: "ready"
94 }]
gioe72b54f2024-04-22 10:44:41 +040095 }]
gio7fbd4ad2024-08-27 10:06:39 +040096 }
97 livenessProbe: {
98 enabled: true
99 initialDelaySeconds: 60
100 periodSeconds: 10
101 timeoutSeconds: 5
102 failureThreshold: 5
103 successThreshold: 1
104 }
105 readinessProbe: {
106 enabled: true
107 initialDelaySeconds: 30
108 periodSeconds: 10
109 timeoutSeconds: 5
110 failureThreshold: 5
111 successThreshold: 1
112 }
113 zoneFiles: []
114 hpa: enabled: false
115 autoscaler: enabled: false
116 deployment: enabled: true
gioe72b54f2024-04-22 10:44:41 +0400117 }
gioe72b54f2024-04-22 10:44:41 +0400118 }
119 }
120}