Allow release to specify namespace for install (#5631)

The deployment, service, and serviceaccount resources were missing
metadata.namespace which limited options for installing the chart to a
specific namespace. Now the namespace is specified for all resources and
using the --namespace command with helm install isn't required anymore,
which is helpful when using tools like Argocd or Grafana Tanka.

Co-authored-by: Benjamin Davis <benjamin.davis@kyriba.com>
This commit is contained in:
Benjamin Davis
2021-03-02 04:29:04 -08:00
committed by GitHub
parent 6282c06401
commit 2ee43e504e
4 changed files with 4 additions and 1 deletions

View File

@@ -24,4 +24,4 @@ sources:
- https://github.com/kubernetes-sigs/external-dns
- https://github.com/bitnami/bitnami-docker-external-dns
- https://github.com/kubernetes-sigs/external-dns
version: 4.8.4
version: 4.8.5

View File

@@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "external-dns.fullname" . }}
namespace: {{ .Release.Namespace }}
labels: {{ include "external-dns.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicas }}

View File

@@ -3,6 +3,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ template "external-dns.fullname" . }}
namespace: {{ .Release.Namespace }}
labels: {{ include "external-dns.labels" . | nindent 4 }}
{{- if .Values.service.labels -}}
{{ toYaml .Values.service.labels | nindent 4 }}

View File

@@ -3,6 +3,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "external-dns.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels: {{ include "external-dns.labels" . | nindent 4 }}
{{- if .Values.serviceAccount.annotations }}
annotations: {{ toYaml .Values.serviceAccount.annotations | nindent 4 }}