blob: 4cb0f0e8db07f8a6e332e01dfab7fd947ae0adda [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
32images: {
33 matrix: {
34 repository: "matrixdotorg"
35 name: "synapse"
gioa1a65062024-04-13 09:20:44 +040036 tag: "v1.104.0"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040037 pullPolicy: "IfNotPresent"
38 }
39 postgres: {
40 repository: "library"
41 name: "postgres"
42 tag: "15.3"
43 pullPolicy: "IfNotPresent"
44 }
45}
46
47charts: {
Giorgi Lekveishvili0c6b3242024-03-14 15:31:08 +040048 oauth2Client: {
giof8843412024-05-22 16:38:05 +040049 kind: "GitRepository"
gio9877f292024-08-17 15:11:15 +040050 address: "https://code.v1.dodo.cloud/helm-charts"
giof8843412024-05-22 16:38:05 +040051 branch: "main"
52 path: "charts/oauth2-client"
Giorgi Lekveishvili0c6b3242024-03-14 15:31:08 +040053 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040054 matrix: {
giof8843412024-05-22 16:38:05 +040055 kind: "GitRepository"
gio9877f292024-08-17 15:11:15 +040056 address: "https://code.v1.dodo.cloud/helm-charts"
giof8843412024-05-22 16:38:05 +040057 branch: "main"
58 path: "charts/matrix"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040059 }
60 postgres: {
giof8843412024-05-22 16:38:05 +040061 kind: "GitRepository"
gio9877f292024-08-17 15:11:15 +040062 address: "https://code.v1.dodo.cloud/helm-charts"
giof8843412024-05-22 16:38:05 +040063 branch: "main"
64 path: "charts/postgresql"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040065 }
66}
67
Giorgi Lekveishvili0c6b3242024-03-14 15:31:08 +040068_oauth2ClientSecretName: "oauth2-client"
69
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040070helm: {
Giorgi Lekveishvili0c6b3242024-03-14 15:31:08 +040071 "oauth2-client": {
72 chart: charts.oauth2Client
giof9f0bee2024-06-11 20:10:05 +040073 info: "Creating OAuth2 client"
Giorgi Lekveishvili0c6b3242024-03-14 15:31:08 +040074 values: {
gio520c6222024-07-11 17:34:40 +040075 name: "\(release.namespace)-matrix"
Giorgi Lekveishvili0c6b3242024-03-14 15:31:08 +040076 secretName: _oauth2ClientSecretName
77 grantTypes: ["authorization_code"]
78 responseTypes: ["code"]
79 scope: "openid profile"
80 redirectUris: ["https://\(_domain)/_synapse/client/oidc/callback"]
81 hydraAdmin: "http://hydra-admin.\(global.namespacePrefix)core-auth.svc.cluster.local"
82 }
83 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040084 matrix: {
Giorgi Lekveishvilia09fad72024-03-21 15:24:35 +040085 dependsOn: [{
86 name: "postgres"
87 namespace: release.namespace
88 }]
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040089 chart: charts.matrix
giof9f0bee2024-06-11 20:10:05 +040090 info: "Installing Synapse server"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040091 values: {
gio7841f4f2024-07-26 19:53:49 +040092 domain: input.network.domain
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040093 subdomain: input.subdomain
94 oauth2: {
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040095 secretName: "oauth2-client"
gio7841f4f2024-07-26 19:53:49 +040096 issuer: "https://hydra.\(input.network.domain)"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040097 }
98 postgresql: {
99 host: "postgres"
100 port: 5432
101 database: "matrix"
102 user: "matrix"
103 password: "matrix"
104 }
gio7841f4f2024-07-26 19:53:49 +0400105 certificateIssuer: input.network.certificateIssuer
106 ingressClassName: input.network.ingressClass
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400107 configMerge: {
108 configName: "config-to-merge"
109 fileName: "to-merge.yaml"
110 }
111 image: {
112 repository: images.matrix.fullName
113 tag: images.matrix.tag
114 pullPolicy: images.matrix.pullPolicy
115 }
116 }
117 }
118 postgres: {
119 chart: charts.postgres
giof9f0bee2024-06-11 20:10:05 +0400120 info: "Installing PostgreSQL"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +0400121 values: {
122 fullnameOverride: "postgres"
123 image: {
124 registry: images.postgres.registry
125 repository: images.postgres.imageName
126 tag: images.postgres.tag
127 pullPolicy: images.postgres.pullPolicy
128 }
129 service: {
130 type: "ClusterIP"
131 port: 5432
132 }
133 primary: {
134 initdb: {
135 scripts: {
136 "init.sql": """
137 CREATE USER matrix WITH PASSWORD 'matrix';
138 CREATE DATABASE matrix WITH OWNER = matrix ENCODING = UTF8 LOCALE = 'C' TEMPLATE = template0;
139 """
140 }
141 }
142 persistence: {
143 size: "10Gi"
144 }
145 securityContext: {
146 enabled: true
147 fsGroup: 0
148 }
149 containerSecurityContext: {
150 enabled: true
151 runAsUser: 0
152 }
153 }
154 volumePermissions: {
155 securityContext: {
156 runAsUser: 0
157 }
158 }
159 }
160 }
161}
gio09a3e5b2024-04-26 14:11:06 +0400162
163help: [{
164 title: "Client Applications"
165 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."
166}, {
167 title: "Custom Homeserver"
168 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."
169}]