File tree 9 files changed +34
-7
lines changed
9 files changed +34
-7
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,17 @@ Expand the name of the chart.
6
6
{ {- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix " -" } }
7
7
{ {- end } }
8
8
9
+ { {/*
10
+ Determine the namespace to use, allowing for a namespace override.
11
+ */} }
12
+ { {- define " kube-vip-cloudprovider.namespace" -} }
13
+ { {- if .Values.namespaceOverride } }
14
+ { {- .Values.namespaceOverride } }
15
+ { {- else } }
16
+ { {- .Release.Namespace } }
17
+ { {- end } }
18
+ { {- end } }
19
+
9
20
{ {/*
10
21
Create a default fully qualified app name.
11
22
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ apiVersion: v1
3
3
kind : ConfigMap
4
4
metadata :
5
5
name : {{ include "kube-vip-cloud-provider.name" . }}
6
- namespace : {{ .Release.Namespace }}
6
+ namespace : {{ include "kube-vip-cloudprovider.namespace" . }}
7
7
data :
8
8
{{- range $key, $value := .Values.cm.data }}
9
9
{{ $key }}: {{ $value | quote }}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: apps/v1
2
2
kind : Deployment
3
3
metadata :
4
4
name : {{ include "kube-vip-cloud-provider.name" . }}
5
- namespace : {{ .Release.Namespace | default "kube-system" }}
5
+ namespace : {{ include "kube-vip-cloudprovider.namespace" . | default "kube-system" }}
6
6
spec :
7
7
replicas : {{ .Values.replicasCount }}
8
8
selector :
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: v1
2
2
kind : ServiceAccount
3
3
metadata :
4
4
name : {{ include "kube-vip-cloud-provider.name" . }}
5
- namespace : {{ .Release.Namespace | default "kube-system" }}
5
+ namespace : {{ include "kube-vip-cloudprovider.namespace" . | default "kube-system" }}
6
6
labels :
7
7
{{- include "kube-vip-cloud-provider.labels" . | nindent 4 }}
8
8
---
@@ -34,4 +34,4 @@ roleRef:
34
34
subjects :
35
35
- kind : ServiceAccount
36
36
name : {{ include "kube-vip-cloud-provider.name" . }}
37
- namespace : {{ .Release.Namespace }}
37
+ namespace : {{ include "kube-vip-cloudprovider.namespace" . }}
Original file line number Diff line number Diff line change 10
10
# Overrides the image tag whose default is the chart appVersion.
11
11
# tag: "v0.0.4"
12
12
13
+ # Custom namespace to override the namespace for the deployed resources.
14
+ namespaceOverride : " "
15
+
13
16
# # Cloud Provider ConfigMap
14
17
# # CIDR blocks , IP ranges [start address - end address]
15
18
# # Multiple pools by CIDR per Namespace, Multiple IP ranges per Namespace (handles overlapping ranges)
Original file line number Diff line number Diff line change @@ -24,6 +24,17 @@ If release name contains chart name it will be used as a full name.
24
24
{ {- end } }
25
25
{ {- end } }
26
26
27
+ { {/*
28
+ Determine the namespace to use, allowing for a namespace override.
29
+ */} }
30
+ { {- define " kube-vip.namespace" -} }
31
+ { {- if .Values.namespaceOverride } }
32
+ { {- .Values.namespaceOverride } }
33
+ { {- else } }
34
+ { {- .Release.Namespace } }
35
+ { {- end } }
36
+ { {- end } }
37
+
27
38
{ {/*
28
39
Create chart name and version as used by the chart label.
29
40
*/} }
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: apps/v1
2
2
kind : DaemonSet
3
3
metadata :
4
4
name : {{ include "kube-vip.name" . }}
5
- namespace : {{ .Release.Namespace | default "kube-system" }}
5
+ namespace : {{ include "kube-vip.namespace" . | default "kube-system" }}
6
6
spec :
7
7
selector :
8
8
matchLabels :
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: v1
2
2
kind : ServiceAccount
3
3
metadata :
4
4
name : {{ include "kube-vip.name" . }}
5
- namespace : {{ .Release.Namespace }}
5
+ namespace : {{ include "kube-vip.namespace" . }}
6
6
labels :
7
7
{{- include "kube-vip.labels" . | nindent 4 }}
8
8
---
@@ -33,4 +33,4 @@ roleRef:
33
33
subjects :
34
34
- kind : ServiceAccount
35
35
name : {{ include "kube-vip.name" . }}
36
- namespace : {{ .Release.Namespace }}
36
+ namespace : {{ include "kube-vip.namespace" . }}
Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ extraLabels: {}
55
55
imagePullSecrets : []
56
56
nameOverride : " "
57
57
fullnameOverride : " "
58
+ # Custom namespace to override the namespace for the deployed resources.
59
+ namespaceOverride : " "
58
60
59
61
serviceAccount :
60
62
# Specifies whether a service account should be created
You can’t perform that action at this time.
0 commit comments