blob: 55d06c489b4f790aaad11c1c9fee97c2bdc228a1 [file] [log] [blame]
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +04001input: {
gio9bd87ca2025-04-20 08:05:34 +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
gio9bd87ca2025-04-20 08:05:34 +04008name: "Matrix"
9namespace: "app-matrix"
10readme: "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: """
giod2d2df02025-05-03 19:15:17 +040013 <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"
gio9bd87ca2025-04-20 08:05:34 +040036 name: "synapse"
37 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"
gio9bd87ca2025-04-20 08:05:34 +040042 name: "postgres"
43 tag: "15.3"
gio7fbd4ad2024-08-27 10:06:39 +040044 pullPolicy: "IfNotPresent"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040045 }
46 }
gio7fbd4ad2024-08-27 10:06:39 +040047
48 charts: {
49 oauth2Client: {
gio9bd87ca2025-04-20 08:05:34 +040050 kind: "GitRepository"
gio7fbd4ad2024-08-27 10:06:39 +040051 address: "https://code.v1.dodo.cloud/helm-charts"
gio9bd87ca2025-04-20 08:05:34 +040052 branch: "main"
53 path: "charts/oauth2-client"
gio7fbd4ad2024-08-27 10:06:39 +040054 }
55 matrix: {
gio9bd87ca2025-04-20 08:05:34 +040056 kind: "GitRepository"
gio7fbd4ad2024-08-27 10:06:39 +040057 address: "https://code.v1.dodo.cloud/helm-charts"
gio9bd87ca2025-04-20 08:05:34 +040058 branch: "main"
59 path: "charts/matrix"
gio7fbd4ad2024-08-27 10:06:39 +040060 }
61 postgres: {
gio9bd87ca2025-04-20 08:05:34 +040062 kind: "GitRepository"
gio7fbd4ad2024-08-27 10:06:39 +040063 address: "https://code.v1.dodo.cloud/helm-charts"
gio9bd87ca2025-04-20 08:05:34 +040064 branch: "main"
65 path: "charts/postgresql"
gio7fbd4ad2024-08-27 10:06:39 +040066 }
67 }
68
69 _oauth2ClientSecretName: "oauth2-client"
70
71 helm: {
72 "oauth2-client": {
73 chart: charts.oauth2Client
gio9bd87ca2025-04-20 08:05:34 +040074 info: "Creating OAuth2 client"
gio7fbd4ad2024-08-27 10:06:39 +040075 values: {
gio9bd87ca2025-04-20 08:05:34 +040076 name: "\(release.namespace)-matrix"
gio7fbd4ad2024-08-27 10:06:39 +040077 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: [{
gio9bd87ca2025-04-20 08:05:34 +040087 name: "postgres"
gio7fbd4ad2024-08-27 10:06:39 +040088 namespace: release.namespace
89 }]
90 chart: charts.matrix
gio9bd87ca2025-04-20 08:05:34 +040091 info: "Installing Synapse server"
gio7fbd4ad2024-08-27 10:06:39 +040092 values: {
gio9bd87ca2025-04-20 08:05:34 +040093 domain: input.network.domain
gio7fbd4ad2024-08-27 10:06:39 +040094 subdomain: input.subdomain
95 oauth2: {
96 secretName: "oauth2-client"
gio9bd87ca2025-04-20 08:05:34 +040097 issuer: "https://hydra.\(input.network.domain)"
gio7fbd4ad2024-08-27 10:06:39 +040098 }
99 postgresql: {
gio9bd87ca2025-04-20 08:05:34 +0400100 host: "postgres"
101 port: 5432
gio7fbd4ad2024-08-27 10:06:39 +0400102 database: "matrix"
gio9bd87ca2025-04-20 08:05:34 +0400103 user: "matrix"
gio7fbd4ad2024-08-27 10:06:39 +0400104 password: "matrix"
105 }
106 certificateIssuer: input.network.certificateIssuer
gio9bd87ca2025-04-20 08:05:34 +0400107 ingressClassName: input.network.ingressClass
gio7fbd4ad2024-08-27 10:06:39 +0400108 configMerge: {
109 configName: "config-to-merge"
gio9bd87ca2025-04-20 08:05:34 +0400110 fileName: "to-merge.yaml"
gio7fbd4ad2024-08-27 10:06:39 +0400111 }
112 image: {
113 repository: images.matrix.fullName
gio9bd87ca2025-04-20 08:05:34 +0400114 tag: images.matrix.tag
gio7fbd4ad2024-08-27 10:06:39 +0400115 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
gio9bd87ca2025-04-20 08:05:34 +0400121 info: "Installing PostgreSQL"
gio7fbd4ad2024-08-27 10:06:39 +0400122 values: {
123 fullnameOverride: "postgres"
124 image: {
gio9bd87ca2025-04-20 08:05:34 +0400125 registry: images.postgres.registry
gio7fbd4ad2024-08-27 10:06:39 +0400126 repository: images.postgres.imageName
gio9bd87ca2025-04-20 08:05:34 +0400127 tag: images.postgres.tag
gio7fbd4ad2024-08-27 10:06:39 +0400128 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: {
gio9bd87ca2025-04-20 08:05:34 +0400151 enabled: true
gio7fbd4ad2024-08-27 10:06:39 +0400152 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: [{
gio9bd87ca2025-04-20 08:05:34 +0400166 title: "Client Applications"
gio09a3e5b2024-04-26 14:11:06 +0400167 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}, {
gio9bd87ca2025-04-20 08:05:34 +0400169 title: "Custom Homeserver"
gio09a3e5b2024-04-26 14:11:06 +0400170 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}]