blob: 42a3ce8a8b4714634dd95669b5fad101247d286a [file] [log] [blame]
DTabidze09935812024-03-13 13:47:39 +04001input: {
2 network: #Network
3 subdomain: string
Giorgi Lekveishvilia09fad72024-03-21 15:24:35 +04004 auth: #Auth
DTabidze09935812024-03-13 13:47:39 +04005}
6
7_domain: "\(input.subdomain).\(input.network.domain)"
8
9name: "url-shortener"
10namespace: "app-url-shortener"
11readme: "URL shortener application will be installed on \(input.network.name) network and be accessible at https://\(_domain)"
12description: "Provides URL shortening service. Can be configured to be reachable only from private network or publicly."
Giorgi Lekveishvilib4fcaa22024-03-13 16:34:49 +040013icon: "<svg xmlns='http://www.w3.org/2000/svg' width='40.63' height='50' viewBox='0 0 13 16'><circle cx='2' cy='10' r='1' fill='currentColor'/><circle cx='2' cy='6' r='1' fill='currentColor'/><path fill='currentColor' d='M4.5 14c-.06 0-.11 0-.17-.03a.501.501 0 0 1-.3-.64l4-11a.501.501 0 0 1 .94.34l-4 11c-.07.2-.27.33-.47.33m3 0c-.06 0-.11 0-.17-.03a.501.501 0 0 1-.3-.64l4-11a.501.501 0 0 1 .94.34l-4 11c-.07.2-.27.33-.47.33'/></svg>"
DTabidze09935812024-03-13 13:47:39 +040014
15images: {
16 urlShortener: {
17 repository: "giolekva"
18 name: "url-shortener"
19 tag: "latest"
20 pullPolicy: "Always"
21 }
Giorgi Lekveishvili0ba5e402024-03-20 15:56:30 +040022 authProxy: {
23 repository: "giolekva"
24 name: "auth-proxy"
25 tag: "latest"
26 pullPolicy: "Always"
27 }
DTabidze09935812024-03-13 13:47:39 +040028}
29
30charts: {
31 urlShortener: {
32 chart: "charts/url-shortener"
33 sourceRef: {
34 kind: "GitRepository"
35 name: "pcloud"
36 namespace: global.id
37 }
38 }
Giorgi Lekveishvili0ba5e402024-03-20 15:56:30 +040039 ingress: {
40 chart: "charts/ingress"
41 sourceRef: {
42 kind: "GitRepository"
43 name: "pcloud"
44 namespace: global.id
45 }
46 }
47 authProxy: {
48 chart: "charts/auth-proxy"
49 sourceRef: {
50 kind: "GitRepository"
51 name: "pcloud"
52 namespace: global.id
53 }
54 }
DTabidze09935812024-03-13 13:47:39 +040055}
56
Giorgi Lekveishvili0ba5e402024-03-20 15:56:30 +040057_urlShortenerServiceName: "url-shortener"
58_authProxyServiceName: "auth-proxy"
59_httpPortName: "http"
60
DTabidze09935812024-03-13 13:47:39 +040061helm: {
62 "url-shortener": {
Giorgi Lekveishvilib4fcaa22024-03-13 16:34:49 +040063 chart: charts.urlShortener
DTabidze09935812024-03-13 13:47:39 +040064 values: {
DTabidze09935812024-03-13 13:47:39 +040065 storage: {
66 size: "1Gi"
67 }
68 image: {
69 repository: images.urlShortener.fullName
70 tag: images.urlShortener.tag
71 pullPolicy: images.urlShortener.pullPolicy
72 }
Giorgi Lekveishvili0ba5e402024-03-20 15:56:30 +040073 portName: _httpPortName
DTabidze09935812024-03-13 13:47:39 +040074 }
75 }
Giorgi Lekveishvilia09fad72024-03-21 15:24:35 +040076 if input.auth.enabled {
Giorgi Lekveishvili0ba5e402024-03-20 15:56:30 +040077 "auth-proxy": {
78 chart: charts.authProxy
79 values: {
80 image: {
81 repository: images.authProxy.fullName
82 tag: images.authProxy.tag
83 pullPolicy: images.authProxy.pullPolicy
84 }
85 upstream: "\(_urlShortenerServiceName).\(release.namespace).svc.cluster.local"
86 whoAmIAddr: "https://accounts.\(global.domain)/sessions/whoami"
87 loginAddr: "https://accounts-ui.\(global.domain)/login"
Giorgi Lekveishvilia09fad72024-03-21 15:24:35 +040088 membershipAddr: "http://memberships.\(global.id)-core-auth-memberships.svc.cluster.local/api/user"
89 groups: input.auth.groups
Giorgi Lekveishvili0ba5e402024-03-20 15:56:30 +040090 portName: _httpPortName
91 }
92 }
93 }
94 ingress: {
95 chart: charts.ingress
96 values: {
97 domain: _domain
98 ingressClassName: input.network.ingressClass
99 certificateIssuer: input.network.certificateIssuer
100 service: {
Giorgi Lekveishvilia09fad72024-03-21 15:24:35 +0400101 if input.auth.enabled {
Giorgi Lekveishvili0ba5e402024-03-20 15:56:30 +0400102 name: _authProxyServiceName
103 }
Giorgi Lekveishvilia09fad72024-03-21 15:24:35 +0400104 if !input.auth.enabled {
Giorgi Lekveishvili0ba5e402024-03-20 15:56:30 +0400105 name: _urlShortenerServiceName
106 }
107 port: name: _httpPortName
108 }
109 }
110 }
DTabidze09935812024-03-13 13:47:39 +0400111}