Skip to content
Open
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
4 changes: 2 additions & 2 deletions charts/code-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 3.4.1
version: 3.30.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 4.9.1
appVersion: 4.103.2
23 changes: 20 additions & 3 deletions charts/code-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ metadata:
helm.sh/chart: {{ include "code-server.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.annotations }}
annotations: {{- toYaml .Values.annotations | nindent 4 }}
{{- end }}
spec:
replicas: 1
replicas: {{ .Values.replicaCount | default 1 }}
strategy:
type: Recreate
selector:
Expand All @@ -20,6 +23,9 @@ spec:
labels:
app.kubernetes.io/name: {{ include "code-server.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.podAnnotations }}
annotations: {{- toYaml .Values.podAnnotations | nindent 8 }}
{{- end }}
spec:
imagePullSecrets: {{- toYaml .Values.imagePullSecrets | nindent 8 }}
{{- if .Values.hostnameOverride }}
Expand All @@ -32,8 +38,9 @@ spec:
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
{{- end }}
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
{{- if or (and .Values.volumePermissions.enabled .Values.persistence.enabled) .Values.extraInitContainers }}
initContainers:
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
- name: init-chmod-data
image: busybox:latest
imagePullPolicy: IfNotPresent
Expand All @@ -47,6 +54,7 @@ spec:
volumeMounts:
- name: data
mountPath: /home/coder
{{- end }}
{{- if .Values.extraInitContainers }}
{{ tpl .Values.extraInitContainers . | indent 6}}
{{- end }}
Expand Down Expand Up @@ -102,6 +110,7 @@ spec:
{{- range .Values.extraSecretMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
subPath: {{ .subPath | default "" }}
readOnly: {{ .readOnly }}
{{- end }}
{{- range .Values.extraVolumeMounts }}
Expand All @@ -114,6 +123,11 @@ spec:
- name: http
containerPort: 8080
protocol: TCP
{{- range .Values.extraPorts }}
- name: {{ .name }}
containerPort: {{ .port }}
protocol: {{ .protocol }}
{{- end }}
livenessProbe:
httpGet:
path: /
Expand Down Expand Up @@ -168,9 +182,12 @@ spec:
{{- if .existingClaim }}
persistentVolumeClaim:
claimName: {{ .existingClaim }}
{{- else }}
{{- else if .hostPath }}
hostPath:
path: {{ .hostPath }}
type: Directory
{{- else }}
emptyDir:
{{- toYaml .emptyDir | nindent 10 }}
{{- end }}
{{- end }}
8 changes: 5 additions & 3 deletions charts/code-server/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.existingSecret }}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -11,8 +12,9 @@ metadata:
app.kubernetes.io/managed-by: {{ .Release.Service }}
type: Opaque
data:
{{ if .Values.password }}
{{- if .Values.password }}
password: "{{ .Values.password | b64enc }}"
{{ else }}
{{- else }}
password: "{{ randAlphaNum 24 | b64enc }}"
{{ end }}
{{- end }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/code-server/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ spec:
targetPort: http
protocol: TCP
name: http
{{- range .Values.extraPorts }}
- port: {{ .port }}
targetPort: {{ .port }}
protocol: {{ .protocol }}
name: {{ .name }}
{{- end }}
selector:
app.kubernetes.io/name: {{ include "code-server.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
64 changes: 46 additions & 18 deletions charts/code-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ replicaCount: 1

image:
repository: codercom/code-server
tag: '4.9.1'
tag: '4.103.2'
pullPolicy: Always

# Specifies one or more secrets to be used when pulling images from a
Expand All @@ -19,6 +19,9 @@ nameOverride: ""
fullnameOverride: ""
hostnameOverride: ""

# The existing secret to use for code-server authentication in the frontend. the password is stored in the secret under the key `password`
# existingSecret: ""

serviceAccount:
# Specifies whether a service account should be created
create: true
Expand All @@ -28,6 +31,9 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name: ""

# Specifies annotations for deployment
annotations: {}

podAnnotations: {}

podSecurityContext: {}
Expand Down Expand Up @@ -71,9 +77,10 @@ extraArgs: []
# Optional additional environment variables
extraVars: []
# - name: DISABLE_TELEMETRY
# value: true
# value: "true"
# if dind is desired:
# - name: DOCKER_HOST
# value: "tcp://localhost:2375"
# value: "tcp://localhost:2376"

##
## Init containers parameters:
Expand Down Expand Up @@ -136,25 +143,39 @@ lifecycle:
# - -c
# - curl -s -L SOME_SCRIPT | bash

# for dind, the following may be helpful
# postStart:
# exec:
# command:
# - /bin/sh
# - -c
# - |
# sudo apt-get update \
# && sudo apt-get install -y docker.io

## Enable an Specify container in extraContainers.
## This is meant to allow adding code-server dependencies, like docker-dind.
extraContainers: |
# If docker-dind is used, DOCKER_HOST env is mandatory to set in "extraVars"
#- name: docker-dind
# image: docker:19.03-dind
# imagePullPolicy: IfNotPresent
# resources:
# requests:
# cpu: 250m
# memory: 256M
# securityContext:
# privileged: true
# procMount: Default
# env:
# - name: DOCKER_TLS_CERTDIR
# value: ""
# - name: DOCKER_DRIVER
# value: "overlay2"
# - name: docker-dind
# image: docker:28.3.2-dind
# imagePullPolicy: IfNotPresent
# resources:
# requests:
# cpu: 1
# ephemeral-storage: "50Gi"
# memory: 10Gi
# securityContext:
# privileged: true
# procMount: Default
# env:
# - name: DOCKER_TLS_CERTDIR
# value: "" # disable TLS setup
# command:
# - dockerd
# - --host=unix:///var/run/docker.sock
# - --host=tcp://0.0.0.0:2376


extraInitContainers: |
# - name: customization
Expand All @@ -179,6 +200,7 @@ extraInitContainers: |
extraSecretMounts: []
# - name: secret-files
# mountPath: /etc/secrets
# subPath: private.key # (optional)
# secretName: code-server-secret-files
# readOnly: true

Expand All @@ -189,10 +211,16 @@ extraVolumeMounts: []
# readOnly: true
# existingClaim: volume-claim
# hostPath: ""
# emptyDir: {}

extraConfigmapMounts: []
# - name: certs-configmap
# mountPath: /etc/code-server/ssl/
# subPath: certificates.crt # (optional)
# configMap: certs-configmap
# readOnly: true

extraPorts: []
# - name: minecraft
# port: 25565
# protocol: tcp