From 2798e0855cab21bb3bae02b36734b6de8fc832fe Mon Sep 17 00:00:00 2001 From: Samiul Saki Date: Tue, 28 Apr 2026 09:10:41 +0200 Subject: [PATCH] feat: Add option to assign field-selector and label-selector --- helm/templates/service.yaml | 8 ++++++++ helm/values.yaml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/helm/templates/service.yaml b/helm/templates/service.yaml index eb10b23..4b9db6b 100644 --- a/helm/templates/service.yaml +++ b/helm/templates/service.yaml @@ -138,6 +138,14 @@ spec: - name: CODER_NAMESPACES value: {{ join "," .Values.namespaces }} {{- end }} + {{- if .Values.fieldSelector }} + - name: CODER_FIELD_SELECTOR + value: {{ .Values.fieldSelector | quote }} + {{- end }} + {{- if .Values.labelSelector }} + - name: CODER_LABEL_SELECTOR + value: {{ .Values.labelSelector | quote }} + {{- end }} {{- if .Values.image.sslCertFile }} - name: SSL_CERT_FILE value: {{ .Values.image.sslCertFile }} diff --git a/helm/values.yaml b/helm/values.yaml index e667225..ee831c1 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -5,6 +5,14 @@ url: "" # If unspecified or empty it will watch all namespaces. namespaces: [] +# fieldSelector -- Kubernetes field selector for filtering pods. +# Use this filter instead of .values.namespaces +fieldSelector: "" + +# labelSelector -- Kubernetes label selector for filtering pods +# Use this filter instead of .values.namespaces +labelSelector: "" + # volumes -- A list of extra volumes to add to the coder-logstream pod. volumes: # emptyDir: {}