blob: 9daf2eb56233da9485a5531f9ca254096782f906 [file] [log] [blame]
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +04001input: {
2 network: #Network
3 subdomain: string
4}
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"
12icon: "<svg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 24 24'><path fill='currentColor' d='M.632.55v22.9H2.28V24H0V0h2.28v.55zm7.043 7.26v1.157h.033a3.312 3.312 0 0 1 1.117-1.024c.433-.245.936-.365 1.5-.365c.54 0 1.033.107 1.481.314c.448.208.785.582 1.02 1.108c.254-.374.6-.706 1.034-.992c.434-.287.95-.43 1.546-.43c.453 0 .872.056 1.26.167c.388.11.716.286.993.53c.276.245.489.559.646.951c.152.392.23.863.23 1.417v5.728h-2.349V11.52c0-.286-.01-.559-.032-.812a1.755 1.755 0 0 0-.18-.66a1.106 1.106 0 0 0-.438-.448c-.194-.11-.457-.166-.785-.166c-.332 0-.6.064-.803.189a1.38 1.38 0 0 0-.48.499a1.946 1.946 0 0 0-.231.696a5.56 5.56 0 0 0-.06.785v4.768h-2.35v-4.8c0-.254-.004-.503-.018-.752a2.074 2.074 0 0 0-.143-.688a1.052 1.052 0 0 0-.415-.503c-.194-.125-.476-.19-.854-.19c-.111 0-.259.024-.439.074c-.18.051-.36.143-.53.282a1.637 1.637 0 0 0-.439.595c-.12.259-.18.6-.18 1.02v4.966H5.46V7.81zm15.693 15.64V.55H21.72V0H24v24h-2.28v-.55z'/></svg>"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040013
14images: {
15 matrix: {
16 repository: "matrixdotorg"
17 name: "synapse"
Giorgi Lekveishvili0c6b3242024-03-14 15:31:08 +040018 tag: "v1.98.0"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040019 pullPolicy: "IfNotPresent"
20 }
21 postgres: {
22 repository: "library"
23 name: "postgres"
24 tag: "15.3"
25 pullPolicy: "IfNotPresent"
26 }
27}
28
29charts: {
Giorgi Lekveishvili0c6b3242024-03-14 15:31:08 +040030 oauth2Client: {
31 chart: "charts/oauth2-client"
32 sourceRef: {
33 kind: "GitRepository"
34 name: "pcloud"
35 namespace: global.id
36 }
37 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040038 matrix: {
39 chart: "charts/matrix"
40 sourceRef: {
41 kind: "GitRepository"
42 name: "pcloud"
43 namespace: global.id
44 }
45 }
46 postgres: {
47 chart: "charts/postgresql"
48 sourceRef: {
49 kind: "GitRepository"
50 name: "pcloud"
51 namespace: global.id
52 }
53 }
54}
55
Giorgi Lekveishvili0c6b3242024-03-14 15:31:08 +040056_oauth2ClientSecretName: "oauth2-client"
57
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040058helm: {
Giorgi Lekveishvili0c6b3242024-03-14 15:31:08 +040059 "oauth2-client": {
60 chart: charts.oauth2Client
61 values: {
62 name: "oauth2-client"
63 secretName: _oauth2ClientSecretName
64 grantTypes: ["authorization_code"]
65 responseTypes: ["code"]
66 scope: "openid profile"
67 redirectUris: ["https://\(_domain)/_synapse/client/oidc/callback"]
68 hydraAdmin: "http://hydra-admin.\(global.namespacePrefix)core-auth.svc.cluster.local"
69 }
70 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040071 matrix: {
72 dependsOn: [
73 postgres
74 ]
75 chart: charts.matrix
76 values: {
77 domain: global.domain
78 subdomain: input.subdomain
79 oauth2: {
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040080 secretName: "oauth2-client"
Giorgi Lekveishvili0c6b3242024-03-14 15:31:08 +040081 issuer: "https://hydra.\(global.domain)"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040082 }
83 postgresql: {
84 host: "postgres"
85 port: 5432
86 database: "matrix"
87 user: "matrix"
88 password: "matrix"
89 }
90 certificateIssuer: _issuerPublic
91 ingressClassName: _ingressPublic
92 configMerge: {
93 configName: "config-to-merge"
94 fileName: "to-merge.yaml"
95 }
96 image: {
97 repository: images.matrix.fullName
98 tag: images.matrix.tag
99 pullPolicy: images.matrix.pullPolicy
100 }
101 }
102 }
103 postgres: {
104 chart: charts.postgres
105 values: {
106 fullnameOverride: "postgres"
107 image: {
108 registry: images.postgres.registry
109 repository: images.postgres.imageName
110 tag: images.postgres.tag
111 pullPolicy: images.postgres.pullPolicy
112 }
113 service: {
114 type: "ClusterIP"
115 port: 5432
116 }
117 primary: {
118 initdb: {
119 scripts: {
120 "init.sql": """
121 CREATE USER matrix WITH PASSWORD 'matrix';
122 CREATE DATABASE matrix WITH OWNER = matrix ENCODING = UTF8 LOCALE = 'C' TEMPLATE = template0;
123 """
124 }
125 }
126 persistence: {
127 size: "10Gi"
128 }
129 securityContext: {
130 enabled: true
131 fsGroup: 0
132 }
133 containerSecurityContext: {
134 enabled: true
135 runAsUser: 0
136 }
137 }
138 volumePermissions: {
139 securityContext: {
140 runAsUser: 0
141 }
142 }
143 }
144 }
145}