mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix(helm): ensure coder can be deployed in a non-default namespace (#16579)
Added namespace to all resources in the helm chart and added tests to ensure that coder can be deployed in non-default namespaces, as specified via the namespace flag in the helm command. Ways to verify this: - current state: ```bash $ helm template my-coder coder -n coder --version 2.19.0 --repo https://helm.coder.com/v2 | yq '.metadata.namespace' null --- null --- null --- null --- null ``` - fixed state when checking out this PR: ```bash $ helm template my-coder ./helm/coder -n coder --set coder.image.tag=latest | yq '.metadata.namespace' coder --- coder --- coder --- coder --- coder ``` Change-Id: Ib66d4be9bcc4984dfe15709362e1fe0dcd3e847f Signed-off-by: Thomas Kosiewski <tk@coder.com>
This commit is contained in:
@@ -3,6 +3,7 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "coder.name" .}}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "coder.labels" . | nindent 4 }}
|
||||
{{- with .Values.coder.labels }}
|
||||
@@ -80,6 +81,7 @@ apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ .Values.coder.serviceAccount.name | quote }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{ toYaml .Values.coder.serviceAccount.annotations | nindent 4 }}
|
||||
labels:
|
||||
{{- include "coder.labels" . | nindent 4 }}
|
||||
|
||||
Reference in New Issue
Block a user