blob: 6823a7b1d8ac6c4d2df98d521034498c8d654a14 [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: {
30 chart: "charts/ingress-nginx"
31 sourceRef: {
32 kind: "GitRepository"
33 name: "pcloud"
34 namespace: global.pcloudEnvName
35 }
36 }
gio3cdee592024-04-17 10:15:56 +040037 portAllocator: {
38 chart: "charts/port-allocator"
39 sourceRef: {
40 kind: "GitRepository"
41 name: "pcloud"
42 namespace: global.pcloudEnvName
43 }
44 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040045}
46
47helm: {
48 "ingress-public": {
49 chart: charts.ingressNginx
50 values: {
gioe72b54f2024-04-22 10:44:41 +040051 fullnameOverride: ingressPublic
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040052 controller: {
53 kind: "DaemonSet"
54 hostNetwork: true
55 hostPort: enabled: true
56 service: enabled: false
57 ingressClassByName: true
58 ingressClassResource: {
gioe72b54f2024-04-22 10:44:41 +040059 name: ingressPublic
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040060 enabled: true
61 default: false
gioe72b54f2024-04-22 10:44:41 +040062 controllerValue: "k8s.io/\(ingressPublic)"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040063 }
giodb274d12024-04-19 11:53:18 +040064 config: {
65 "proxy-body-size": "200M" // TODO(giolekva): configurable
66 "server-snippet": """
67 more_clear_headers "X-Frame-Options";
68 """
69 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040070 image: {
71 registry: images.ingressNginx.registry
72 image: images.ingressNginx.imageName
73 tag: images.ingressNginx.tag
74 pullPolicy: images.ingressNginx.pullPolicy
75 }
76 }
77 tcp: {
gioe72b54f2024-04-22 10:44:41 +040078 "53": "\(global.pcloudEnvName)-dns-gateway/coredns:53"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040079 }
80 udp: {
gioe72b54f2024-04-22 10:44:41 +040081 "53": "\(global.pcloudEnvName)-dns-gateway/coredns:53"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040082 }
83 }
84 }
gio3cdee592024-04-17 10:15:56 +040085 "port-allocator": {
86 chart: charts.portAllocator
87 values: {
88 repoAddr: release.repoAddr
89 sshPrivateKey: base64.Encode(null, input.sshPrivateKey)
90 ingressNginxPath: "\(release.appDir)/ingress-public.yaml"
91 image: {
92 repository: images.portAllocator.fullName
93 tag: images.portAllocator.tag
94 pullPolicy: images.portAllocator.pullPolicy
95 }
96 }
97 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040098}