blob: ba2ad563a4367f9e8e47155d2329c2922f83046b [file] [log] [blame]
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +04001import (
2 "encoding/base64"
3)
4
5input: {
6 repoAddr: string
7 sshPrivateKey: string
Giorgi Lekveishvili3c91e8b2024-03-25 20:20:14 +04008 authGroups: string
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +04009}
10
Giorgi Lekveishvili03d6f4b2024-03-08 13:05:21 +040011name: "app-manager"
12namespace: "appmanager"
13
Giorgi Lekveishvili3c91e8b2024-03-25 20:20:14 +040014_subdomain: "apps"
15_httpPortName: "http"
16
17_ingressWithAuthProxy: _IngressWithAuthProxy & {
18 inp: {
19 auth: {
20 enabled: true
21 groups: input.authGroups
22 }
23 network: networks.private
24 subdomain: _subdomain
25 serviceName: "appmanager"
26 port: name: _httpPortName
27 }
28}
29
30images: _ingressWithAuthProxy.out.images & {
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040031 appmanager: {
32 repository: "giolekva"
33 name: "pcloud-installer"
34 tag: "latest"
35 pullPolicy: "Always"
36 }
37}
38
Giorgi Lekveishvili3c91e8b2024-03-25 20:20:14 +040039charts: _ingressWithAuthProxy.out.charts & {
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040040 appmanager: {
41 chart: "charts/appmanager"
42 sourceRef: {
43 kind: "GitRepository"
44 name: "pcloud"
45 namespace: global.id
46 }
47 }
48}
49
Giorgi Lekveishvili3c91e8b2024-03-25 20:20:14 +040050helm: _ingressWithAuthProxy.out.helm & {
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040051 appmanager: {
52 chart: charts.appmanager
53 values: {
54 repoAddr: input.repoAddr
55 sshPrivateKey: base64.Encode(null, input.sshPrivateKey)
56 ingress: {
Giorgi Lekveishvili3c91e8b2024-03-25 20:20:14 +040057 className: networks.private.ingressClass
58 domain: "\(_subdomain).\(networks.private.domain)"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040059 certificateIssuer: ""
60 }
61 clusterRoleName: "\(global.id)-appmanager"
Giorgi Lekveishvili3c91e8b2024-03-25 20:20:14 +040062 portName: _httpPortName
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040063 image: {
64 repository: images.appmanager.fullName
65 tag: images.appmanager.tag
66 pullPolicy: images.appmanager.pullPolicy
67 }
68 }
69 }
70}