File tree 11 files changed +25
-3
lines changed
11 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,13 @@ Create chart name and version as used by the chart label.
30
30
{ {- printf " %s-%s" .Chart.Name .Chart.Version | replace " +" " _" | trunc 63 | trimSuffix " -" } }
31
31
{ {- end } }
32
32
33
+ { {/*
34
+ Allows overriding the install namespace in combined charts.
35
+ */} }
36
+ { {- define " pmm.namespace" -} }
37
+ { {- default .Release.Namespace .Values.namespaceOverride | trunc 63 | trimSuffix " -" } }
38
+ { {- end } }
39
+
33
40
{ {/*
34
41
Common labels
35
42
*/} }
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
3
3
kind : ClusterRole
4
4
metadata :
5
5
name : {{ include "pmm.fullname" . }}
6
+ namespace : {{ include "pmm.namespace" . }}
6
7
labels :
7
8
{{- include "pmm.labels" . | nindent 4 }}
8
9
rules :
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ roleRef:
11
11
subjects :
12
12
- kind : ServiceAccount
13
13
name : {{ include "pmm.serviceAccountName" . }}
14
- namespace : {{ .Release.Namespace }}
14
+ namespace : {{ include "pmm.namespace" . }}
15
15
{{- else }}
16
16
apiVersion : rbac.authorization.k8s.io/v1
17
17
kind : ClusterRoleBinding
@@ -24,6 +24,6 @@ roleRef:
24
24
subjects :
25
25
- kind : ServiceAccount
26
26
name : {{ include "pmm.serviceAccountName" . }}
27
- namespace : {{ .Release.Namespace }}
27
+ namespace : {{ include "pmm.namespace" . }}
28
28
{{- end }}
29
29
{{- end }}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ apiVersion: v1
3
3
kind : ConfigMap
4
4
metadata :
5
5
name : {{ include "pmm.fullname" . }}
6
+ namespace : {{ include "pmm.namespace" . }}
6
7
labels :
7
8
{{- include "pmm.labels" . | nindent 4 }}
8
9
data :
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ apiVersion: networking.k8s.io/v1
7
7
kind : Ingress
8
8
metadata :
9
9
name : {{ include "pmm.fullname" . }}
10
+ namespace : {{ include "pmm.namespace" . }}
10
11
labels :
11
12
{{- include "pmm.labels" . | nindent 4 }}
12
13
{{- if or .Values.ingress.annotations .Values.ingress.nginxInc }}
@@ -84,6 +85,7 @@ apiVersion: networking.k8s.io/v1
84
85
kind : Ingress
85
86
metadata :
86
87
name : {{ include "pmm.fullname" . }}-grpc
88
+ namespace : {{ include "pmm.namespace" . }}
87
89
labels :
88
90
{{- include "pmm.labels" . | nindent 4 }}
89
91
annotations :
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ apiVersion: v1
3
3
kind : Secret
4
4
metadata :
5
5
name : {{ .Values.certs.name }}
6
+ namespace : {{ include "pmm.namespace" . }}
6
7
labels :
7
8
{{- include "pmm.labels" . | nindent 4 }}
8
9
{{- with .Values.serviceAccount.annotations }}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ apiVersion: v1
3
3
kind : Secret
4
4
metadata :
5
5
name : {{ .Values.secret.name }}
6
+ namespace : {{ include "pmm.namespace" . }}
6
7
labels :
7
8
{{- include "pmm.labels" . | nindent 4 }}
8
9
{{- with .Values.secret.annotations }}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ apiVersion: v1
3
3
kind : Service
4
4
metadata :
5
5
name : {{ .Values.service.name }}
6
+ namespace : {{ include "pmm.namespace" . }}
6
7
labels :
7
8
{{- include "pmm.labels" . | nindent 4 }}
8
9
{{- with .Values.service.annotations }}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ apiVersion: v1
3
3
kind : ServiceAccount
4
4
metadata :
5
5
name : {{ include "pmm.serviceAccountName" . }}
6
+ namespace : {{ include "pmm.namespace" . }}
6
7
labels :
7
8
{{- include "pmm.labels" . | nindent 4 }}
8
9
{{- with .Values.serviceAccount.annotations }}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ apiVersion: apps/v1
2
2
kind : StatefulSet
3
3
metadata :
4
4
name : {{ include "pmm.fullname" . }}
5
+ namespace : {{ include "pmm.namespace" . }}
5
6
labels :
6
7
{{- include "pmm.labels" . | nindent 4 }}
7
8
spec :
16
17
metadata :
17
18
annotations :
18
19
{{- include "pmm.podAnnotations" . | nindent 8 }}
20
+ namespace : {{ include "pmm.namespace" . }}
19
21
labels :
20
22
{{- include "pmm.selectorLabels" . | nindent 8 }}
21
23
spec :
@@ -124,6 +126,7 @@ spec:
124
126
kind : PersistentVolumeClaim
125
127
metadata :
126
128
name : {{ .Values.storage.name }}
129
+ namespace : {{ include "pmm.namespace" . }}
127
130
spec :
128
131
{{- if .Values.storage.selector }}
129
132
selector :
Original file line number Diff line number Diff line change @@ -200,6 +200,10 @@ storage:
200
200
# #
201
201
nameOverride : " "
202
202
203
+ # # @param namespaceOverride String to override namespace. Defaults to the value of .Release.Namespace.
204
+ # #
205
+ namespaceOverride : " "
206
+
203
207
# # @param extraLabels Labels to add to all deployed objects
204
208
# #
205
209
extraLabels : {}
@@ -211,7 +215,7 @@ extraLabels: {}
211
215
# # @param serviceAccount.name Name of the service account to use. If not set and create is true, a name is generated using the fullname template.
212
216
# #
213
217
serviceAccount :
214
- create : true
218
+ create : false
215
219
annotations : {}
216
220
name : " pmm-service-account"
217
221
You can’t perform that action at this time.
0 commit comments