blob: 94c73a10349e18eab69c63e91f9798e55cda76e8 [file] [log] [blame]
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +04001input: {
2 privateNetwork: {
3 hostname: string
4 username: string
5 ipSubnet: string // TODO(gio): use cidr type
6 }
7}
8
Giorgi Lekveishvili03d6f4b2024-03-08 13:05:21 +04009name: "private-network"
Giorgi Lekveishvili08af67a2024-01-18 08:53:05 +040010namespace: "ingress-private"
11
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040012images: {
13 "ingress-nginx": {
14 registry: "registry.k8s.io"
15 repository: "ingress-nginx"
16 name: "controller"
17 tag: "v1.8.0"
18 pullPolicy: "IfNotPresent"
19 }
20 "tailscale-proxy": {
21 repository: "tailscale"
22 name: "tailscale"
23 tag: "v1.42.0"
24 pullPolicy: "IfNotPresent"
25 }
26}
27
28charts: {
29 "ingress-nginx": {
30 chart: "charts/ingress-nginx"
31 sourceRef: {
32 kind: "GitRepository"
33 name: "pcloud"
34 namespace: global.pcloudEnvName
35 }
36 }
37 "tailscale-proxy": {
38 chart: "charts/tailscale-proxy"
39 sourceRef: {
40 kind: "GitRepository"
41 name: "pcloud"
42 namespace: global.pcloudEnvName
43 }
44 }
45}
46
47helm: {
48 "ingress-nginx": {
49 chart: charts["ingress-nginx"]
50 values: {
51 fullnameOverride: "\(global.id)-nginx-private"
52 controller: {
53 service: {
54 enabled: true
55 type: "LoadBalancer"
56 annotations: {
57 "metallb.universe.tf/address-pool": _ingressPrivate
58 }
59 }
60 ingressClassByName: true
61 ingressClassResource: {
62 name: _ingressPrivate
63 enabled: true
64 default: false
65 controllerValue: "k8s.io/\(_ingressPrivate)"
66 }
Giorgi Lekveishvili13da8ff2024-03-26 12:12:24 +040067 config: {
68 "force-ssl-redirect": "true"
69 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040070 extraArgs: {
71 "default-ssl-certificate": "\(_ingressPrivate)/cert-wildcard.\(global.privateDomain)"
72 }
73 admissionWebhooks: {
74 enabled: false
75 }
76 image: {
77 registry: images["ingress-nginx"].registry
78 image: images["ingress-nginx"].imageName
79 tag: images["ingress-nginx"].tag
80 pullPolicy: images["ingress-nginx"].pullPolicy
81 }
82 }
83 }
84 }
85 "tailscale-proxy": {
86 chart: charts["tailscale-proxy"]
87 values: {
88 hostname: input.privateNetwork.hostname
89 apiServer: "http://headscale-api.\(global.namespacePrefix)app-headscale.svc.cluster.local"
90 loginServer: "https://headscale.\(global.domain)" // TODO(gio): take headscale subdomain from configuration
91 ipSubnet: input.privateNetwork.ipSubnet
92 username: input.privateNetwork.username // TODO(gio): maybe install headscale-user chart separately?
93 preAuthKeySecret: "headscale-preauth-key"
94 image: {
95 repository: images["tailscale-proxy"].fullName
96 tag: images["tailscale-proxy"].tag
97 pullPolicy: images["tailscale-proxy"].pullPolicy
98 }
99 }
100 }
101}