Add option to disable specific deployments
Add option to disable any deployment by using conditions in helm
templates. Each deployment will get helm parameter - boolean flag
allowing to disable it. The flags can be listed in the custom
values.yaml file that can be passed to the createAll script with
'-v' command line option.
Change-Id: I32b795de46c72915c2201c94c23f4e061971bb56
Issue-ID: OOM-380
Signed-off-by: yuryn <Yury.Novitsky@Amdocs.com>
diff --git a/kubernetes/policy/templates/all-services.yaml b/kubernetes/policy/templates/all-services.yaml
index 04c984d..a1c4804 100644
--- a/kubernetes/policy/templates/all-services.yaml
+++ b/kubernetes/policy/templates/all-services.yaml
@@ -1,3 +1,4 @@
+#{{ if not .Values.disablePolicyMariadb }}
apiVersion: v1
kind: Service
metadata:
@@ -12,6 +13,8 @@
selector:
app: mariadb
clusterIP: None
+#{{ end }}
+#{{ if not .Values.disablePolicyNexus }}
---
apiVersion: v1
kind: Service
@@ -27,6 +30,8 @@
selector:
app: nexus
clusterIP: None
+#{{ end }}
+#{{ if not .Values.disablePolicyDrools }}
---
apiVersion: v1
kind: Service
@@ -43,6 +48,8 @@
selector:
app: drools
type: NodePort
+#{{ end }}
+#{{ if not .Values.disablePolicyPap }}
---
apiVersion: v1
kind: Service
@@ -62,6 +69,8 @@
selector:
app: pap
type: NodePort
+#{{ end }}
+#{{ if not .Values.disablePolicyPdp }}
---
apiVersion: v1
kind: Service
@@ -98,6 +107,8 @@
selector:
app: pdp
type: NodePort
+#{{ end }}
+#{{ if not .Values.disablePolicyBrmsgw }}
---
apiVersion: v1
kind: Service
@@ -114,3 +125,4 @@
selector:
app: brmsgw
type: NodePort
+#{{ end }}
\ No newline at end of file
diff --git a/kubernetes/policy/templates/dep-brmsgw.yaml b/kubernetes/policy/templates/dep-brmsgw.yaml
index e47b040..df5d888 100644
--- a/kubernetes/policy/templates/dep-brmsgw.yaml
+++ b/kubernetes/policy/templates/dep-brmsgw.yaml
@@ -1,3 +1,4 @@
+#{{ if not .Values.disablePolicyBrmsgw }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
@@ -69,3 +70,4 @@
path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
+#{{ end }}
\ No newline at end of file
diff --git a/kubernetes/policy/templates/dep-drools.yaml b/kubernetes/policy/templates/dep-drools.yaml
index 2f06a08..3e9fa01 100644
--- a/kubernetes/policy/templates/dep-drools.yaml
+++ b/kubernetes/policy/templates/dep-drools.yaml
@@ -1,3 +1,4 @@
+#{{ if not .Values.disablePolicyDrools }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
@@ -111,3 +112,4 @@
path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/drools/
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
+#{{ end }}
\ No newline at end of file
diff --git a/kubernetes/policy/templates/dep-maria.yaml b/kubernetes/policy/templates/dep-maria.yaml
index e3c93d7..c0f5060 100644
--- a/kubernetes/policy/templates/dep-maria.yaml
+++ b/kubernetes/policy/templates/dep-maria.yaml
@@ -1,3 +1,4 @@
+#{{ if not .Values.disablePolicyMariadb }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
@@ -39,3 +40,4 @@
claimName: policy-db
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
+#{{ end }}
\ No newline at end of file
diff --git a/kubernetes/policy/templates/dep-nexus.yaml b/kubernetes/policy/templates/dep-nexus.yaml
index 15b7ec3..07cd334 100644
--- a/kubernetes/policy/templates/dep-nexus.yaml
+++ b/kubernetes/policy/templates/dep-nexus.yaml
@@ -1,3 +1,4 @@
+#{{ if not .Values.disablePolicyNexus }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
@@ -53,3 +54,4 @@
path: /etc/localtime
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
+#{{ end }}
\ No newline at end of file
diff --git a/kubernetes/policy/templates/dep-pap.yaml b/kubernetes/policy/templates/dep-pap.yaml
index aeb3d6b..0816aa5 100644
--- a/kubernetes/policy/templates/dep-pap.yaml
+++ b/kubernetes/policy/templates/dep-pap.yaml
@@ -1,3 +1,4 @@
+#{{ if not .Values.disablePolicyPap }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
@@ -128,3 +129,4 @@
path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
+#{{ end }}
\ No newline at end of file
diff --git a/kubernetes/policy/templates/dep-pdp.yaml b/kubernetes/policy/templates/dep-pdp.yaml
index 841d55c..6cc442b 100644
--- a/kubernetes/policy/templates/dep-pdp.yaml
+++ b/kubernetes/policy/templates/dep-pdp.yaml
@@ -1,3 +1,4 @@
+#{{ if not .Values.disablePolicyPdp }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
@@ -102,3 +103,4 @@
path: /dockerdata-nfs/{{ .Values.nsPrefix }}/policy/opt/policy/config/pe/
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
+#{{ end }}
\ No newline at end of file
diff --git a/kubernetes/policy/templates/policy-pv-pvc.yaml b/kubernetes/policy/templates/policy-pv-pvc.yaml
index 71cf3d8..5dc0c61 100644
--- a/kubernetes/policy/templates/policy-pv-pvc.yaml
+++ b/kubernetes/policy/templates/policy-pv-pvc.yaml
@@ -1,3 +1,4 @@
+#{{ if not .Values.disablePolicyMariadb }}
apiVersion: v1
kind: PersistentVolume
metadata:
@@ -28,3 +29,4 @@
selector:
matchLabels:
name: "{{ .Values.nsPrefix }}-policy-db"
+#{{ end }}
\ No newline at end of file