workspace-provider
by Coder
Run a Coder Workspace Provider in Kubernetes
About this chart
Coder Enterprise Workspace Providers Helm [BETA]
WARNING: This branch may contain updates for a yet unreleased version of Coder. The current state of the repo may not represent the latest release.
This chart provides all of the things necessary to run a beta workspace provider on a second cluster. This chart is only needed for the beta. Envproxy will become a subchart of the main Helm chart in the GA release of this feature.
The Helm package here is only a template for releases: version numbers and image URIs are injected and bundled into releases uploaded to [helm.coder.com][helm-repo].
You can pull the official charts with helm repo add coder https://helm.coder.com.
Changes From Main Chart
Almost all values are identical in usage to the main chart, but a lot of values have been removed as they are unnecessary for an envproxy-only deployment. It should still be safe to provide unused values anyways.
envproxy.accessURL(required ifingress.hostis not set)envproxy.clusterAddress(required)cemanager.accessURL(required)cemanager.token(required)
You can find documentation for these values below. Settings such as dev URLs and SSH access only apply to environments created within this Workspace Provider.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| cemanager.accessURL | string | "" | The cemanager access URL that the envproxy will use to communicate with the cemanager. This must be the public cemanager URL because it's also used for redirecting unauthenticated users to the cemanager. This should be a full URL complete with protocol and no trailing slash. |
| certs | object | {"secret":{"key":"","name":""}} | Describes CAs that should be added to Coder services. These certs are NOT added to environments. |
| certs.secret.key | string | "" | The key in the secret pointing to the certificate bundle. |
| certs.secret.name | string | "" | The name of the secret. |
| clusterDomainSuffix | string | ".svc.cluster.local" | If you've set a custom default domain for your cluster, you may need to remove or change this DNS suffix for service resolution to work correctly. |
| devurls.host | string | "" | Should be a wildcard hostname to allow matching against custom-created dev URLs. Leaving as an empty string results in devurls being disabled. Example: "*.devurls.coder.com". |
| devurls.sslMode | string | "require" | |
| environments.tolerations | list | [] | Tolerations are applied to all user environments. Each element is a regular pod toleration object. To set service tolerations see serviceTolerations. See values.yaml for an example. |
| envproxy.accessURL | string | "" | The URL reported to cemanager. Must be accessible by cemanager and all users who can use this workspace provider. Must be a subdomain of the cemanager access URL. Derived from ingress.host if not set. e.g. "https://wsp.coder.com" |
| envproxy.clusterAddress | string | "" | The address of the K8s cluster, must be reachable from the cemanager. |
| envproxy.image | string | "" | Injected during releases. |
| envproxy.replicas | int | 1 | The number of replicas to run of the envproxy. |
| envproxy.resources | object | {"limits":{"cpu":"250m","memory":"512Mi"},"requests":{"cpu":"250m","memory":"512Mi"}} | Kubernetes resource request and limits for envproxy pods. To unset a value, set it to "". To unset all values, you can provide a values.yaml file which sets resources to nil. See values.yaml for an example. |
| envproxy.terminationGracePeriodSeconds | int | 14400 | Amount of seconds to wait before shutting down the environment proxy if there are still open connections. This is set very long intentionally so developers do not deal with disconnects during deployments. |
| envproxy.token | string | "" | Set by coder-cli during the initial installation. Be careful to not overwrite this with an empty string by setting it to empty string in your custom values file. |
| imagePullPolicy | string | "Always" | Sets the policy for pulling a container image across all services. |
| ingress.additionalAnnotations | list | [] | Additional annotations to be used when creating the ingress. These only apply to the Ingress Kubernetes kind. The annotations can be used to specify certificate issuers or other cloud provider specific integrations. Annotations are provided as strings e.g. [ "mykey:myvalue", "mykey2:myvalue2" ] |
| ingress.host | string | "" | The hostname to use for accessing the platform. This can be left blank and the user can still access the platform from the external IP or a DNS name that resolves to the external IP address. |
| ingress.podSecurityPolicyName | string | "" | The name of the pod security policy the built in ingress controller should abide. It should be noted that the ingress controller requires the NET_BIND_SERVICE capability, privilege escalation, and access to privileged ports to successfully deploy. |
| ingress.service | object | {"annotations":{}} | Options related to the ingress Kubernetes Service object. |
| ingress.service.annotations | object | {} | Additional annotations to add to the Service object. For example to make the ingress spawn an internal load balancer: annotations: cloud.google.com/load-balancer-type: "Internal" |
| ingress.tls | object | {"devurlsHostSecretName":"","enable":false,"hostSecretName":""} | TLS options for the ingress. The hosts used for the tls configuration come from the ingress.host and the devurls.host variables. If those don't exist, then the TLS configuration will be ignored. |
| ingress.tls.devurlsHostSecretName | string | "" | The secret to use for the devurls.host hostname. |
| ingress.tls.enable | bool | false | Enables the tls configuration. |
| ingress.tls.hostSecretName | string | "" | The secret to use for the ingress.host hostname. |
| ingress.useDefault | bool | true | If set to true will deploy an nginx ingress that will allow you to access Coder from an external IP address, but if your kubernetes cluster is configured to provision external IP addresses. If you would like to bring your own ingress and hook Coder into that instead, set this value to false. |
| logging.human | string | "/dev/stderr" | Where to send logs that are formatted for readability by a human. Set to an empty string to disable. |
Deploy workspace-provider with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has workspace-provider on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartworkspace-provider is pinned at v1.21.7 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply