blob: b1db8bcd08b93b331b65a1cbf0ec56fd182362f8 [file] [log] [blame]
gioe72b54f2024-04-22 10:44:41 +04001input: {
2 servers: [...#Server]
3}
4
5#Server: {
gio9bd87ca2025-04-20 08:05:34 +04006 zone: string
gioe72b54f2024-04-22 10:44:41 +04007 address: string
8}
9
gio9bd87ca2025-04-20 08:05:34 +040010name: "dns-gateway"
gioe72b54f2024-04-22 10:44:41 +040011namespace: "dns-gateway"
12
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 }
gioe72b54f2024-04-22 10:44:41 +040021 }
gioe72b54f2024-04-22 10:44:41 +040022
gio7fbd4ad2024-08-27 10:06:39 +040023 charts: {
24 coredns: {
gio9bd87ca2025-04-20 08:05:34 +040025 kind: "GitRepository"
gio7fbd4ad2024-08-27 10:06:39 +040026 address: "https://code.v1.dodo.cloud/helm-charts"
gio9bd87ca2025-04-20 08:05:34 +040027 branch: "main"
28 path: "charts/coredns"
gio7fbd4ad2024-08-27 10:06:39 +040029 }
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
gio9bd87ca2025-04-20 08:05:34 +040038 tag: images.coredns.tag
gio7fbd4ad2024-08-27 10:06:39 +040039 pullPolicy: images.coredns.pullPolicy
gioe72b54f2024-04-22 10:44:41 +040040 }
gio7fbd4ad2024-08-27 10:06:39 +040041 replicaCount: 1
42 resources: {
43 limits: {
gio9bd87ca2025-04-20 08:05:34 +040044 cpu: "100m"
gio7fbd4ad2024-08-27 10:06:39 +040045 memory: "128Mi"
46 }
47 requests: {
gio9bd87ca2025-04-20 08:05:34 +040048 cpu: "100m"
gio7fbd4ad2024-08-27 10:06:39 +040049 memory: "128Mi"
50 }
gioe72b54f2024-04-22 10:44:41 +040051 }
gio7fbd4ad2024-08-27 10:06:39 +040052 rollingUpdate: {
53 maxUnavailable: 1
gio9bd87ca2025-04-20 08:05:34 +040054 maxSurge: "25%"
gio7fbd4ad2024-08-27 10:06:39 +040055 }
56 terminationGracePeriodSeconds: 30
gio9bd87ca2025-04-20 08:05:34 +040057 serviceType: "ClusterIP"
58 service: name: "coredns"
gio7fbd4ad2024-08-27 10:06:39 +040059 serviceAccount: create: false
60 rbac: {
gio9bd87ca2025-04-20 08:05:34 +040061 create: false
gio7fbd4ad2024-08-27 10:06:39 +040062 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 }, {
gio9bd87ca2025-04-20 08:05:34 +040075 name: "forward"
gio7fbd4ad2024-08-27 10:06:39 +040076 parameters: ". \(s.address)"
77 }, {
gio9bd87ca2025-04-20 08:05:34 +040078 name: "health"
gio7fbd4ad2024-08-27 10:06:39 +040079 configBlock: "lameduck 5s"
80 }, {
81 name: "ready"
82 }]
gio9bd87ca2025-04-20 08:05:34 +040083 },
gio7fbd4ad2024-08-27 10:06:39 +040084 ]
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: {
gio9bd87ca2025-04-20 08:05:34 +040098 enabled: true
gio7fbd4ad2024-08-27 10:06:39 +040099 initialDelaySeconds: 60
gio9bd87ca2025-04-20 08:05:34 +0400100 periodSeconds: 10
101 timeoutSeconds: 5
102 failureThreshold: 5
103 successThreshold: 1
gio7fbd4ad2024-08-27 10:06:39 +0400104 }
105 readinessProbe: {
gio9bd87ca2025-04-20 08:05:34 +0400106 enabled: true
gio7fbd4ad2024-08-27 10:06:39 +0400107 initialDelaySeconds: 30
gio9bd87ca2025-04-20 08:05:34 +0400108 periodSeconds: 10
109 timeoutSeconds: 5
110 failureThreshold: 5
111 successThreshold: 1
gio7fbd4ad2024-08-27 10:06:39 +0400112 }
113 zoneFiles: []
gio9bd87ca2025-04-20 08:05:34 +0400114 hpa: enabled: false
gio7fbd4ad2024-08-27 10:06:39 +0400115 autoscaler: enabled: false
116 deployment: enabled: true
gioe72b54f2024-04-22 10:44:41 +0400117 }
gioe72b54f2024-04-22 10:44:41 +0400118 }
119 }
120}