blob: f0827e5123faa958f3ebfd3ad1ac25162f2c7221 [file] [log] [blame]
gio3cdee592024-04-17 10:15:56 +04001import (
2 "encoding/base64"
3)
4
5input: {
6 sshPrivateKey: string
7}
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +04008
Giorgi Lekveishvili03d6f4b2024-03-08 13:05:21 +04009name: "ingress-public"
10namespace: "ingress-public"
11
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040012images: {
13 ingressNginx: {
14 registry: "registry.k8s.io"
15 repository: "ingress-nginx"
16 name: "controller"
17 tag: "v1.8.0"
18 pullPolicy: "IfNotPresent"
19 }
gio3cdee592024-04-17 10:15:56 +040020 portAllocator: {
21 repository: "giolekva"
22 name: "port-allocator"
23 tag: "latest"
24 pullPolicy: "Always"
25 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040026}
27
28charts: {
29 ingressNginx: {
giof8843412024-05-22 16:38:05 +040030 kind: "GitRepository"
31 address: "https://github.com/giolekva/pcloud.git"
32 branch: "main"
33 path: "charts/ingress-nginx"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040034 }
gio3cdee592024-04-17 10:15:56 +040035 portAllocator: {
giof8843412024-05-22 16:38:05 +040036 kind: "GitRepository"
37 address: "https://github.com/giolekva/pcloud.git"
38 branch: "main"
39 path: "charts/port-allocator"
gio3cdee592024-04-17 10:15:56 +040040 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040041}
42
43helm: {
44 "ingress-public": {
45 chart: charts.ingressNginx
46 values: {
gioe72b54f2024-04-22 10:44:41 +040047 fullnameOverride: ingressPublic
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040048 controller: {
49 kind: "DaemonSet"
50 hostNetwork: true
51 hostPort: enabled: true
52 service: enabled: false
53 ingressClassByName: true
54 ingressClassResource: {
gioe72b54f2024-04-22 10:44:41 +040055 name: ingressPublic
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040056 enabled: true
57 default: false
gioe72b54f2024-04-22 10:44:41 +040058 controllerValue: "k8s.io/\(ingressPublic)"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040059 }
giodb274d12024-04-19 11:53:18 +040060 config: {
61 "proxy-body-size": "200M" // TODO(giolekva): configurable
62 "server-snippet": """
63 more_clear_headers "X-Frame-Options";
64 """
65 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040066 image: {
67 registry: images.ingressNginx.registry
68 image: images.ingressNginx.imageName
69 tag: images.ingressNginx.tag
70 pullPolicy: images.ingressNginx.pullPolicy
71 }
72 }
73 tcp: {
gioe72b54f2024-04-22 10:44:41 +040074 "53": "\(global.pcloudEnvName)-dns-gateway/coredns:53"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040075 }
76 udp: {
gioe72b54f2024-04-22 10:44:41 +040077 "53": "\(global.pcloudEnvName)-dns-gateway/coredns:53"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040078 }
79 }
80 }
gio3cdee592024-04-17 10:15:56 +040081 "port-allocator": {
82 chart: charts.portAllocator
83 values: {
84 repoAddr: release.repoAddr
85 sshPrivateKey: base64.Encode(null, input.sshPrivateKey)
86 ingressNginxPath: "\(release.appDir)/ingress-public.yaml"
87 image: {
88 repository: images.portAllocator.fullName
89 tag: images.portAllocator.tag
90 pullPolicy: images.portAllocator.pullPolicy
91 }
92 }
93 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040094}