From 60f72472a038a0bcb7440f6ff028a422de20edc3 Mon Sep 17 00:00:00 2001 From: Kiran Kamineni Date: Tue, 18 Dec 2018 13:30:38 -0800 Subject: Reconfigure nodeport usage Removed the nodeport usage for sms-db Converted all multicloud-prometheus charts to use ClusterIP for now. We can allocate nodeports for them later on when the services are requested by other services in multicloud. Also, disabled the multicloud-prometheus charts from starting up by default. Change once dependent charts or services are added. Issue-ID: OOM-1555 Change-Id: I2dddc54015844de3abbbf786f95b8bb6eba92d86 Signed-off-by: Kiran Kamineni --- .../charts/multicloud-prometheus/templates/configmap.yaml | 4 ++++ .../charts/multicloud-prometheus/templates/deployment.yaml | 4 ++++ .../multicloud/charts/multicloud-prometheus/templates/pv.yaml | 4 ++++ .../multicloud/charts/multicloud-prometheus/templates/pvc.yaml | 4 ++++ .../multicloud/charts/multicloud-prometheus/templates/service.yaml | 6 +++++- 5 files changed, 21 insertions(+), 1 deletion(-) (limited to 'kubernetes/multicloud/charts/multicloud-prometheus/templates') diff --git a/kubernetes/multicloud/charts/multicloud-prometheus/templates/configmap.yaml b/kubernetes/multicloud/charts/multicloud-prometheus/templates/configmap.yaml index 8b6da6a6c1..a5aff3480b 100644 --- a/kubernetes/multicloud/charts/multicloud-prometheus/templates/configmap.yaml +++ b/kubernetes/multicloud/charts/multicloud-prometheus/templates/configmap.yaml @@ -14,6 +14,8 @@ # limitations under the License. */}} +{{- if .Values.global.prometheus.enabled -}} + apiVersion: v1 kind: ConfigMap metadata: @@ -26,3 +28,5 @@ metadata: heritage: {{ .Release.Service }} data: {{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} + +{{- end -}} \ No newline at end of file diff --git a/kubernetes/multicloud/charts/multicloud-prometheus/templates/deployment.yaml b/kubernetes/multicloud/charts/multicloud-prometheus/templates/deployment.yaml index 00c6e21c5d..562755db91 100644 --- a/kubernetes/multicloud/charts/multicloud-prometheus/templates/deployment.yaml +++ b/kubernetes/multicloud/charts/multicloud-prometheus/templates/deployment.yaml @@ -14,6 +14,8 @@ # limitations under the License. */}} +{{- if .Values.global.prometheus.enabled -}} + apiVersion: extensions/v1beta1 kind: Deployment metadata: @@ -119,3 +121,5 @@ spec: imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" restartPolicy: Always + +{{- end -}} \ No newline at end of file diff --git a/kubernetes/multicloud/charts/multicloud-prometheus/templates/pv.yaml b/kubernetes/multicloud/charts/multicloud-prometheus/templates/pv.yaml index 37ed28ee9d..961b6bba63 100644 --- a/kubernetes/multicloud/charts/multicloud-prometheus/templates/pv.yaml +++ b/kubernetes/multicloud/charts/multicloud-prometheus/templates/pv.yaml @@ -14,6 +14,8 @@ # limitations under the License. */}} +{{- if .Values.global.prometheus.enabled -}} + {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} kind: PersistentVolume apiVersion: v1 @@ -34,4 +36,6 @@ spec: persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} +{{- end -}} + {{- end -}} \ No newline at end of file diff --git a/kubernetes/multicloud/charts/multicloud-prometheus/templates/pvc.yaml b/kubernetes/multicloud/charts/multicloud-prometheus/templates/pvc.yaml index e6aacd1b96..73fcc30ba6 100644 --- a/kubernetes/multicloud/charts/multicloud-prometheus/templates/pvc.yaml +++ b/kubernetes/multicloud/charts/multicloud-prometheus/templates/pvc.yaml @@ -14,6 +14,8 @@ # limitations under the License. */}} +{{- if .Values.global.prometheus.enabled -}} + {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} kind: PersistentVolumeClaim apiVersion: v1 @@ -46,3 +48,5 @@ spec: {{- end }} {{- end }} {{- end -}} + +{{- end -}} \ No newline at end of file diff --git a/kubernetes/multicloud/charts/multicloud-prometheus/templates/service.yaml b/kubernetes/multicloud/charts/multicloud-prometheus/templates/service.yaml index f736793d7b..88f5cac526 100644 --- a/kubernetes/multicloud/charts/multicloud-prometheus/templates/service.yaml +++ b/kubernetes/multicloud/charts/multicloud-prometheus/templates/service.yaml @@ -14,6 +14,8 @@ # limitations under the License. */}} +{{- if .Values.global.prometheus.enabled -}} + apiVersion: v1 kind: Service metadata: @@ -39,4 +41,6 @@ spec: protocol: TCP selector: app: {{ include "common.name" . }} - release: {{ .Release.Name }} \ No newline at end of file + release: {{ .Release.Name }} + +{{- end -}} \ No newline at end of file -- cgit 1.2.3-korg