| gio | 932849f | 2024-08-02 09:01:48 +0400 | [diff] [blame^] | 1 | # coder -- Primary configuration for `coder server`. |
| 2 | coder: |
| 3 | # coder.env -- The environment variables to set for Coder. These can be used |
| 4 | # to configure all aspects of `coder server`. Please see `coder server --help` |
| 5 | # for information about what environment variables can be set. |
| 6 | # Note: The following environment variables are set by default and cannot be |
| 7 | # overridden: |
| 8 | # - CODER_HTTP_ADDRESS: set to 0.0.0.0:8080 and cannot be changed. |
| 9 | # - CODER_TLS_ADDRESS: set to 0.0.0.0:8443 if tls.secretName is not empty. |
| 10 | # - CODER_TLS_ENABLE: set if tls.secretName is not empty. |
| 11 | # - CODER_TLS_CERT_FILE: set if tls.secretName is not empty. |
| 12 | # - CODER_TLS_KEY_FILE: set if tls.secretName is not empty. |
| 13 | # - CODER_PROMETHEUS_ADDRESS: set to 0.0.0.0:2112 and cannot be changed. |
| 14 | # Prometheus must still be enabled by setting CODER_PROMETHEUS_ENABLE. |
| 15 | # - KUBE_POD_IP |
| 16 | # - CODER_DERP_SERVER_RELAY_URL |
| 17 | # |
| 18 | # We will additionally set CODER_ACCESS_URL if unset to the cluster service |
| 19 | # URL, unless coder.envUseClusterAccessURL is set to false. |
| 20 | env: [] |
| 21 | # - name: "CODER_ACCESS_URL" |
| 22 | # value: "https://coder.example.com" |
| 23 | |
| 24 | # coder.envFrom -- Secrets or ConfigMaps to use for Coder's environment |
| 25 | # variables. If you want one environment variable read from a secret, then use |
| 26 | # coder.env valueFrom. See the K8s docs for valueFrom here: |
| 27 | # https://kubernetes.io/docs/tasks/inject-data-application/distribute-credentials-secure/#define-container-environment-variables-using-secret-data |
| 28 | # |
| 29 | # If setting CODER_ACCESS_URL in coder.envFrom, then you must set |
| 30 | # coder.envUseClusterAccessURL to false. |
| 31 | envFrom: [] |
| 32 | # - configMapRef: |
| 33 | # name: coder-config |
| 34 | # - secretRef: |
| 35 | # name: coder-config |
| 36 | |
| 37 | # coder.envUseClusterAccessURL -- Determines whether the CODER_ACCESS_URL env |
| 38 | # is added to coder.env if it's not already set there. Set this to false if |
| 39 | # defining CODER_ACCESS_URL in coder.envFrom to avoid conflicts. |
| 40 | envUseClusterAccessURL: true |
| 41 | |
| 42 | # coder.image -- The image to use for Coder. |
| 43 | image: |
| 44 | # coder.image.repo -- The repository of the image. |
| 45 | repo: "ghcr.io/coder/coder" |
| 46 | # coder.image.tag -- The tag of the image, defaults to {{.Chart.AppVersion}} |
| 47 | # if not set. If you're using the chart directly from git, the default |
| 48 | # app version will not work and you'll need to set this value. The helm |
| 49 | # chart helpfully fails quickly in this case. |
| 50 | tag: "" |
| 51 | # coder.image.pullPolicy -- The pull policy to use for the image. See: |
| 52 | # https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy |
| 53 | pullPolicy: IfNotPresent |
| 54 | # coder.image.pullSecrets -- The secrets used for pulling the Coder image from |
| 55 | # a private registry. |
| 56 | pullSecrets: [] |
| 57 | # - name: "pull-secret" |
| 58 | |
| 59 | # coder.initContainers -- Init containers for the deployment. See: |
| 60 | # https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ |
| 61 | initContainers: |
| 62 | [] |
| 63 | # - name: init-container |
| 64 | # image: busybox:1.28 |
| 65 | # command: ['sh', '-c', "sleep 2"] |
| 66 | |
| 67 | # coder.annotations -- The Deployment annotations. See: |
| 68 | # https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ |
| 69 | annotations: {} |
| 70 | |
| 71 | # coder.labels -- The Deployment labels. See: |
| 72 | # https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ |
| 73 | labels: {} |
| 74 | |
| 75 | # coder.podAnnotations -- The Coder pod annotations. See: |
| 76 | # https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ |
| 77 | podAnnotations: {} |
| 78 | |
| 79 | # coder.podLabels -- The Coder pod labels. See: |
| 80 | # https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ |
| 81 | podLabels: {} |
| 82 | |
| 83 | # coder.serviceAccount -- Configuration for the automatically created service |
| 84 | # account. Creation of the service account cannot be disabled. |
| 85 | serviceAccount: |
| 86 | # coder.serviceAccount.workspacePerms -- Whether or not to grant the coder |
| 87 | # service account permissions to manage workspaces. This includes |
| 88 | # permission to manage pods and persistent volume claims in the deployment |
| 89 | # namespace. |
| 90 | # |
| 91 | # It is recommended to keep this on if you are using Kubernetes templates |
| 92 | # within Coder. |
| 93 | workspacePerms: true |
| 94 | # coder.serviceAccount.enableDeployments -- Provides the service account |
| 95 | # permission to manage Kubernetes deployments. Depends on workspacePerms. |
| 96 | enableDeployments: true |
| 97 | # coder.serviceAccount.extraRules -- Additional permissions added to the SA |
| 98 | # role. Depends on workspacePerms. |
| 99 | extraRules: [] |
| 100 | # - apiGroups: [""] |
| 101 | # resources: ["services"] |
| 102 | # verbs: |
| 103 | # - create |
| 104 | # - delete |
| 105 | # - deletecollection |
| 106 | # - get |
| 107 | # - list |
| 108 | # - patch |
| 109 | # - update |
| 110 | # - watch |
| 111 | |
| 112 | # coder.serviceAccount.annotations -- The Coder service account annotations. |
| 113 | annotations: {} |
| 114 | # coder.serviceAccount.name -- The service account name |
| 115 | name: coder |
| 116 | |
| 117 | # coder.securityContext -- Fields related to the container's security |
| 118 | # context (as opposed to the pod). Some fields are also present in the pod |
| 119 | # security context, in which case these values will take precedence. |
| 120 | securityContext: |
| 121 | # coder.securityContext.runAsNonRoot -- Requires that the coder container |
| 122 | # runs as an unprivileged user. If setting runAsUser to 0 (root), this |
| 123 | # will need to be set to false. |
| 124 | runAsNonRoot: true |
| 125 | # coder.securityContext.runAsUser -- Sets the user id of the container. |
| 126 | # For security reasons, we recommend using a non-root user. |
| 127 | runAsUser: 1000 |
| 128 | # coder.securityContext.runAsGroup -- Sets the group id of the container. |
| 129 | # For security reasons, we recommend using a non-root group. |
| 130 | runAsGroup: 1000 |
| 131 | # coder.securityContext.readOnlyRootFilesystem -- Mounts the container's |
| 132 | # root filesystem as read-only. |
| 133 | readOnlyRootFilesystem: null |
| 134 | # coder.securityContext.seccompProfile -- Sets the seccomp profile for |
| 135 | # the coder container. |
| 136 | seccompProfile: |
| 137 | type: RuntimeDefault |
| 138 | # coder.securityContext.allowPrivilegeEscalation -- Controls whether |
| 139 | # the container can gain additional privileges, such as escalating to |
| 140 | # root. It is recommended to leave this setting disabled in production. |
| 141 | allowPrivilegeEscalation: false |
| 142 | |
| 143 | # coder.volumes -- A list of extra volumes to add to the Coder pod. |
| 144 | volumes: [] |
| 145 | # - name: "my-volume" |
| 146 | # emptyDir: {} |
| 147 | |
| 148 | # coder.volumeMounts -- A list of extra volume mounts to add to the Coder pod. |
| 149 | volumeMounts: [] |
| 150 | # - name: "my-volume" |
| 151 | # mountPath: "/mnt/my-volume" |
| 152 | |
| 153 | # coder.tls -- The TLS configuration for Coder. |
| 154 | tls: |
| 155 | # coder.tls.secretNames -- A list of TLS server certificate secrets to mount |
| 156 | # into the Coder pod. The secrets should exist in the same namespace as the |
| 157 | # Helm deployment and should be of type "kubernetes.io/tls". The secrets |
| 158 | # will be automatically mounted into the pod if specified, and the correct |
| 159 | # "CODER_TLS_*" environment variables will be set for you. |
| 160 | secretNames: [] |
| 161 | |
| 162 | # coder.replicaCount -- The number of Kubernetes deployment replicas. This |
| 163 | # should only be increased if High Availability is enabled. |
| 164 | # |
| 165 | # This is an Enterprise feature. Contact sales@coder.com. |
| 166 | replicaCount: 1 |
| 167 | |
| 168 | # coder.workspaceProxy -- Whether or not this deployment of Coder is a Coder |
| 169 | # Workspace Proxy. Workspace Proxies reduce the latency between the user and |
| 170 | # their workspace for web connections (workspace apps and web terminal) and |
| 171 | # proxied connections from the CLI. Workspace Proxies are optional and only |
| 172 | # recommended for geographically sparse teams. |
| 173 | # |
| 174 | # Make sure you set CODER_PRIMARY_ACCESS_URL and CODER_PROXY_SESSION_TOKEN in |
| 175 | # the environment below. You can get a proxy token using the CLI: |
| 176 | # coder wsproxy create \ |
| 177 | # --name "proxy-name" \ |
| 178 | # --display-name "Proxy Name" \ |
| 179 | # --icon "/emojis/xyz.png" |
| 180 | # |
| 181 | # This is an Enterprise feature. Contact sales@coder.com |
| 182 | # Docs: https://coder.com/docs/v2/latest/admin/workspace-proxies |
| 183 | workspaceProxy: false |
| 184 | |
| 185 | # coder.lifecycle -- container lifecycle handlers for the Coder container, allowing |
| 186 | # for lifecycle events such as postStart and preStop events |
| 187 | # See: https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/ |
| 188 | lifecycle: |
| 189 | {} |
| 190 | # postStart: |
| 191 | # exec: |
| 192 | # command: ["/bin/sh", "-c", "echo postStart"] |
| 193 | # preStop: |
| 194 | # exec: |
| 195 | # command: ["/bin/sh","-c","echo preStart"] |
| 196 | |
| 197 | # coder.resources -- The resources to request for Coder. These are optional |
| 198 | # and are not set by default. |
| 199 | resources: |
| 200 | {} |
| 201 | # limits: |
| 202 | # cpu: 2000m |
| 203 | # memory: 4096Mi |
| 204 | # requests: |
| 205 | # cpu: 2000m |
| 206 | # memory: 4096Mi |
| 207 | |
| 208 | # coder.certs -- CA bundles to mount inside the Coder pod. |
| 209 | certs: |
| 210 | # coder.certs.secrets -- A list of CA bundle secrets to mount into the Coder |
| 211 | # pod. The secrets should exist in the same namespace as the Helm |
| 212 | # deployment. |
| 213 | # |
| 214 | # The given key in each secret is mounted at |
| 215 | # `/etc/ssl/certs/{secret_name}.crt`. |
| 216 | secrets: |
| 217 | [] |
| 218 | # - name: "my-ca-bundle" |
| 219 | # key: "ca-bundle.crt" |
| 220 | |
| 221 | # coder.affinity -- Allows specifying an affinity rule for the `coder` deployment. |
| 222 | # The default rule prefers to schedule coder pods on different |
| 223 | # nodes, which is only applicable if coder.replicaCount is greater than 1. |
| 224 | affinity: |
| 225 | podAntiAffinity: |
| 226 | preferredDuringSchedulingIgnoredDuringExecution: |
| 227 | - podAffinityTerm: |
| 228 | labelSelector: |
| 229 | matchExpressions: |
| 230 | - key: app.kubernetes.io/instance |
| 231 | operator: In |
| 232 | values: |
| 233 | - "coder" |
| 234 | topologyKey: kubernetes.io/hostname |
| 235 | weight: 1 |
| 236 | |
| 237 | # coder.tolerations -- Tolerations for tainted nodes. |
| 238 | # See: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ |
| 239 | tolerations: |
| 240 | {} |
| 241 | # - key: "key" |
| 242 | # operator: "Equal" |
| 243 | # value: "value" |
| 244 | # effect: "NoSchedule" |
| 245 | |
| 246 | # coder.nodeSelector -- Node labels for constraining coder pods to nodes. |
| 247 | # See: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector |
| 248 | nodeSelector: {} |
| 249 | # kubernetes.io/os: linux |
| 250 | |
| 251 | # coder.service -- The Service object to expose for Coder. |
| 252 | service: |
| 253 | # coder.service.enable -- Whether to create the Service object. |
| 254 | enable: true |
| 255 | # coder.service.type -- The type of service to expose. See: |
| 256 | # https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types |
| 257 | type: LoadBalancer |
| 258 | # coder.service.sessionAffinity -- Must be set to ClientIP or None |
| 259 | # AWS ELB does not support session stickiness based on ClientIP, so you must set this to None. |
| 260 | # The error message you might see: "Unsupported load balancer affinity: ClientIP" |
| 261 | # https://kubernetes.io/docs/reference/networking/virtual-ips/#session-affinity |
| 262 | sessionAffinity: None |
| 263 | # coder.service.externalTrafficPolicy -- The external traffic policy to use. |
| 264 | # You may need to change this to "Local" to preserve the source IP address |
| 265 | # in some situations. |
| 266 | # https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip |
| 267 | externalTrafficPolicy: Cluster |
| 268 | # coder.service.loadBalancerIP -- The IP address of the LoadBalancer. If not |
| 269 | # specified, a new IP will be generated each time the load balancer is |
| 270 | # recreated. It is recommended to manually create a static IP address in |
| 271 | # your cloud and specify it here in production to avoid accidental IP |
| 272 | # address changes. |
| 273 | loadBalancerIP: "" |
| 274 | # coder.service.annotations -- The service annotations. See: |
| 275 | # https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer |
| 276 | annotations: {} |
| 277 | # coder.service.httpNodePort -- Enabled if coder.service.type is set to |
| 278 | # NodePort. If not set, Kubernetes will allocate a port from the default |
| 279 | # range, 30000-32767. |
| 280 | httpNodePort: "" |
| 281 | # coder.service.httpsNodePort -- Enabled if coder.service.type is set to |
| 282 | # NodePort. If not set, Kubernetes will allocate a port from the default |
| 283 | # range, 30000-32767. |
| 284 | httpsNodePort: "" |
| 285 | |
| 286 | # coder.ingress -- The Ingress object to expose for Coder. |
| 287 | ingress: |
| 288 | # coder.ingress.enable -- Whether to create the Ingress object. If using an |
| 289 | # Ingress, we recommend not specifying coder.tls.secretNames as the Ingress |
| 290 | # will handle TLS termination. |
| 291 | enable: false |
| 292 | # coder.ingress.className -- The name of the Ingress class to use. |
| 293 | className: "" |
| 294 | # coder.ingress.host -- The hostname to match on. |
| 295 | # Be sure to also set CODER_ACCESS_URL within coder.env[] |
| 296 | host: "" |
| 297 | # coder.ingress.wildcardHost -- The wildcard hostname to match on. Should be |
| 298 | # in the form "*.example.com" or "*-suffix.example.com". If you are using a |
| 299 | # suffix after the wildcard, the suffix will be stripped from the created |
| 300 | # ingress to ensure that it is a legal ingress host. Optional if not using |
| 301 | # applications over subdomains. |
| 302 | # Be sure to also set CODER_WILDCARD_ACCESS_URL within coder.env[] |
| 303 | wildcardHost: "" |
| 304 | # coder.ingress.annotations -- The ingress annotations. |
| 305 | annotations: {} |
| 306 | # coder.ingress.tls -- The TLS configuration to use for the Ingress. |
| 307 | tls: |
| 308 | # coder.ingress.tls.enable -- Whether to enable TLS on the Ingress. |
| 309 | enable: false |
| 310 | # coder.ingress.tls.secretName -- The name of the TLS secret to use. |
| 311 | secretName: "" |
| 312 | # coder.ingress.tls.wildcardSecretName -- The name of the TLS secret to |
| 313 | # use for the wildcard host. |
| 314 | wildcardSecretName: "" |
| 315 | |
| 316 | # coder.command -- The command to use when running the Coder container. Used |
| 317 | # for customizing the location of the `coder` binary in your image. |
| 318 | command: |
| 319 | - /opt/coder |
| 320 | |
| 321 | # coder.commandArgs -- Set arguments for the entrypoint command of the Coder pod. |
| 322 | commandArgs: [] |
| 323 | |
| 324 | # provisionerDaemon -- Configuration for external provisioner daemons. |
| 325 | # |
| 326 | # This is an Enterprise feature. Contact sales@coder.com. |
| 327 | provisionerDaemon: |
| 328 | # provisionerDaemon.pskSecretName -- The name of the Kubernetes secret that contains the |
| 329 | # Pre-Shared Key (PSK) to use to authenticate external provisioner daemons with Coder. The |
| 330 | # secret must be in the same namespace as the Helm deployment, and contain an item called "psk" |
| 331 | # which contains the pre-shared key. |
| 332 | pskSecretName: "" |
| 333 | |
| 334 | # extraTemplates -- Array of extra objects to deploy with the release. Strings |
| 335 | # are evaluated as a template and can use template expansions and functions. All |
| 336 | # other objects are used as yaml. |
| 337 | extraTemplates: |
| 338 | #- | |
| 339 | # apiVersion: v1 |
| 340 | # kind: ConfigMap |
| 341 | # metadata: |
| 342 | # name: my-configmap |
| 343 | # data: |
| 344 | # key: {{ .Values.myCustomValue | quote }} |