Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ View [our docs](https://coder.com/docs/setup/installation) for detailed installa
| certs | object | Certificate that will be mounted inside Coder services. | `{"secret":{"key":"","name":""}}` |
| certs.secret.key | string | Key pointing to a certificate in the secret. | `""` |
| certs.secret.name | string | Name of the secret. | `""` |
| coderd | object | Primary service responsible for all things Coder! | `{"builtinProviderServiceAccount":{"annotations":{},"labels":{}},"devurlsHost":"","image":"","oidc":{"enableRefresh":false,"redirectOptions":{}},"podSecurityContext":{"runAsNonRoot":true,"runAsUser":1000,"seccompProfile":{"type":"RuntimeDefault"}},"replicas":1,"resources":{"limits":{"cpu":"250m","memory":"512Mi"},"requests":{"cpu":"250m","memory":"512Mi"}},"satellite":{"accessURL":"","enable":false,"primaryURL":""},"securityContext":{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"seccompProfile":{"type":"RuntimeDefault"}},"serviceAnnotations":{},"serviceNodePorts":{"http":null,"https":null},"serviceSpec":{"externalTrafficPolicy":"Local","loadBalancerIP":"","loadBalancerSourceRanges":[],"type":"LoadBalancer"},"superAdmin":{"passwordSecret":{"key":"password","name":""}},"tls":{"devurlsHostSecretName":"","hostSecretName":""},"trustProxyIP":false}` |
| coderd | object | Primary service responsible for all things Coder! | `{"affinity":{},"builtinProviderServiceAccount":{"annotations":{},"labels":{}},"devurlsHost":"","image":"","oidc":{"enableRefresh":false,"redirectOptions":{}},"podSecurityContext":{"runAsNonRoot":true,"runAsUser":1000,"seccompProfile":{"type":"RuntimeDefault"}},"replicas":1,"resources":{"limits":{"cpu":"250m","memory":"512Mi"},"requests":{"cpu":"250m","memory":"512Mi"}},"satellite":{"accessURL":"","enable":false,"primaryURL":""},"securityContext":{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"seccompProfile":{"type":"RuntimeDefault"}},"serviceAnnotations":{},"serviceNodePorts":{"http":null,"https":null},"serviceSpec":{"externalTrafficPolicy":"Local","loadBalancerIP":"","loadBalancerSourceRanges":[],"type":"LoadBalancer"},"superAdmin":{"passwordSecret":{"key":"password","name":""}},"tls":{"devurlsHostSecretName":"","hostSecretName":""},"trustProxyIP":false}` |
| coderd.affinity | object | Allows specifying an affinity rule for the `coderd` deployment. If you set `coderd.replicas` to a value higher than 1, you may wish to also add a pod anti-affinity definition to ensure that multiple coderd pods are not scheduled on the same node. | `{}` |
| coderd.builtinProviderServiceAccount | object | Customize the built-in Kubernetes provider service account. | `{"annotations":{},"labels":{}}` |
| coderd.builtinProviderServiceAccount.annotations | object | A KV mapping of annotations. See: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ | `{}` |
| coderd.builtinProviderServiceAccount.labels | object | Add labels to the service account used for the built-in provider. | `{}` |
Expand Down
13 changes: 13 additions & 0 deletions templates/_functions.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,16 @@ resources:
{{- end }}
{{- end }}
{{- end }}

{{/*
coder.template.render -- renders a value that contains template.
Usage:
{{ include "coder.template.render" ( dict "value" .Values.path.to.the.Value "context" $) }}
*/}}
{{- define "coder.template.render" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{- else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is shamlessly lifted from Bitnami's charts repo :-)

3 changes: 3 additions & 0 deletions templates/coderd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ spec:
{{- if not .Values.coderd.satellite.enable }}
serviceAccountName: coder
{{- end }}
{{- if .Values.coderd.affinity }}
affinity: {{- include "coder.template.render" ( dict "value" .Values.coderd.affinity "context" $) | nindent 8 }}
{{- end }}
{{- include "coder.services.nodeSelector" . | indent 6 }}
{{- include "coder.serviceTolerations" . | indent 6 }}
{{- if not .Values.coderd.satellite.enable }}
Expand Down
21 changes: 21 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,27 @@ coderd:
# contains the super admin password.
key: "password"

# coderd.affinity -- Allows specifying an affinity rule for the `coderd`
# deployment. If you set `coderd.replicas` to a value higher than 1, you
# may wish to also add a pod anti-affinity definition to ensure that
# multiple coderd pods are not scheduled on the same node.
affinity: {}
# Example:
# ```
# affinity:
# podAntiAffinity:
# preferredDuringSchedulingIgnoredDuringExecution:
# - podAffinityTerm:
# labelSelector:
# matchExpressions:
# - key: app
# operator: In
# values:
# - "coderd"
# topologyKey: kubernetes.io/hostname
# weight: 1
# ```

# envbox -- Required for running Docker inside containers. See requirements:
# https://coder.com/docs/coder/v1.19/admin/workspace-management/cvms
envbox:
Expand Down