Merge "[MULTICLOUD] Use log template"
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Tue, 30 Nov 2021 13:44:00 +0000 (13:44 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 30 Nov 2021 13:44:00 +0000 (13:44 +0000)
21 files changed:
kubernetes/a1policymanagement/templates/statefulset.yaml
kubernetes/cps/components/cps-core/values.yaml
kubernetes/cps/components/cps-temporal/values.yaml
kubernetes/cps/components/ncmp-dmi-plugin/values.yaml
kubernetes/modeling/components/modeling-etsicatalog/resources/config/log/filebeat/filebeat.yml [moved from kubernetes/modeling/components/modeling-etsicatalog/resources/config/logging/filebeat/filebeat.yml with 100% similarity]
kubernetes/modeling/components/modeling-etsicatalog/resources/config/log/server/log.yml [moved from kubernetes/modeling/components/modeling-etsicatalog/resources/config/logging/server/log.yml with 100% similarity]
kubernetes/modeling/components/modeling-etsicatalog/templates/configmap.yaml
kubernetes/modeling/components/modeling-etsicatalog/templates/deployment.yaml
kubernetes/modeling/components/modeling-etsicatalog/values.yaml
kubernetes/oof/resources/config/conf/common_config.yaml
kubernetes/portal/components/portal-app/templates/deployment.yaml
kubernetes/portal/components/portal-app/values.yaml
kubernetes/portal/components/portal-sdk/templates/deployment.yaml
kubernetes/portal/components/portal-sdk/values.yaml
kubernetes/portal/templates/configmap.yaml
kubernetes/portal/values.yaml
kubernetes/sdnc/templates/statefulset.yaml
kubernetes/sdnc/values.yaml
kubernetes/vid/templates/configmap.yaml
kubernetes/vid/templates/deployment.yaml
kubernetes/vid/values.yaml

index 1d25f31..0114b30 100644 (file)
@@ -28,6 +28,8 @@ spec:
     metadata:
       labels: {{- include "common.labels" . | nindent 8 }}
     spec:
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
       initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
       - name: {{ include "common.name" . }}-bootstrap-config
         image: {{ include "repositoryGenerator.image.envsubst" . }}
@@ -58,7 +60,7 @@ spec:
           name: config
       containers:
       - name: {{ include "common.name" . }}-update-config
-        image: "{{ .Values.global.envsubstImage }}"
+        image: {{ include "repositoryGenerator.image.envsubst" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         securityContext:
           runAsGroup: {{ .Values.groupID }}
index eb7aa54..a482152 100644 (file)
@@ -78,11 +78,10 @@ service:
       targetPort: *mgt_port
 
 prometheus:
-  enabled: true
+  enabled: false
 
 metrics:
   serviceMonitor:
-    enabled: true
     port: http-management
       ## specify target port if name is not given to the port in the service definition
       ##
index f831169..8b3f16b 100644 (file)
@@ -45,7 +45,7 @@ containerPort: &svc_port 8080
 managementPort: &mgt_port 8081
 
 prometheus:
-  enabled: true
+  enabled: false
 
 service:
   type: ClusterIP
@@ -60,7 +60,6 @@ service:
 
 metrics:
   serviceMonitor:
-    enabled: true
     port: http-management
       ## specify target port if name is not given to the port in the service definition
       ##
index a4a56de..753b8ba 100644 (file)
@@ -52,7 +52,7 @@ containerPort: &svc_port 8080
 managementPort: &mgt_port 8081
 
 prometheus:
-  enabled: true
+  enabled: false
 
 service:
   type: ClusterIP
@@ -66,7 +66,6 @@ service:
 
 metrics:
   serviceMonitor:
-    enabled: true
     port: http-management
       ## specify target port if name is not given to the port in the service definition
       ##
index 1a2112b..fc16d8c 100644 (file)
@@ -20,12 +20,6 @@ metadata:
   name: {{ include "common.fullname" . }}-logging-configmap
   namespace: {{ include "common.namespace" . }}
 data:
-{{ tpl (.Files.Glob "resources/config/logging/server/*").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/log/server/*").AsConfig . | indent 2 }}
 ---
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-modeling-filebeat-configmap
-  namespace: {{ include "common.namespace" . }}
-data:
-{{ tpl (.Files.Glob "resources/config/logging/filebeat/*").AsConfig . | indent 2 }}
\ No newline at end of file
+{{ include "common.log.configMap" . }}
index 8e28071..d9cbbef 100644 (file)
@@ -111,7 +111,7 @@ spec:
             mountPath: /etc/localtime
             readOnly: true
           - name: {{ include "common.fullname" . }}-logs
-            mountPath: /var/log/onap
+            mountPath: {{ .Values.log.path }}
           - name: {{ include "common.fullname" . }}-logconfig
             mountPath: /opt/modeling/etsicatalog/config/log.yml
             subPath: log.yml
@@ -127,17 +127,7 @@ spec:
         {{- end }}
 
         # side car containers
-        - name: {{ include "common.name" . }}-filebeat-onap
-          image: {{ include "repositoryGenerator.image.logging" . }}
-          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-          volumeMounts:
-          - name: {{ include "common.fullname" . }}-filebeat-conf
-            mountPath: /usr/share/filebeat/filebeat.yml
-            subPath: filebeat.yml
-          - name: {{ include "common.fullname" . }}-logs
-            mountPath: /var/log/onap
-          - name: {{ include "common.fullname" . }}-data-filebeat
-            mountPath: /usr/share/filebeat/data
+      {{ include "common.log.sidecar" . | nindent 8 }}
       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
         - name: {{ include "common.fullname" . }}-etsicatalog
@@ -156,10 +146,6 @@ spec:
           configMap:
             name : {{ include "common.fullname" . }}-logging-configmap
 
-        - name: {{ include "common.fullname" . }}-filebeat-conf
-          configMap:
-            name: {{ include "common.fullname" . }}-modeling-filebeat-configmap
-        - name: {{ include "common.fullname" . }}-data-filebeat
-          emptyDir: {}
+        {{ include "common.log.volumes" . | nindent 8 }}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
index 3af4bae..b4d8837 100644 (file)
@@ -28,6 +28,8 @@ global:
     internalPort: 3306
     nameOverride: mariadb-galera
 
+  centralizedLoggingEnabled: true
+
 readinessCheck:
   wait_for:
     msb:
@@ -183,3 +185,7 @@ serviceAccount:
   nameOverride: modeling-etsicatalog
   roles:
     - read
+
+#Log configuration
+log:
+  path: /var/log/onap
index b1bd0ed..8f00ac7 100644 (file)
@@ -153,9 +153,13 @@ PCI:
     ml_enabled: false
 
 nxi_termination:
-    query_templates:
-        nsi: "service-instance*('service-instance-id','{{ printf "{{instance_id}}" }}') > service-instance*('service-role','e2eserviceprofile-service')"
-        nsi_with_profile: "service-instance*('service-instance-id','{{ printf "{{instance_id}}" }}') > service-instance*('service-role','e2eserviceprofile-service')('service-instance-id','{{ printf "{{profile_id}}" }}')"
-        nssi: "service-instance*('service-instance-id','{{ printf "{{instance_id}}" }}') > service-instance*('service-role','nsi')"
-        nssi_with_nsi: "service-instance*('service-instance-id','{{ printf "{{instance_id}}" }}') > service-instance*('service-role','nsi')('service-instance-id','{{ printf "{{nsi_id}}" }}')"
-
+        query_templates:
+                nsi: "service-instance*('service-instance-id','{{ printf "{{instance_id}}" }}') > service-instance*('service-role','e2eserviceprofile-service')"
+                nsi_with_profile: "service-instance*('service-instance-id','{{ printf "{{instance_id}}" }}') > service-instance*('service-role','e2eserviceprofile-service')('service-instance-id','{{ printf "{{profile_id}}" }}')"
+                nssi:
+                    - "service-instance*('service-instance-id','{{ printf "{{instance_id}}" }}')('workload-context', 'CN') > service-instance*('service-role','nsi')"
+                    - "service-instance*('service-instance-id','{{ printf "{{instance_id}}" }}')('workload-context', 'TN_BH') > service-instance*('service-role','nsi')"
+                    - "service-instance*('service-instance-id','{{ printf "{{instance_id}}" }}')('workload-context', 'AN') > service-instance*('service-role','nsi')"
+                    - "service-instance*('service-instance-id','{{ printf "{{instance_id}}" }}')('workload-context', 'AN_NF') > service-instance*('workload-context','AN')"
+                    - "service-instance*('service-instance-id','{{ printf "{{instance_id}}" }}')('workload-context', 'TN_MH') > service-instance*('workload-context','AN')"
+                    - "service-instance*('service-instance-id','{{ printf "{{instance_id}}" }}')('workload-context', 'AN_NF') > service-instance*('workload-context','AN')"
index 39393ef..db4454d 100644 (file)
@@ -158,7 +158,7 @@ spec:
         - name: properties-onapportal
           mountPath: "{{ .Values.global.env.tomcatDir }}/temp"
         - name: var-log-onap
-          mountPath: /var/log/onap
+          mountPath: "{{ .Values.log.path }}"
         resources:
 {{ include "common.resources" . }}
       {{- if .Values.nodeSelector }}
@@ -169,17 +169,7 @@ spec:
       affinity:
 {{ toYaml .Values.affinity | indent 10 }}
       {{- end }}
-      - name: filebeat-onap
-        image: {{ include "repositoryGenerator.image.logging" . }}
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        volumeMounts:
-        - mountPath: /usr/share/filebeat/filebeat.yml
-          name: filebeat-conf
-          subPath: filebeat.yml
-        - name: portal-data-filebeat
-          mountPath: /usr/share/filebeat/data
-        - name: var-log-onap
-          mountPath: /var/log/onap
+      {{ include "common.log.sidecar" . | nindent 6 }}
       volumes:
 {{ include "common.certInitializer.volumes" . | indent 8 }}
         - name: localtime
@@ -192,13 +182,9 @@ spec:
           configMap:
             name: {{ include "common.fullname" . }}-onapportal
             defaultMode: 0755
-        - name: filebeat-conf
-          configMap:
-            name: portal-filebeat
+        {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }}
         - name: var-log-onap
           emptyDir: {}
-        - name: portal-data-filebeat
-          emptyDir: {}
         - name: portal-tomcat-logs
           emptyDir: {}
       imagePullSecrets:
index b46876c..6cf2513 100644 (file)
@@ -166,3 +166,8 @@ resources:
       cpu: 2
       memory: 8Gi
   unlimited: {}
+
+# Log configuration
+log:
+  path: /var/log/onap
+logConfigMapNamePrefix: '{{ include "common.fullname" . }}'
index 95247b3..abc5daa 100644 (file)
@@ -149,7 +149,7 @@ spec:
         - name: portal-tomcat-logs
           mountPath: "{{ .Values.global.env.tomcatDir }}/logs"
         - name: var-log-onap
-          mountPath: /var/log/onap
+          mountPath: "{{ .Values.log.path }}"
         resources:
 {{ include "common.resources" . }}
       {{- if .Values.nodeSelector }}
@@ -160,17 +160,7 @@ spec:
       affinity:
 {{ toYaml .Values.affinity | indent 10 }}
       {{- end }}
-      - name: filebeat-onap
-        image: {{ include "repositoryGenerator.image.logging" . }}
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        volumeMounts:
-        - mountPath: /usr/share/filebeat/filebeat.yml
-          name: filebeat-conf
-          subPath: filebeat.yml
-        - name: portal-data-filebeat
-          mountPath: /usr/share/filebeat/data
-        - name: var-log-onap
-          mountPath: /var/log/onap
+      {{ include "common.log.sidecar" . | nindent 6 }}
       volumes:
         - name: localtime
           hostPath:
@@ -182,13 +172,9 @@ spec:
           configMap:
             name: {{ include "common.fullname" . }}-onapportalsdk
             defaultMode: 0755
-        - name: filebeat-conf
-          configMap:
-            name: portal-filebeat
+        {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 8 }}
         - name: var-log-onap
           emptyDir: {}
-        - name: portal-data-filebeat
-          emptyDir: {}
         - name: portal-tomcat-logs
           emptyDir: {}
 {{ include "common.certInitializer.volumes" . | indent 8 }}
index 7631c3a..f0c3954 100644 (file)
@@ -161,3 +161,8 @@ resources:
       cpu: 4
       memory: 10Gi
   unlimited: {}
+
+# Log configuration
+log:
+  path: /var/log/onap
+logConfigMapNamePrefix: '{{ include "common.fullname" . }}'
index a474a6c..681f24e 100644 (file)
 # limitations under the License.
 */}}
 
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: portal-filebeat
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/filebeat/filebeat.yml").AsConfig . | indent 2 }}
-
+{{ include "common.log.configMap" . }}
index 0d4b023..0e6c9d6 100644 (file)
@@ -22,6 +22,8 @@ global:
   # application's front end hostname.  Must be resolvable on the client side environment
   portalHostName: "portal.api.simpledemo.onap.org"
 
+  centralizedLoggingEnabled: true
+
 #################################################################
 # Secrets metaconfig
 #################################################################
@@ -72,6 +74,7 @@ portal-app:
   cassandra:
     config:
       cassandraExternalSecret: *dbSecretName
+  logConfigMapNamePrefix: '{{ include "common.release" . }}-portal'
 portal-sdk:
   mariadb:
     config:
@@ -79,6 +82,7 @@ portal-sdk:
   cassandra:
     config:
       cassandraExternalSecret: *dbSecretName
+  logConfigMapNamePrefix: '{{ include "common.release" . }}-portal'
 messageRouter:
   service:
     name: message-router
index fc584d8..f53c41c 100644 (file)
@@ -121,7 +121,6 @@ spec:
           value: "{{ .Values.config.sdnr.oauth.odluxRbac.enabled | default "true" }}"
         {{ end }}
 
-
         volumeMounts:
         - mountPath: /config-input
           name: config-input
@@ -311,6 +310,27 @@ spec:
             value: "{{ .Values.config.sdnr.oauth.enabled | default "false" }}"
           - name: SDNR_NETCONF_CALLHOME_ENABLED
             value: "{{ .Values.config.sdnr.netconfCallHome.enabled | default "false" }}"
+          - name: SDNR_VES_COLLECTOR_ENABLED
+            value: "{{ .Values.config.sdnr.vesCollector.enabled }}"
+          - name: SDNR_VES_COLLECTOR_TLS_ENABLED
+            value: "{{ .Values.config.sdnr.vesCollector.tls.enabled }}"
+          - name: SDNR_VES_COLLECTOR_TRUST_ALL_CERTS
+            value: "{{ .Values.config.sdnr.vesCollector.trustAllCertificates }}"
+          - name: SDNR_VES_COLLECTOR_IP
+            value: "{{ .Values.config.sdnr.vesCollector.address }}"
+          - name: SDNR_VES_COLLECTOR_PORT
+            value: "{{ .Values.config.sdnr.vesCollector.port }}"
+          - name: SDNR_VES_COLLECTOR_VERSION
+            value: "{{ .Values.config.sdnr.vesCollector.version | default "v7" }}"
+          - name: SDNR_VES_COLLECTOR_REPORTING_ENTITY_NAME
+            value: "{{ .Values.config.sdnr.vesCollector.reportingEntityName | default "ONAP SDN-R" }}"
+          - name: SDNR_VES_COLLECTOR_EVENTLOG_MSG_DETAIL
+            value: "{{ .Values.config.sdnr.vesCollector.eventLogMsgDetail | default "SHORT" }}"
+          - name: SDNR_VES_COLLECTOR_USERNAME
+            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ves-collector-secret" "key" "login") | indent 12 }}
+          - name: SDNR_VES_COLLECTOR_PASSWORD
+            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ves-collector-secret" "key" "password") | indent 12 }}
+
           volumeMounts:
 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
 {{- if .Values.global.cmpv2Enabled }}
index 15a8045..cbf5678 100644 (file)
@@ -181,7 +181,10 @@ secrets:
     externalSecret: '{{ ternary (tpl (default "" .Values.config.sdnr.oauth.providersSecrets.keycloakExternalSecret) .) "oauth-disabled" .Values.config.sdnr.oauth.enabled }}'
     password: '{{ .Values.config.sdnr.oauth.providersSecrets.keycloak }}'
     passwordPolicy: required
-
+  - uid: ves-collector-secret
+    type: basicAuth
+    login: '{{ .Values.config.sdnr.vesCollector.username }}'
+    password: '{{ .Values.config.sdnr.vesCollector.password }}'
 #################################################################
 # Certificates
 #################################################################
@@ -261,6 +264,7 @@ config:
   ansibleUser: sdnc
   ansiblePassword: sdnc
   # ansibleCredsExternalSecret: some secret
+
   dbSdnctlDatabase: &sdncDbName sdnctl
   enableClustering: true
   sdncHome: /opt/onap/sdnc
@@ -354,6 +358,18 @@ config:
         title: ONAP Keycloak Provider
         roleMapping:
           mykeycloak: admin
+    vesCollector:
+      enabled: false
+      tls:
+        enabled: true
+      trustAllCertificates: false
+      username: sample1
+      password: sample1
+      address: dcae-ves-collector.onap
+      port: 8443
+      version: v7
+      reportingEntityName: ONAP SDN-R
+      eventLogMsgDetail: SHORT
 
 # dependency / sub-chart configuration
 certInitializer:
@@ -501,6 +517,7 @@ elasticsearch:
     dedicatednode: "no"
     nameOverride: *elasticSearchName
     cluster_name: sdnrdb-cluster
+
 # enable
 sdnc-web:
   enabled: true
index 0ba466d..5c423e6 100644 (file)
@@ -27,18 +27,7 @@ metadata:
 data:
 {{ tpl (.Files.Glob "resources/config/log/vid/*").AsConfig . | indent 2 }}
 ---
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-filebeat-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}
+{{ include "common.log.configMap" . }}
 ---
 apiVersion: v1
 kind: ConfigMap
index 478b442..116a7cd 100644 (file)
@@ -136,7 +136,7 @@ spec:
           - mountPath: /etc/localtime
             name: localtime
             readOnly: true
-          - mountPath: /var/log/onap
+          - mountPath: "{{ .Values.log.path }}"
             name: vid-logs
           - mountPath: /tmp/logback.xml
             name: vid-logback
@@ -154,30 +154,16 @@ spec:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
       # side car containers
-        - name: filebeat-onap
-          image: {{ include "repositoryGenerator.image.logging" . }}
-          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-          volumeMounts:
-          - mountPath: /usr/share/filebeat/filebeat.yml
-            name: filebeat-conf
-            subPath: filebeat.yml
-          - mountPath: /var/log/onap
-            name: vid-logs
-          - mountPath: /usr/share/filebeat/data
-            name: vid-data-filebeat
+        {{ include "common.log.sidecar" . | nindent 8 }}
       volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
         - name: localtime
           hostPath:
             path: /etc/localtime
-        - name: filebeat-conf
-          configMap:
-            name: {{ include "common.fullname" . }}-filebeat-configmap
+        {{ include "common.log.volumes" . | nindent 8 }}
         - name: vid-cache
           emptyDir: {}
         - name: vid-logs
           emptyDir: {}
-        - name: vid-data-filebeat
-          emptyDir: {}
         - name: vid-logback
           configMap:
             name: {{ include "common.fullname" . }}-log-configmap
index 91132e2..aba010e 100644 (file)
@@ -25,6 +25,7 @@ global:
     service: mariadb-galera
     internalPort: 3306
     nameOverride: mariadb-galera
+  centralizedLoggingEnabled: true
 
 #################################################################
 # Secrets metaconfig
@@ -194,3 +195,7 @@ resources:
       cpu: 200m
       memory: 2Gi
   unlimited: {}
+
+# Log configuration
+log:
+  path: /var/log/onap