blob: 953c6b77f50c41096414dbda485bc738cd94c003 [file] [log] [blame]
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +04001input: {
gio44f621b2024-04-29 09:44:38 +04002 network: #Network @name(Network)
3 subdomain: string @name(Subdomain)
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +04004}
5
6_domain: "\(input.subdomain).\(input.network.domain)"
7
Giorgi Lekveishvilief21c132024-01-17 18:57:58 +04008name: "Matrix"
9namespace: "app-matrix"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040010readme: "matrix application will be installed on \(input.network.name) network and be accessible to any user on https://\(_domain)"
Giorgi Lekveishvilief21c132024-01-17 18:57:58 +040011description: "An open network for secure, decentralised communication"
gio8c942d22024-07-17 13:43:02 +040012icon: """
13<svg width='50px' height='50px' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 39.68503937 39.68503937'>
14 <defs>
15 <style>
16 .cls-1 {
17 fill: currentColor;
18 }
19
20 .cls-2 {
21 fill: none;
22 stroke: #3a3a3a;
23 stroke-miterlimit: 10;
24 stroke-width: .98133445px;
25 }
26 </style>
27 </defs>
28 <rect class='cls-2' x='-9.97439025' y='-9.97439025' width='59.63381987' height='59.63381987'/>
29 <path class='cls-1' d='m1.04503942.90944884v37.86613982h2.72503927v.90945071H0V0h3.77007869v.90944884H1.04503942Zm11.64590578,12.00472508v1.91314893h.05456692c.47654392-.69956134,1.10875881-1.27913948,1.84700726-1.69322862.71598361-.40511792,1.54771632-.60354293,2.48031496-.60354293.89291332,0,1.70811022.17692893,2.44889755.51921281.74078733.34393731,1.29803124.96236184,1.68661493,1.83212566.41999952-.61842453.99212662-1.16740212,1.70976444-1.64031434.71763782-.47456723,1.57086583-.71102334,2.55637717-.71102334.74905523,0,1.44188933.09259881,2.08346495.27614143.64157561.18188998,1.18393635.47291301,1.64196855.8763783.45637641.40511792.80858321.92433073,1.06818882,1.57252004.25133929.6481893.3803142,1.42700774.3803142,2.34307056v9.47149555h-3.88417161v-8.02133831c0-.4729138-.01653581-.92433073-.0529127-1.34267762-.02666609-.3797812-.12779852-.75060537-.2976383-1.09133833-.16496703-.31157689-.41647821-.56882971-.72425151-.74078733-.32078781-.1818892-.75566893-.27448879-1.29803124-.27448879-.54897601,0-.99212662.10582699-1.32779444.3125199-.33038665.20312114-.60355081.48709839-.79370003.82511744-.19910782.35594888-.32873086.74650374-.38196842,1.15086631-.06370056.42978918-.09685576.86355382-.09921329,1.29803124v7.88409548h-3.8858274v-7.93700819c0-.41999952-.00661369-.83173271-.0297632-1.24346433-.01353647-.38990201-.09350161-.7746348-.23645611-1.13763734-.13486952-.34292964-.3751576-.63417029-.68622041-.83173271-.32078781-.20669291-.78708634-.31417253-1.41212614-.31417253-.18354341,0-.42826743.03968532-.72590573.1223628-.2976383.08433012-.59527502.23645611-.87637751.46629853-.31383822.26829772-.56214032.60483444-.72590573.98385871-.19842501.42826743-.29763751.99212662-.29763751,1.68661335v8.21149541h-3.88417713v-14.16259852l3.66259868.00000079Zm25.94905485,25.86141789V.90944884h-2.72504056v-.90944884h3.77007988v39.68503937h-3.77007988v-.90944756h2.72504056Z'/>
30</svg>"""
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040031
gio7fbd4ad2024-08-27 10:06:39 +040032out: {
33 images: {
34 matrix: {
35 repository: "matrixdotorg"
36 name: "synapse"
gio7c34c6c2025-04-09 22:29:41 +040037 tag: "v1.126.0"
gio7fbd4ad2024-08-27 10:06:39 +040038 pullPolicy: "IfNotPresent"
Giorgi Lekveishvili0c6b3242024-03-14 15:31:08 +040039 }
gio7fbd4ad2024-08-27 10:06:39 +040040 postgres: {
41 repository: "library"
Giorgi Lekveishvilia09fad72024-03-21 15:24:35 +040042 name: "postgres"
gio7fbd4ad2024-08-27 10:06:39 +040043 tag: "15.3"
44 pullPolicy: "IfNotPresent"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040045 }
46 }
gio7fbd4ad2024-08-27 10:06:39 +040047
48 charts: {
49 oauth2Client: {
50 kind: "GitRepository"
51 address: "https://code.v1.dodo.cloud/helm-charts"
52 branch: "main"
53 path: "charts/oauth2-client"
54 }
55 matrix: {
56 kind: "GitRepository"
57 address: "https://code.v1.dodo.cloud/helm-charts"
58 branch: "main"
59 path: "charts/matrix"
60 }
61 postgres: {
62 kind: "GitRepository"
63 address: "https://code.v1.dodo.cloud/helm-charts"
64 branch: "main"
65 path: "charts/postgresql"
66 }
67 }
68
69 _oauth2ClientSecretName: "oauth2-client"
70
71 helm: {
72 "oauth2-client": {
73 chart: charts.oauth2Client
74 info: "Creating OAuth2 client"
75 values: {
76 name: "\(release.namespace)-matrix"
77 secretName: _oauth2ClientSecretName
78 grantTypes: ["authorization_code"]
79 responseTypes: ["code"]
80 scope: "openid profile"
81 redirectUris: ["https://\(_domain)/_synapse/client/oidc/callback"]
82 hydraAdmin: "http://hydra-admin.\(global.namespacePrefix)core-auth.svc.cluster.local"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040083 }
gio7fbd4ad2024-08-27 10:06:39 +040084 }
85 matrix: {
86 dependsOn: [{
87 name: "postgres"
88 namespace: release.namespace
89 }]
90 chart: charts.matrix
91 info: "Installing Synapse server"
92 values: {
93 domain: input.network.domain
94 subdomain: input.subdomain
95 oauth2: {
96 secretName: "oauth2-client"
97 issuer: "https://hydra.\(input.network.domain)"
98 }
99 postgresql: {
100 host: "postgres"
101 port: 5432
102 database: "matrix"
103 user: "matrix"
104 password: "matrix"
105 }
106 certificateIssuer: input.network.certificateIssuer
107 ingressClassName: input.network.ingressClass
108 configMerge: {
109 configName: "config-to-merge"
110 fileName: "to-merge.yaml"
111 }
112 image: {
113 repository: images.matrix.fullName
114 tag: images.matrix.tag
115 pullPolicy: images.matrix.pullPolicy
116 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400117 }
gio7fbd4ad2024-08-27 10:06:39 +0400118 }
119 postgres: {
120 chart: charts.postgres
121 info: "Installing PostgreSQL"
122 values: {
123 fullnameOverride: "postgres"
124 image: {
125 registry: images.postgres.registry
126 repository: images.postgres.imageName
127 tag: images.postgres.tag
128 pullPolicy: images.postgres.pullPolicy
129 }
130 service: {
131 type: "ClusterIP"
132 port: 5432
133 }
134 primary: {
135 initdb: {
136 scripts: {
137 "init.sql": """
138 CREATE USER matrix WITH PASSWORD 'matrix';
139 CREATE DATABASE matrix WITH OWNER = matrix ENCODING = UTF8 LOCALE = 'C' TEMPLATE = template0;
140 """
141 }
142 }
143 persistence: {
144 size: "10Gi"
145 }
146 securityContext: {
147 enabled: true
148 fsGroup: 0
149 }
150 containerSecurityContext: {
151 enabled: true
152 runAsUser: 0
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400153 }
154 }
gio7fbd4ad2024-08-27 10:06:39 +0400155 volumePermissions: {
156 securityContext: {
157 runAsUser: 0
158 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400159 }
160 }
161 }
162 }
163}
gio09a3e5b2024-04-26 14:11:06 +0400164
165help: [{
166 title: "Client Applications"
167 contents: "You can connect to \(_domain) Matrix server with any of the official clients. We recommend using Element. You can use official Element Web application to chat within the browser. Platform native client applications can be downloaded from: [https://element.io/download](https://element.io/download). Follow **Custom Homeserver** section to login with your dodo: account."
168}, {
169 title: "Custom Homeserver"
170 contents: "Click **Sign in** button, edit **Homeserver** address and enter **\(input.network.domain)**, click **Continue**. Choose **Continue with PCloud** option and login to your dodo: account."
171}]