Paramterize the configMap name 62/90262/1
authorRajamohan Raj <rajamohan.raj@intel.com>
Thu, 20 Jun 2019 20:40:38 +0000 (20:40 +0000)
committerRajamohan Raj <rajamohan.raj@intel.com>
Thu, 20 Jun 2019 20:40:38 +0000 (20:40 +0000)
Paramterize the configmap name in the helm chart of
sample-promql-query-app.

Issue-ID: ONAPARC-508
Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com>
Change-Id: I8ec7c6128fbc0577c73abacf1c8496eaf912fec7

vnfs/DAaaS/sample-apps/m3db_promql/templates/configmap_promql_app_env.yaml
vnfs/DAaaS/sample-apps/m3db_promql/templates/deployment.yaml
vnfs/DAaaS/sample-apps/m3db_promql/values.yaml

index 1f54f34..7116a17 100644 (file)
@@ -1,6 +1,6 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: configmap_promql_app_env
+  name: {{ if .Values.prometheus.configMapName }}{{ .Values.prometheus.configMapName }}{{ else }}{{ template "promql_query_app.fullname" . }}{{ end }}
 data:
-  DATA_ENDPOINT: {{ .Values.prometheus.serverURL }}
\ No newline at end of file
+  prometheus_endpoint: {{ .Values.prometheus.serverURL }}
\ No newline at end of file
index 99a4e2a..d82f18f 100644 (file)
@@ -46,8 +46,8 @@ spec:
             - name: DATA_ENDPOINT
               valueFrom:
                 configMapKeyRef:
-                  name: configmap_promql_app_env
-                  key: DATA_ENDPOINT
+                  name: {{ if .Values.prometheus.configMapName }}{{ .Values.prometheus.configMapName }}{{ else }}{{ template "promql_query_app.fullname" . }}{{ end }}
+                  key: prometheus_endpoint
             - name: AWS_ACCESS_KEY_ID
               valueFrom:
                 secretKeyRef:
index 7a66984..9920bcc 100644 (file)
@@ -15,6 +15,7 @@ fullnameOverride: ""
 
 prometheus:
   serverURL: http://172.25.103.1:30090
+  configMapName: ""
 
 ## Model repository information (Minio)
 ## Model repository information (Minio)