Add VFC env about reg_to_msb_when_start to determine whether register to microserice 65/101865/7
authoryangyan <yangyanyj@chinamobile.com>
Wed, 11 Mar 2020 02:14:42 +0000 (10:14 +0800)
committeryangyan <yangyanyj@chinamobile.com>
Wed, 11 Mar 2020 02:15:14 +0000 (10:15 +0800)
Becaue now oom can register the microservice to msb automatically,
if without K8S, we can also register vfc microservice to msb
automatically by vfc container itself.

IF it is set to false, vfc contanier will not register again, if it is
set to true, vfc will register by itself.
we use this flag to determine who is responbile for serice registeration
and it can reduce duplicate registration.

Change-Id: Ie79a8803725ae0c762d9c39a04f922d9823c46e2
Issue-ID: VFC-1601
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
17 files changed:
kubernetes/vfc/charts/vfc-catalog/templates/deployment.yaml
kubernetes/vfc/charts/vfc-ems-driver/templates/deployment.yaml
kubernetes/vfc/charts/vfc-generic-vnfm-driver/templates/deployment.yaml
kubernetes/vfc/charts/vfc-huawei-vnfm-driver/templates/deployment.yaml
kubernetes/vfc/charts/vfc-juju-vnfm-driver/templates/deployment.yaml
kubernetes/vfc/charts/vfc-multivim-proxy/templates/deployment.yaml
kubernetes/vfc/charts/vfc-nokia-v2vnfm-driver/templates/deployment.yaml
kubernetes/vfc/charts/vfc-redis/templates/deployment.yaml
kubernetes/vfc/charts/vfc-resmgr/templates/deployment.yaml
kubernetes/vfc/charts/vfc-vnflcm/templates/deployment.yaml
kubernetes/vfc/charts/vfc-vnfmgr/templates/deployment.yaml
kubernetes/vfc/charts/vfc-vnfres/templates/deployment.yaml
kubernetes/vfc/charts/vfc-workflow-engine/templates/deployment.yaml
kubernetes/vfc/charts/vfc-workflow/templates/deployment.yaml
kubernetes/vfc/charts/vfc-zte-sdnc-driver/templates/deployment.yaml
kubernetes/vfc/charts/vfc-zte-vnfm-driver/templates/deployment.yaml
kubernetes/vfc/values.yaml

index b5246d1..028b164 100644 (file)
@@ -87,6 +87,8 @@ spec:
               {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-root-pass" "key" "password") | indent 14}}
             - name: REDIS_ADDR
               value: "{{ .Values.global.config.redisServiceName }}:{{ .Values.global.config.redisPort }}"
+            - name: REG_TO_MSB_WHEN_START
+              value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           volumeMounts:
           - name: {{ include "common.fullname" . }}-catalog
             mountPath: /service/vfc/nfvo/catalog/static
index 446bcb9..51080a5 100644 (file)
@@ -79,6 +79,8 @@ spec:
               value: "{{ .Values.config.vescollectorServiceName }}:{{ .Values.config.vescollectorPort }}"
             - name: VES_AUTHINFO
               value: "{{ .Values.config.vescollectorUser }}:{{ .Values.config.vescollectorPassword }}"
+            - name: REG_TO_MSB_WHEN_START
+              value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           resources:
 {{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
index 5e84c86..a425670 100644 (file)
@@ -59,6 +59,8 @@ spec:
               value: "{{ .Values.global.config.ssl_enabled }}"
             - name: MSB_ADDR
               value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+            - name: REG_TO_MSB_WHEN_START
+              value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           volumeMounts:
           - name: {{ include "common.fullname" . }}-localtime
             mountPath: /etc/localtime
index 163214a..401d00c 100644 (file)
@@ -76,6 +76,8 @@ spec:
               value: "{{ .Values.global.config.ssl_enabled }}"
             - name: MSB_ADDR
               value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+            - name: REG_TO_MSB_WHEN_START
+              value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           volumeMounts:
           - name: {{ include "common.fullname" . }}-localtime
             mountPath: /etc/localtime
index 008d480..2a542e7 100644 (file)
@@ -75,6 +75,8 @@ spec:
               value: "{{ .Values.global.config.ssl_enabled }}"
             - name: MSB_ADDR
               value: "{{ .Values.global.config.msbServiceName}}:{{ .Values.global.config.msbPort }}"
+            - name: REG_TO_MSB_WHEN_START
+              value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           volumeMounts:
           - name: {{ include "common.fullname" . }}-localtime
             mountPath: /etc/localtime
index be76d55..88e4ca5 100644 (file)
@@ -75,6 +75,8 @@ spec:
               value: "{{ .Values.global.config.ssl_enabled }}"
             - name: MSB_ADDR
               value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+            - name: REG_TO_MSB_WHEN_START
+              value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           resources:
 {{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
index 3f747ce..00c53b2 100644 (file)
@@ -77,6 +77,8 @@ spec:
               value: "{{ .Values.global.config.ssl_enabled }}"
             - name: MSB_ADDR
               value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+            - name: REG_TO_MSB_WHEN_START
+              value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           resources:
 {{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
index bff1e94..a6850b5 100644 (file)
@@ -54,6 +54,8 @@ spec:
           env:
             - name: MSB_ADDR
               value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+            - name: REG_TO_MSB_WHEN_START
+              value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           resources:
 {{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
index ce381d7..54ff350 100644 (file)
@@ -75,6 +75,8 @@ spec:
               value: "{{ .Values.global.config.ssl_enabled }}"
             - name: MSB_ADDR
               value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+            - name: REG_TO_MSB_WHEN_START
+              value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           volumeMounts:
           - name: {{ include "common.fullname" . }}-localtime
             mountPath: /etc/localtime
index 465f4cf..9332014 100644 (file)
@@ -87,6 +87,8 @@ spec:
               {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-root-pass" "key" "password") | indent 14}}
             - name: REDIS_ADDR
               value: "{{ .Values.global.config.redisServiceName }}:{{ .Values.global.config.redisPort }}"
+            - name: REG_TO_MSB_WHEN_START
+              value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           volumeMounts:
           - name: {{ include "common.fullname" . }}-localtime
             mountPath: /etc/localtime
index c4c070d..61adba8 100644 (file)
@@ -87,7 +87,8 @@ spec:
               value: "{{ .Values.global.config.mariadb_admin }}"
             - name: MYSQL_ROOT_PASSWORD
               {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-root-pass" "key" "password") | indent 14}}
-
+            - name: REG_TO_MSB_WHEN_START
+              value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           volumeMounts:
           - name: {{ include "common.fullname" . }}-localtime
             mountPath: /etc/localtime
index e70bf0e..ee9ff9c 100644 (file)
@@ -87,7 +87,8 @@ spec:
               value: "{{ .Values.global.config.mariadb_admin }}"
             - name: MYSQL_ROOT_PASSWORD
               {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-root-pass" "key" "password") | indent 14}}
-
+            - name: REG_TO_MSB_WHEN_START
+              value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           volumeMounts:
           - name: {{ include "common.fullname" . }}-localtime
             mountPath: /etc/localtime
index 410d4b6..c78d6b3 100644 (file)
@@ -83,6 +83,8 @@ spec:
               value: "{{ .Values.global.config.msbServiceName }}"
             - name: OPENPALETTE_MSB_PORT
               value: "{{ .Values.global.config.msbPort | default 80 }}"
+            - name: REG_TO_MSB_WHEN_START
+              value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           resources:
 {{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
index 534979b..a28814c 100644 (file)
@@ -83,6 +83,8 @@ spec:
               value: "{{ .Values.global.config.msbServiceName }}"
             - name: OPENPALETTE_MSB_PORT
               value: "{{ .Values.global.config.msbPort | default 80 }}"
+            - name: REG_TO_MSB_WHEN_START
+              value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           resources:
 {{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
index be76d55..88e4ca5 100644 (file)
@@ -75,6 +75,8 @@ spec:
               value: "{{ .Values.global.config.ssl_enabled }}"
             - name: MSB_ADDR
               value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+            - name: REG_TO_MSB_WHEN_START
+              value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           resources:
 {{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
index 5f5e710..bd79aad 100644 (file)
@@ -75,6 +75,8 @@ spec:
               value: "{{ .Values.global.config.ssl_enabled }}"
             - name: MSB_ADDR
               value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+            - name: REG_TO_MSB_WHEN_START
+              value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           volumeMounts:
           - name: {{ include "common.fullname" . }}-localtime
             mountPath: /etc/localtime
index 88275ae..b204c58 100644 (file)
@@ -20,6 +20,11 @@ global:
     msbPort: 443
     redisServiceName: vfc-redis
     redisPort: 6379
+# Becaue now oom can register the microservice to msb automatically,
+# If it is set to false, vfc contanier will not register again, if it is
+# set to true, vfc will register by itself.
+# we use this flag to determine who is responbile for serice registeration
+# and it can reduce duplicate registration.
     reg_to_msb_when_start: False
     mariadb_admin: root
   persistence: