| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 1 | input: { |
| gio | 44f621b | 2024-04-29 09:44:38 +0400 | [diff] [blame^] | 2 | network: #Network @name(Network) |
| 3 | subdomain: string @name(Subdomain) |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 4 | } |
| 5 | |
| 6 | _domain: "\(input.subdomain).\(input.network.domain)" |
| 7 | |
| Giorgi Lekveishvili | ef21c13 | 2024-01-17 18:57:58 +0400 | [diff] [blame] | 8 | name: "Matrix" |
| 9 | namespace: "app-matrix" |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 10 | readme: "matrix application will be installed on \(input.network.name) network and be accessible to any user on https://\(_domain)" |
| Giorgi Lekveishvili | ef21c13 | 2024-01-17 18:57:58 +0400 | [diff] [blame] | 11 | description: "An open network for secure, decentralised communication" |
| 12 | icon: "<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 Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 13 | |
| 14 | images: { |
| 15 | matrix: { |
| 16 | repository: "matrixdotorg" |
| 17 | name: "synapse" |
| gio | a1a6506 | 2024-04-13 09:20:44 +0400 | [diff] [blame] | 18 | tag: "v1.104.0" |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 19 | pullPolicy: "IfNotPresent" |
| 20 | } |
| 21 | postgres: { |
| 22 | repository: "library" |
| 23 | name: "postgres" |
| 24 | tag: "15.3" |
| 25 | pullPolicy: "IfNotPresent" |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | charts: { |
| Giorgi Lekveishvili | 0c6b324 | 2024-03-14 15:31:08 +0400 | [diff] [blame] | 30 | oauth2Client: { |
| 31 | chart: "charts/oauth2-client" |
| 32 | sourceRef: { |
| 33 | kind: "GitRepository" |
| 34 | name: "pcloud" |
| 35 | namespace: global.id |
| 36 | } |
| 37 | } |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 38 | 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 Lekveishvili | 0c6b324 | 2024-03-14 15:31:08 +0400 | [diff] [blame] | 56 | _oauth2ClientSecretName: "oauth2-client" |
| 57 | |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 58 | helm: { |
| Giorgi Lekveishvili | 0c6b324 | 2024-03-14 15:31:08 +0400 | [diff] [blame] | 59 | "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 Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 71 | matrix: { |
| Giorgi Lekveishvili | a09fad7 | 2024-03-21 15:24:35 +0400 | [diff] [blame] | 72 | dependsOn: [{ |
| 73 | name: "postgres" |
| 74 | namespace: release.namespace |
| 75 | }] |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 76 | chart: charts.matrix |
| 77 | values: { |
| 78 | domain: global.domain |
| 79 | subdomain: input.subdomain |
| 80 | oauth2: { |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 81 | secretName: "oauth2-client" |
| Giorgi Lekveishvili | 0c6b324 | 2024-03-14 15:31:08 +0400 | [diff] [blame] | 82 | issuer: "https://hydra.\(global.domain)" |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 83 | } |
| 84 | postgresql: { |
| 85 | host: "postgres" |
| 86 | port: 5432 |
| 87 | database: "matrix" |
| 88 | user: "matrix" |
| 89 | password: "matrix" |
| 90 | } |
| gio | e72b54f | 2024-04-22 10:44:41 +0400 | [diff] [blame] | 91 | certificateIssuer: issuerPublic |
| 92 | ingressClassName: ingressPublic |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 93 | configMerge: { |
| 94 | configName: "config-to-merge" |
| 95 | fileName: "to-merge.yaml" |
| 96 | } |
| 97 | image: { |
| 98 | repository: images.matrix.fullName |
| 99 | tag: images.matrix.tag |
| 100 | pullPolicy: images.matrix.pullPolicy |
| 101 | } |
| 102 | } |
| 103 | } |
| 104 | postgres: { |
| 105 | chart: charts.postgres |
| 106 | values: { |
| 107 | fullnameOverride: "postgres" |
| 108 | image: { |
| 109 | registry: images.postgres.registry |
| 110 | repository: images.postgres.imageName |
| 111 | tag: images.postgres.tag |
| 112 | pullPolicy: images.postgres.pullPolicy |
| 113 | } |
| 114 | service: { |
| 115 | type: "ClusterIP" |
| 116 | port: 5432 |
| 117 | } |
| 118 | primary: { |
| 119 | initdb: { |
| 120 | scripts: { |
| 121 | "init.sql": """ |
| 122 | CREATE USER matrix WITH PASSWORD 'matrix'; |
| 123 | CREATE DATABASE matrix WITH OWNER = matrix ENCODING = UTF8 LOCALE = 'C' TEMPLATE = template0; |
| 124 | """ |
| 125 | } |
| 126 | } |
| 127 | persistence: { |
| 128 | size: "10Gi" |
| 129 | } |
| 130 | securityContext: { |
| 131 | enabled: true |
| 132 | fsGroup: 0 |
| 133 | } |
| 134 | containerSecurityContext: { |
| 135 | enabled: true |
| 136 | runAsUser: 0 |
| 137 | } |
| 138 | } |
| 139 | volumePermissions: { |
| 140 | securityContext: { |
| 141 | runAsUser: 0 |
| 142 | } |
| 143 | } |
| 144 | } |
| 145 | } |
| 146 | } |