Add options to configure livenessprobe using values.yaml file. Fix some minor problems. 73/573/1
authorZhe Huang <zhehuang@research.att.com>
Fri, 26 Jul 2019 19:51:27 +0000 (15:51 -0400)
committerZhe Huang <zhehuang@research.att.com>
Fri, 26 Jul 2019 19:51:27 +0000 (15:51 -0400)
Signed-off-by: Zhe Huang <zhehuang@research.att.com>
Change-Id: Id58f66feb1e02d244e0845b5dbb90fb3873f39ec

ric-xapps/90-xApps/bin/install
ric-xapps/90-xApps/helm/xapp-std/templates/appconfig.yaml
ric-xapps/90-xApps/helm/xapp-std/templates/deployment.yaml
ric-xapps/90-xApps/helm/xapp-std/templates/service-rmr.yaml
ric-xapps/90-xApps/helm/xapp-std/values.yaml

index 08f4563..3ed7fe6 100755 (executable)
@@ -155,7 +155,8 @@ else
 fi
 
 
-
+mkdir /tmp/$CHART_NAME/config/
+mkdir /tmp/$CHART_NAME/descriptors/
 
 cp $CONFIG_JSON_PATH /tmp/$CHART_NAME/config/
 cp $DESCRIPTOR_PATH /tmp/$CHART_NAME/descriptors/
index e08ecc8..ab8c294 100644 (file)
@@ -29,4 +29,4 @@ data:
 {{- $rtmgrrmrservice := .Values.ricplt.rtmgrRMRService | quote -}}
 {{- $a1mediatorrmrservice := .Values.ricplt.a1mediatorRMRService | quote -}}
 
-{{ (.Files.Glob "config/*").AsConfig | replace "__DBAAS_SERVICE__" $dbaasservice | replace "__PLT_INGRESS_URL__" $pltingressurl | replace "__XAPP_INGRESS_URL__" $xappingressurl | replace "__APPMGR_RMR_SERVICE__" $appmgrrmrservice | replace "__E2MGR_RMR_SERVICE__" $e2mgrrmrservice | replace "__E2TERM_RMR_SERVICE__" $e2termrmrservice | replace "__RTMGR_RMR_SERVICE__" $rtmgrrmrservice | replace "__A1MEDIATOR_RMR_SERVICE__" $a1mediatorrmrservice | indent 2 }}
+{{- (.Files.Glob "config/*").AsConfig | replace "__DBAAS_SERVICE__" $dbaasservice | replace "__PLT_INGRESS_URL__" $pltingressurl | replace "__XAPP_INGRESS_URL__" $xappingressurl | replace "__APPMGR_RMR_SERVICE__" $appmgrrmrservice | replace "__E2MGR_RMR_SERVICE__" $e2mgrrmrservice | replace "__E2TERM_RMR_SERVICE__" $e2termrmrservice | replace "__RTMGR_RMR_SERVICE__" $rtmgrrmrservice | replace "__A1MEDIATOR_RMR_SERVICE__" $a1mediatorrmrservice | nindent 2 }}
index 28bd23b..b539b9b 100644 (file)
@@ -46,10 +46,10 @@ spec:
             - name: http
               containerPort: {{ .Values.ricxapp.service.http.containerPort }}
               protocol: TCP
-            - name: rmrRoute
+            - name: rmrroute
               containerPort: {{ .Values.ricxapp.service.rmr.route.port }}
               protocol: TCP
-            - name: rmrData
+            - name: rmrdata
               containerPort: {{ .Values.ricxapp.service.rmr.data.port }}
               protocol: TCP
           volumeMounts:
@@ -58,18 +58,14 @@ spec:
           envFrom:
             - configMapRef:
                 name: {{ include "ricxapp.configmapname" . }}-appenv
+          {{- if .Values.ricxapp.livenessProbe }}
           livenessProbe:
-            httpGet:
-              path: {{ .Values.ricxapp.probes.healthAliveCheckEndpoint }}
-              port: {{ .Values.ricxapp.service.http.containerPort }}
-            initialDelaySeconds: 5
-            periodSeconds: 15
+            {{- .Values.ricxapp.livenessProbe | nindent 12 -}}
+          {{ end }}
+          {{- if .Values.ricxapp.readinessProbe }}
           readinessProbe:
-            httpGet:
-              path: {{ .Values.ricxapp.probes.healthReadyCheckEndpoint }}
-              port: {{ .Values.ricxapp.service.http.containerPort }}
-            initialDelaySeconds: 5
-            periodSeconds: 15
+            {{- .Values.ricxapp.readinessProbe | nindent 12 -}}
+          {{ end }}
           restartPolicy: Always
       volumes:
         - name: config-volume
index ee1670b..14a7572 100644 (file)
@@ -29,13 +29,13 @@ spec:
   type: ClusterIP
   ports:
     - port: {{ .Values.ricxapp.service.rmr.data.port }}
-      targetPort: rmrData
+      targetPort: rmrdata
       protocol: TCP
-      name: rmrData
+      name: rmrdata
     - port: {{ .Values.ricxapp.service.rmr.route.port }}
-      targetPort: rmrRoute
+      targetPort: rmrroute
       protocol: TCP
-      name: rmrRoute
+      name: rmrroute
   selector:
     app: {{ include "ricxapp.namespace" . }}-{{ include "ricxapp.name" . }}
     release: {{ .Release.Name }}
index bf9be32..50eab3c 100644 (file)
@@ -53,9 +53,20 @@ ricxapp:
       data:
         port: 4560
 
-  probes:
-    healthAliveCheckEndpoint: ric/v1/health/alive
-    healthReadyCheckEndpoint: ric/v1/health/ready
+  livenessProbe: |-
+    httpGet:
+      path: ric/v1/health/alive
+      port: 8080
+    initialDelaySeconds: 5
+    periodSeconds: 15
+
+  readinessProbe: |-
+    httpGet:
+      path: ric/v1/health/ready
+      port: 8080
+    initialDelaySeconds: 5
+    periodSeconds: 15
+
 
   appconfig:
     path: /opt/ric/config