blob: 436583028215e39b622c2b431c62333fd8bdd190 [file] [log] [blame]
gio932849f2024-08-02 09:01:48 +04001input: {
2 network: #Network @name(Network)
3 subdomain: string @name(Subdomain)
4}
5
6_domain: "\(input.subdomain).\(input.network.domain)"
7url: "https://\(_domain)"
8
9name: "Coder"
10namespace: "app-coder"
11readme: "VSCode in the browser"
12description: readme
13icon: "<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
gio7fbd4ad2024-08-27 10:06:39 +040015out: {
16 ingress: {
17 coder: {
18 auth: enabled: false
19 network: input.network
20 subdomain: input.subdomain
21 service: {
22 name: "coder"
23 port: name: "http"
24 }
25 }
26 }
27
28 images: {
29 postgres: {
30 repository: "library"
31 name: "postgres"
32 tag: "15.3"
33 pullPolicy: "IfNotPresent"
34 }
35 coder: {
36 registry: "ghcr.io"
37 repository: "coder"
gio932849f2024-08-02 09:01:48 +040038 name: "coder"
gio7fbd4ad2024-08-27 10:06:39 +040039 tag: "latest"
40 pullPolicy: "IfNotPresent"
gio932849f2024-08-02 09:01:48 +040041 }
42 }
gio932849f2024-08-02 09:01:48 +040043
gio7fbd4ad2024-08-27 10:06:39 +040044 charts: {
45 postgres: {
46 kind: "GitRepository"
47 address: "https://code.v1.dodo.cloud/helm-charts"
48 branch: "main"
49 path: "charts/postgresql"
50 }
51 coder: {
52 kind: "GitRepository"
53 address: "https://code.v1.dodo.cloud/helm-charts"
54 branch: "main"
55 path: "charts/coder"
56 }
57 oauth2Client: {
58 kind: "GitRepository"
59 address: "https://code.v1.dodo.cloud/helm-charts"
60 branch: "main"
61 path: "charts/oauth2-client"
gio932849f2024-08-02 09:01:48 +040062 }
63 }
gio7fbd4ad2024-08-27 10:06:39 +040064
65 _oauth2ClientSecretName: "oauth2-credentials"
66
67 helm: {
68 "oauth2-client": {
69 chart: charts.oauth2Client
70 values: {
71 name: "\(release.namespace)-coder"
72 secretName: _oauth2ClientSecretName
73 grantTypes: ["authorization_code"]
74 responseTypes: ["code"]
75 scope: "openid profile email"
76 redirectUris: ["\(url)/api/v2/users/oidc/callbackzot"]
77 hydraAdmin: "http://hydra-admin.\(global.namespacePrefix)core-auth.svc.cluster.local"
gio932849f2024-08-02 09:01:48 +040078 }
79 }
gio7fbd4ad2024-08-27 10:06:39 +040080 postgres: {
81 chart: charts.postgres
82 values: {
83 fullnameOverride: "postgres"
84 image: {
85 registry: images.postgres.registry
86 repository: images.postgres.imageName
87 tag: images.postgres.tag
88 pullPolicy: images.postgres.pullPolicy
gio932849f2024-08-02 09:01:48 +040089 }
gio7fbd4ad2024-08-27 10:06:39 +040090 auth: {
91 username: "coder"
92 password: "coder"
93 database: "coder"
gio932849f2024-08-02 09:01:48 +040094 }
gio7fbd4ad2024-08-27 10:06:39 +040095 }
96 }
97 coder: {
98 chart: charts.coder
99 values: coder: {
100 image: {
101 repo: images.coder.fullName
102 tag: images.coder.tag
103 pullPolicy: images.coder.pullPolicy
104 }
105 envUseClusterAccessURL: false
106 env: [{
107 name: "CODER_ACCESS_URL"
108 value: url
109 }, {
110 name: "CODER_PG_CONNECTION_URL"
111 value: "postgres://coder:coder@postgres.\(release.namespace).svc.cluster.local:5432/coder?sslmode=disable"
112 }, {
113 name: "CODER_OIDC_ISSUER_URL"
114 value: "https://hydra.\(networks.public.domain)"
115 }, {
116 name: "CODER_OIDC_EMAIL_DOMAIN"
117 value: networks.public.domain
118 }, {
119 name: "CODER_OIDC_CLIENT_ID"
120 valueFrom: {
121 secretKeyRef: {
122 name: _oauth2ClientSecretName
123 key: "client_id"
124 }
125 }
126 }, {
127 name: "CODER_OIDC_CLIENT_SECRET"
128 valueFrom: {
129 secretKeyRef: {
130 name: _oauth2ClientSecretName
131 key: "client_secret"
132 }
133 }
134 }]
135 }
gio932849f2024-08-02 09:01:48 +0400136 }
137 }
138}