Added a namespace override so that the namespace where the services are deployed into can be set. Helpful when using this chart as a dependency (sub chart)

Signed-off-by: Andrew Kew <andrew@quadcorps.co.uk>
This commit is contained in:
Andrew Kew 2022-05-19 17:31:55 +01:00
parent 25387770eb
commit 488b015b8d
4 changed files with 8 additions and 3 deletions

View File

@ -3,7 +3,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "cainjector.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ .Values.namespace | default .Release.Namespace | quote }}
labels:
app: {{ include "cainjector.name" . }}
app.kubernetes.io/name: {{ include "cainjector.name" . }}

View File

@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "cert-manager.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ .Values.namespace | default .Release.Namespace | quote }}
labels:
app: {{ template "cert-manager.name" . }}
app.kubernetes.io/name: {{ template "cert-manager.name" . }}

View File

@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "webhook.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
namespace: {{ .Values.namespace | default .Release.Namespace | quote }}
labels:
app: {{ include "webhook.name" . }}
app.kubernetes.io/name: {{ include "webhook.name" . }}

View File

@ -74,6 +74,11 @@ image:
# used. This namespace will not be automatically created by the Helm chart.
clusterResourceNamespace: ""
# This namespace allows you to define where the services will be installed into
# if not set then they will use the namespace of the release
# This is helpful when installing cert manager as a chart dependency (sub chart)
namespace: ""
serviceAccount:
# Specifies whether a service account should be created
create: true