| gio | 932849f | 2024-08-02 09:01:48 +0400 | [diff] [blame^] | 1 | input: { |
| 2 | network: #Network @name(Network) |
| 3 | subdomain: string @name(Subdomain) |
| 4 | } |
| 5 | |
| 6 | _domain: "\(input.subdomain).\(input.network.domain)" |
| 7 | url: "https://\(_domain)" |
| 8 | |
| 9 | name: "Coder" |
| 10 | namespace: "app-coder" |
| 11 | readme: "VSCode in the browser" |
| 12 | description: readme |
| 13 | icon: "<svg xmlns='http://www.w3.org/2000/svg' width='50px' height='50px' viewBox='0 0 16 16'><path fill='currentColor' fill-rule='evenodd' d='M11.573.275a1.203 1.203 0 0 0-.191.073c-.039.021-1.383 1.172-2.986 2.558C6.792 4.291 5.462 5.424 5.44 5.424c-.022 0-.664-.468-1.427-1.04c-.762-.571-1.428-1.057-1.48-1.078c-.15-.063-.468-.05-.613.024C1.754 3.416.189 4.975.094 5.15a.741.741 0 0 0 .04.766c.041.057.575.557 1.185 1.11c.611.553 1.107 1.015 1.102 1.026c-.004.012-.495.442-1.091.957c-.596.514-1.122.981-1.168 1.036a.746.746 0 0 0-.069.804c.096.175 1.659 1.734 1.827 1.821c.166.087.497.089.653.005c.059-.031.7-.502 1.424-1.046l1.318-.988l.109.1l2.73 2.473c1.846 1.671 2.666 2.396 2.772 2.453l.15.08h1.348l1.631-.814c1.5-.748 1.64-.823 1.748-.942c.213-.237.197.241.197-5.738c0-5.821.009-5.468-.151-5.699c-.058-.084-.41-.331-1.634-1.148c-.857-.572-1.613-1.065-1.68-1.095c-.1-.045-.187-.056-.482-.063c-.237-.005-.401.004-.48.027m1.699 2.305l1.233.82l.001 4.82l.001 4.82l-1.205.6l-1.204.6h-.569L8.66 11.644c-1.578-1.428-2.912-2.616-2.963-2.641c-.199-.094-.5-.101-.661-.014c-.034.018-.651.475-1.372 1.015c-.721.541-1.322.983-1.335.983c-.03 0-.477-.448-.461-.462c.673-.577 2.078-1.794 2.182-1.891c.086-.081.169-.192.21-.28c.057-.127.065-.174.054-.343c-.01-.158-.028-.223-.091-.324c-.053-.086-.454-.466-1.229-1.167l-1.15-1.04l.231-.233a1.83 1.83 0 0 1 .256-.234c.013 0 .644.465 1.4 1.033c1.496 1.123 1.537 1.148 1.81 1.116a.968.968 0 0 0 .253-.069c.062-.029.503-.39.979-.802L7.96 5.265a5929.2 5929.2 0 0 0 2.187-1.89a191.687 191.687 0 0 1 1.879-1.614c.008-.001.568.368 1.246.819M11.64 4.257a1.5 1.5 0 0 0-.16.051c-.059.021-1.079.738-2.267 1.593C6.867 7.59 6.92 7.547 6.851 7.854a.556.556 0 0 0 0 .292c.068.307.017.264 2.362 1.953c1.188.855 2.214 1.576 2.28 1.601c.347.133.743-.029.929-.38l.071-.133V4.813l-.071-.133a.76.76 0 0 0-.369-.356c-.127-.056-.324-.088-.413-.067m-.66 4.5l-.007.757l-1.046-.75A41.313 41.313 0 0 1 8.881 8c0-.007.471-.351 1.046-.764l1.046-.75l.007.757a95.51 95.51 0 0 1 0 1.514'/></svg>" |
| 14 | |
| 15 | ingress: { |
| 16 | coder: { |
| 17 | auth: enabled: false |
| 18 | network: input.network |
| 19 | subdomain: input.subdomain |
| 20 | service: { |
| 21 | name: "coder" |
| 22 | port: name: "http" |
| 23 | } |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | images: { |
| 28 | postgres: { |
| 29 | repository: "library" |
| 30 | name: "postgres" |
| 31 | tag: "15.3" |
| 32 | pullPolicy: "IfNotPresent" |
| 33 | } |
| 34 | coder: { |
| 35 | registry: "ghcr.io" |
| 36 | repository: "coder" |
| 37 | name: "coder" |
| 38 | tag: "latest" |
| 39 | pullPolicy: "IfNotPresent" |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | charts: { |
| 44 | postgres: { |
| 45 | kind: "GitRepository" |
| 46 | address: "https://github.com/giolekva/pcloud.git" |
| 47 | branch: "main" |
| 48 | path: "charts/postgresql" |
| 49 | } |
| 50 | coder: { |
| 51 | kind: "GitRepository" |
| 52 | address: "https://github.com/giolekva/pcloud.git" |
| 53 | branch: "main" |
| 54 | path: "charts/coder" |
| 55 | } |
| 56 | oauth2Client: { |
| 57 | kind: "GitRepository" |
| 58 | address: "https://github.com/giolekva/pcloud.git" |
| 59 | branch: "main" |
| 60 | path: "charts/oauth2-client" |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | _oauth2ClientSecretName: "oauth2-credentials" |
| 65 | |
| 66 | helm: { |
| 67 | "oauth2-client": { |
| 68 | chart: charts.oauth2Client |
| 69 | values: { |
| 70 | name: "\(release.namespace)-coder" |
| 71 | secretName: _oauth2ClientSecretName |
| 72 | grantTypes: ["authorization_code"] |
| 73 | responseTypes: ["code"] |
| 74 | scope: "openid profile email" |
| 75 | redirectUris: ["\(url)/api/v2/users/oidc/callbackzot"] |
| 76 | hydraAdmin: "http://hydra-admin.\(global.namespacePrefix)core-auth.svc.cluster.local" |
| 77 | } |
| 78 | } |
| 79 | postgres: { |
| 80 | chart: charts.postgres |
| 81 | values: { |
| 82 | fullnameOverride: "postgres" |
| 83 | image: { |
| 84 | registry: images.postgres.registry |
| 85 | repository: images.postgres.imageName |
| 86 | tag: images.postgres.tag |
| 87 | pullPolicy: images.postgres.pullPolicy |
| 88 | } |
| 89 | auth: { |
| 90 | username: "coder" |
| 91 | password: "coder" |
| 92 | database: "coder" |
| 93 | } |
| 94 | } |
| 95 | } |
| 96 | coder: { |
| 97 | chart: charts.coder |
| 98 | values: coder: { |
| 99 | image: { |
| 100 | repo: images.coder.fullName |
| 101 | tag: images.coder.tag |
| 102 | pullPolicy: images.coder.pullPolicy |
| 103 | } |
| 104 | envUseClusterAccessURL: false |
| 105 | env: [{ |
| 106 | name: "CODER_ACCESS_URL" |
| 107 | value: url |
| 108 | }, { |
| 109 | name: "CODER_PG_CONNECTION_URL" |
| 110 | value: "postgres://coder:coder@postgres.\(release.namespace).svc.cluster.local:5432/coder?sslmode=disable" |
| 111 | }, { |
| 112 | name: "CODER_OIDC_ISSUER_URL" |
| 113 | value: "https://hydra.\(networks.public.domain)" |
| 114 | }, { |
| 115 | name: "CODER_OIDC_EMAIL_DOMAIN" |
| 116 | value: networks.public.domain |
| 117 | }, { |
| 118 | name: "CODER_OIDC_CLIENT_ID" |
| 119 | valueFrom: { |
| 120 | secretKeyRef: { |
| 121 | name: _oauth2ClientSecretName |
| 122 | key: "client_id" |
| 123 | } |
| 124 | } |
| 125 | }, { |
| 126 | name: "CODER_OIDC_CLIENT_SECRET" |
| 127 | valueFrom: { |
| 128 | secretKeyRef: { |
| 129 | name: _oauth2ClientSecretName |
| 130 | key: "client_secret" |
| 131 | } |
| 132 | } |
| 133 | }] |
| 134 | } |
| 135 | } |
| 136 | } |