diff options
62 files changed, 254 insertions, 396 deletions
diff --git a/kubernetes/a1policymanagement/templates/statefulset.yaml b/kubernetes/a1policymanagement/templates/statefulset.yaml index 1d25f31e7f..0114b30158 100644 --- a/kubernetes/a1policymanagement/templates/statefulset.yaml +++ b/kubernetes/a1policymanagement/templates/statefulset.yaml @@ -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 }} diff --git a/kubernetes/aai/components/aai-graphadmin/templates/deployment.yaml b/kubernetes/aai/components/aai-graphadmin/templates/deployment.yaml index 6b58eaa3fd..cccc2b1e66 100644 --- a/kubernetes/aai/components/aai-graphadmin/templates/deployment.yaml +++ b/kubernetes/aai/components/aai-graphadmin/templates/deployment.yaml @@ -222,12 +222,14 @@ spec: - name: config configMap: name: {{ include "common.fullname" . }} - - name: properties-input - configMap: - name: {{ include "common.fullname" . }}-properties - name: properties + {{- if .Values.global.aafEnabled }} emptyDir: medium: Memory + - name: properties-input + {{- end }} + configMap: + name: {{ include "common.fullname" . }}-properties restartPolicy: {{ .Values.restartPolicy }} imagePullSecrets: - name: {{ include "common.namespace" . }}-docker-registry-key diff --git a/kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml b/kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml index d1e72841bc..95c3fe2fbf 100644 --- a/kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml +++ b/kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml @@ -126,7 +126,7 @@ spec: - -c - | bash docker-entrypoint.sh dataSnapshot.sh - {{- include "common.serviceMesh.killSidecar" . | indent 11 | trim }} + {{ include "common.serviceMesh.killSidecar" . | indent 11 | trim }} env: - name: LOCAL_USER_ID value: {{ .Values.securityContext.user_id | quote }} @@ -174,12 +174,14 @@ spec: - name: config configMap: name: {{ include "common.fullname" . }} - - name: properties-input - configMap: - name: {{ include "common.fullname" . }}-properties - name: properties + {{- if .Values.global.aafEnabled }} emptyDir: medium: Memory + - name: properties-input + {{- end }} + configMap: + name: {{ include "common.fullname" . }}-properties - name: migration configMap: name: {{ include "common.fullname" . }}-migration diff --git a/kubernetes/aai/components/aai-graphadmin/templates/job-create-db.yaml b/kubernetes/aai/components/aai-graphadmin/templates/job-create-db.yaml index 4a7de648e7..62e27b6321 100644 --- a/kubernetes/aai/components/aai-graphadmin/templates/job-create-db.yaml +++ b/kubernetes/aai/components/aai-graphadmin/templates/job-create-db.yaml @@ -126,7 +126,7 @@ spec: - -c - | bash docker-entrypoint.sh createDBSchema.sh - {{- include "common.serviceMesh.killSidecar" . | indent 11 | trim }} + {{ include "common.serviceMesh.killSidecar" . | indent 11 | trim }} env: - name: LOCAL_USER_ID value: {{ .Values.securityContext.user_id | quote }} @@ -173,12 +173,14 @@ spec: - name: config configMap: name: {{ include "common.fullname" . }} - - name: properties-input - configMap: - name: {{ include "common.fullname" . }}-properties - name: properties + {{- if .Values.global.aafEnabled }} emptyDir: medium: Memory + - name: properties-input + {{- end }} + configMap: + name: {{ include "common.fullname" . }}-properties restartPolicy: Never imagePullSecrets: - name: {{ include "common.namespace" . }}-docker-registry-key diff --git a/kubernetes/aai/components/aai-graphadmin/templates/job-migration.yaml b/kubernetes/aai/components/aai-graphadmin/templates/job-migration.yaml index 1256e71e08..07009b2fbd 100644 --- a/kubernetes/aai/components/aai-graphadmin/templates/job-migration.yaml +++ b/kubernetes/aai/components/aai-graphadmin/templates/job-migration.yaml @@ -171,7 +171,7 @@ spec: - -c - | bash docker-entrypoint.sh run_Migrations.sh -e UpdateAaiUriIndexMigration --commit --skipPreMigrationSnapShot --runDisabled RebuildAllEdges ; - {{- include "common.serviceMesh.killSidecar" . | indent 11 | trim }} + {{ include "common.serviceMesh.killSidecar" . | indent 11 | trim }} env: - name: LOCAL_USER_ID value: {{ .Values.securityContext.user_id | quote }} @@ -221,12 +221,14 @@ spec: - name: {{ include "common.fullname" . }}-snapshots persistentVolumeClaim: claimName: {{ include "common.fullname" . }}-migration - - name: properties-input - configMap: - name: {{ include "common.fullname" . }}-properties - name: properties + {{- if .Values.global.aafEnabled }} emptyDir: medium: Memory + - name: properties-input + {{- end }} + configMap: + name: {{ include "common.fullname" . }}-properties restartPolicy: Never imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" @@ -322,7 +324,7 @@ spec: - -c - | bash docker-entrypoint.sh dataSnapshot.sh - {{- include "common.serviceMesh.killSidecar" . | indent 11 | trim }} + {{ include "common.serviceMesh.killSidecar" . | indent 11 | trim }} env: - name: LOCAL_USER_ID value: {{ .Values.securityContext.user_id | quote }} diff --git a/kubernetes/aai/components/aai-modelloader/templates/deployment.yaml b/kubernetes/aai/components/aai-modelloader/templates/deployment.yaml index 0213d631a3..c4098b1a3b 100644 --- a/kubernetes/aai/components/aai-modelloader/templates/deployment.yaml +++ b/kubernetes/aai/components/aai-modelloader/templates/deployment.yaml @@ -116,12 +116,14 @@ spec: - name: localtime hostPath: path: /etc/localtime - - name: prop-config-input - configMap: - name: {{ include "common.fullname" . }}-prop - name: prop-config + {{- if .Values.global.aafEnabled }} emptyDir: medium: Memory + - name: prop-config-input + {{- end }} + configMap: + name: {{ include "common.fullname" . }}-prop - name: auth-config secret: secretName: {{ include "common.fullname" . }} diff --git a/kubernetes/aai/components/aai-sparky-be/templates/deployment.yaml b/kubernetes/aai/components/aai-sparky-be/templates/deployment.yaml index 48a6b04913..6e5ab8b32b 100644 --- a/kubernetes/aai/components/aai-sparky-be/templates/deployment.yaml +++ b/kubernetes/aai/components/aai-sparky-be/templates/deployment.yaml @@ -174,9 +174,11 @@ spec: configMap: name: {{ include "common.fullname" . }} - name: portal-config + {{- if .Values.global.aafEnabled }} emptyDir: medium: Memory - name: portal-config-input + {{- end }} configMap: name: {{ include "common.fullname" . }}-portal - name: portal-config-props diff --git a/kubernetes/aai/components/aai-traversal/templates/job.yaml b/kubernetes/aai/components/aai-traversal/templates/job.yaml index f2e6ee61b5..ddd325d7a0 100644 --- a/kubernetes/aai/components/aai-traversal/templates/job.yaml +++ b/kubernetes/aai/components/aai-traversal/templates/job.yaml @@ -77,7 +77,7 @@ spec: {{- else }} until nc -w10 -z -v aai.{{.Release.Namespace}} 80; do echo "Retrying to reach aai on port 80"; done; bash -x /opt/app/aai-traversal/docker-entrypoint.sh install/updateQueryData.sh ; - {{- include "common.serviceMesh.killSidecar" . | indent 11 | trim }} + {{ include "common.serviceMesh.killSidecar" . | indent 11 | trim }} {{- end }} env: - name: LOCAL_USER_ID diff --git a/kubernetes/cps/components/cps-core/values.yaml b/kubernetes/cps/components/cps-core/values.yaml index eb7aa54130..a482152582 100644 --- a/kubernetes/cps/components/cps-core/values.yaml +++ b/kubernetes/cps/components/cps-core/values.yaml @@ -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 ## diff --git a/kubernetes/cps/components/cps-temporal/values.yaml b/kubernetes/cps/components/cps-temporal/values.yaml index f8311697f5..8b3f16b64c 100644 --- a/kubernetes/cps/components/cps-temporal/values.yaml +++ b/kubernetes/cps/components/cps-temporal/values.yaml @@ -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 ## diff --git a/kubernetes/cps/components/ncmp-dmi-plugin/values.yaml b/kubernetes/cps/components/ncmp-dmi-plugin/values.yaml index a4a56dee80..753b8baaff 100644 --- a/kubernetes/cps/components/ncmp-dmi-plugin/values.yaml +++ b/kubernetes/cps/components/ncmp-dmi-plugin/values.yaml @@ -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 ## diff --git a/kubernetes/modeling/components/modeling-etsicatalog/resources/config/logging/filebeat/filebeat.yml b/kubernetes/modeling/components/modeling-etsicatalog/resources/config/log/filebeat/filebeat.yml index 0bc14ea908..0bc14ea908 100644 --- a/kubernetes/modeling/components/modeling-etsicatalog/resources/config/logging/filebeat/filebeat.yml +++ b/kubernetes/modeling/components/modeling-etsicatalog/resources/config/log/filebeat/filebeat.yml diff --git a/kubernetes/modeling/components/modeling-etsicatalog/resources/config/logging/server/log.yml b/kubernetes/modeling/components/modeling-etsicatalog/resources/config/log/server/log.yml index 5ac5fefe92..5ac5fefe92 100644 --- a/kubernetes/modeling/components/modeling-etsicatalog/resources/config/logging/server/log.yml +++ b/kubernetes/modeling/components/modeling-etsicatalog/resources/config/log/server/log.yml diff --git a/kubernetes/modeling/components/modeling-etsicatalog/templates/configmap.yaml b/kubernetes/modeling/components/modeling-etsicatalog/templates/configmap.yaml index 1a2112bbe2..fc16d8c0a0 100644 --- a/kubernetes/modeling/components/modeling-etsicatalog/templates/configmap.yaml +++ b/kubernetes/modeling/components/modeling-etsicatalog/templates/configmap.yaml @@ -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" . }} diff --git a/kubernetes/modeling/components/modeling-etsicatalog/templates/deployment.yaml b/kubernetes/modeling/components/modeling-etsicatalog/templates/deployment.yaml index 8e28071ba6..d9cbbef15b 100644 --- a/kubernetes/modeling/components/modeling-etsicatalog/templates/deployment.yaml +++ b/kubernetes/modeling/components/modeling-etsicatalog/templates/deployment.yaml @@ -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" diff --git a/kubernetes/modeling/components/modeling-etsicatalog/values.yaml b/kubernetes/modeling/components/modeling-etsicatalog/values.yaml index 3af4bae554..b4d88375fc 100644 --- a/kubernetes/modeling/components/modeling-etsicatalog/values.yaml +++ b/kubernetes/modeling/components/modeling-etsicatalog/values.yaml @@ -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 diff --git a/kubernetes/multicloud/components/multicloud-fcaps/templates/deployment.yaml b/kubernetes/multicloud/components/multicloud-fcaps/templates/deployment.yaml index b438bf0066..fc46a65052 100644 --- a/kubernetes/multicloud/components/multicloud-fcaps/templates/deployment.yaml +++ b/kubernetes/multicloud/components/multicloud-fcaps/templates/deployment.yaml @@ -60,7 +60,7 @@ spec: value: "{{ .Values.config.ssl_enabled }}" name: {{ include "common.name" . }} volumeMounts: - - mountPath: /var/log/onap + - mountPath: "{{ .Values.log.path }}" name: fcaps-log - mountPath: /opt/fcaps/fcaps/pub/config/log.yml name: fcaps-logconfig @@ -86,17 +86,7 @@ spec: failureThreshold: {{ .Values.liveness.failureThreshold }} {{ end }} # side car containers - - image: {{ include "repositoryGenerator.image.logging" . }} - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - name: filebeat-onap - volumeMounts: - - mountPath: /usr/share/filebeat/filebeat.yml - name: filebeat-conf - subPath: filebeat.yml - - mountPath: /var/log/onap - name: fcaps-log - - mountPath: /usr/share/filebeat/data - name: fcaps-data-filebeat + {{ include "common.log.sidecar" . | nindent 5 }} - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.rabbitmq }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: rabbit-mq @@ -104,11 +94,7 @@ spec: volumes: - name: fcaps-log emptyDir: {} - - name: fcaps-data-filebeat - emptyDir: {} - - name: filebeat-conf - configMap: - name: multicloud-filebeat-configmap + {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 5 }} - name: fcaps-logconfig configMap: name: {{ include "common.fullname" . }}-log-configmap diff --git a/kubernetes/multicloud/components/multicloud-fcaps/values.yaml b/kubernetes/multicloud/components/multicloud-fcaps/values.yaml index 39ddbae5b7..b664498eb8 100644 --- a/kubernetes/multicloud/components/multicloud-fcaps/values.yaml +++ b/kubernetes/multicloud/components/multicloud-fcaps/values.yaml @@ -95,3 +95,8 @@ serviceAccount: nameOverride: multicloud-fcaps roles: - read + +#Log configuration +log: + path: /var/log/onap +logConfigMapNamePrefix: '{{ include "common.fullname" . }}' diff --git a/kubernetes/multicloud/components/multicloud-pike/templates/deployment.yaml b/kubernetes/multicloud/components/multicloud-pike/templates/deployment.yaml index d12e663236..ebebaace3c 100644 --- a/kubernetes/multicloud/components/multicloud-pike/templates/deployment.yaml +++ b/kubernetes/multicloud/components/multicloud-pike/templates/deployment.yaml @@ -60,7 +60,7 @@ spec: value: "{{ .Values.config.ssl_enabled }}" name: {{ include "common.name" . }} volumeMounts: - - mountPath: /var/log/onap + - mountPath: "{{ .Values.log.path }}" name: pike-log - mountPath: /opt/pike/pike/pub/config/log.yml name: pike-logconfig @@ -88,26 +88,12 @@ spec: failureThreshold: {{ .Values.liveness.failureThreshold }} {{ end }} # side car containers - - image: {{ include "repositoryGenerator.image.logging" . }} - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - name: filebeat-onap - volumeMounts: - - mountPath: /usr/share/filebeat/filebeat.yml - name: filebeat-conf - subPath: filebeat.yml - - mountPath: /var/log/onap - name: pike-log - - mountPath: /usr/share/filebeat/data - name: pike-data-filebeat + {{ include "common.log.sidecar" . | nindent 5 }} serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} volumes: - name: pike-log emptyDir: {} - - name: pike-data-filebeat - emptyDir: {} - - name: filebeat-conf - configMap: - name: multicloud-filebeat-configmap + {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 5 }} - name: pike-logconfig configMap: name: {{ include "common.fullname" . }}-log-configmap diff --git a/kubernetes/multicloud/components/multicloud-pike/values.yaml b/kubernetes/multicloud/components/multicloud-pike/values.yaml index 5ef87f46b6..45c73099dd 100644 --- a/kubernetes/multicloud/components/multicloud-pike/values.yaml +++ b/kubernetes/multicloud/components/multicloud-pike/values.yaml @@ -92,3 +92,8 @@ serviceAccount: nameOverride: multicloud-pike roles: - read + +#Log configuration +log: + path: /var/log/onap +logConfigMapNamePrefix: '{{ include "common.fullname" . }}' diff --git a/kubernetes/multicloud/components/multicloud-starlingx/templates/deployment.yaml b/kubernetes/multicloud/components/multicloud-starlingx/templates/deployment.yaml index 7c39bb7006..c9209a0c09 100644 --- a/kubernetes/multicloud/components/multicloud-starlingx/templates/deployment.yaml +++ b/kubernetes/multicloud/components/multicloud-starlingx/templates/deployment.yaml @@ -60,7 +60,7 @@ spec: value: "{{ .Values.config.ssl_enabled }}" name: {{ include "common.name" . }} volumeMounts: - - mountPath: /var/log/onap + - mountPath: "{{ .Values.log.path }}" name: starlingx-log - mountPath: /opt/starlingx/starlingx/pub/config/log.yml name: starlingx-logconfig @@ -87,17 +87,7 @@ spec: failureThreshold: {{ .Values.liveness.failureThreshold }} {{ end }} # side car containers - - image: {{ include "repositoryGenerator.image.logging" . }} - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - name: filebeat-onap - volumeMounts: - - mountPath: /usr/share/filebeat/filebeat.yml - name: filebeat-conf - subPath: filebeat.yml - - mountPath: /var/log/onap - name: starlingx-log - - mountPath: /usr/share/filebeat/data - name: starlingx-data-filebeat + {{ include "common.log.sidecar" . | nindent 7 }} - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.artifactImage }} name: framework-artifactbroker command: ["/opt/app/distribution/bin/artifact-dist.sh"] @@ -115,11 +105,7 @@ spec: volumes: - name: starlingx-log emptyDir: {} - - name: starlingx-data-filebeat - emptyDir: {} - - name: filebeat-conf - configMap: - name: multicloud-filebeat-configmap + {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 7 }} - name: starlingx-logconfig configMap: name: {{ include "common.fullname" . }}-log-configmap diff --git a/kubernetes/multicloud/components/multicloud-starlingx/values.yaml b/kubernetes/multicloud/components/multicloud-starlingx/values.yaml index 69e4d943bd..f18a090dba 100644 --- a/kubernetes/multicloud/components/multicloud-starlingx/values.yaml +++ b/kubernetes/multicloud/components/multicloud-starlingx/values.yaml @@ -94,3 +94,8 @@ serviceAccount: nameOverride: multicloud-starlingx roles: - read + +#Log configuration +log: + path: /var/log/onap +logConfigMapNamePrefix: '{{ include "common.fullname" . }}' diff --git a/kubernetes/multicloud/components/multicloud-vio/templates/deployment.yaml b/kubernetes/multicloud/components/multicloud-vio/templates/deployment.yaml index 5548359b12..1d27d6eb33 100644 --- a/kubernetes/multicloud/components/multicloud-vio/templates/deployment.yaml +++ b/kubernetes/multicloud/components/multicloud-vio/templates/deployment.yaml @@ -57,7 +57,7 @@ spec: value: "{{ .Values.config.aai.password }}" name: {{ include "common.name" . }} volumeMounts: - - mountPath: /var/log/onap + - mountPath: "{{ .Values.log.path }}" name: vio-log - mountPath: /opt/vio/vio/pub/config/log.yml name: vio-logconfig @@ -83,26 +83,12 @@ spec: failureThreshold: {{ .Values.liveness.failureThreshold }} {{ end -}} # side car containers - - image: {{ include "repositoryGenerator.image.logging" . }} - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - name: filebeat-onap - volumeMounts: - - mountPath: /usr/share/filebeat/filebeat.yml - name: filebeat-conf - subPath: filebeat.yml - - mountPath: /var/log/onap - name: vio-log - - mountPath: /usr/share/filebeat/data - name: vio-data-filebeat + {{ include "common.log.sidecar" . | nindent 5 }} serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} volumes: - name: vio-log emptyDir: {} - - name: vio-data-filebeat - emptyDir: {} - - name: filebeat-conf - configMap: - name: multicloud-filebeat-configmap + {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 5 }} - name: vio-logconfig configMap: name: {{ include "common.fullname" . }}-log-configmap diff --git a/kubernetes/multicloud/components/multicloud-vio/values.yaml b/kubernetes/multicloud/components/multicloud-vio/values.yaml index 5b218f1e75..17643baffe 100644 --- a/kubernetes/multicloud/components/multicloud-vio/values.yaml +++ b/kubernetes/multicloud/components/multicloud-vio/values.yaml @@ -91,3 +91,8 @@ serviceAccount: nameOverride: multicloud-vio roles: - read + +#Log configuration +log: + path: /var/log/onap +logConfigMapNamePrefix: '{{ include "common.fullname" . }}' diff --git a/kubernetes/multicloud/components/multicloud-windriver/templates/deployment.yaml b/kubernetes/multicloud/components/multicloud-windriver/templates/deployment.yaml index f46e45017d..dfb4bbc98c 100644 --- a/kubernetes/multicloud/components/multicloud-windriver/templates/deployment.yaml +++ b/kubernetes/multicloud/components/multicloud-windriver/templates/deployment.yaml @@ -69,7 +69,7 @@ spec: value: "{{ .Values.config.ssl_enabled }}" name: {{ include "common.name" . }} volumeMounts: - - mountPath: /var/log/onap + - mountPath: "{{ .Values.log.path }}" name: windriver-log - mountPath: /opt/windriver/titanium_cloud/pub/config/log.yml name: windriver-logconfig @@ -96,17 +96,7 @@ spec: failureThreshold: {{ .Values.liveness.failureThreshold }} {{ end }} # side car containers - - image: {{ include "repositoryGenerator.image.logging" . }} - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - name: filebeat-onap - volumeMounts: - - mountPath: /usr/share/filebeat/filebeat.yml - name: filebeat-conf - subPath: filebeat.yml - - mountPath: /var/log/onap - name: windriver-log - - mountPath: /usr/share/filebeat/data - name: windriver-data-filebeat + {{ include "common.log.sidecar" . | nindent 7 }} - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.artifactImage }} name: framework-artifactbroker command: ["/opt/app/distribution/bin/artifact-dist.sh"] @@ -124,11 +114,7 @@ spec: volumes: - name: windriver-log emptyDir: {} - - name: windriver-data-filebeat - emptyDir: {} - - name: filebeat-conf - configMap: - name: multicloud-filebeat-configmap + {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 7 }} - name: windriver-logconfig configMap: name: {{ include "common.fullname" . }}-log-configmap diff --git a/kubernetes/multicloud/components/multicloud-windriver/values.yaml b/kubernetes/multicloud/components/multicloud-windriver/values.yaml index d520a783b7..802659f2c0 100644 --- a/kubernetes/multicloud/components/multicloud-windriver/values.yaml +++ b/kubernetes/multicloud/components/multicloud-windriver/values.yaml @@ -103,3 +103,8 @@ serviceAccount: nameOverride: multicloud-windriver roles: - read + +#Log configuration +log: + path: /var/log/onap +logConfigMapNamePrefix: '{{ include "common.fullname" . }}' diff --git a/kubernetes/multicloud/templates/configmap.yaml b/kubernetes/multicloud/templates/configmap.yaml index 0800fbeb13..c76f531ee6 100644 --- a/kubernetes/multicloud/templates/configmap.yaml +++ b/kubernetes/multicloud/templates/configmap.yaml @@ -15,18 +15,7 @@ # limitations under the License. */}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: multicloud-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 diff --git a/kubernetes/multicloud/templates/deployment.yaml b/kubernetes/multicloud/templates/deployment.yaml index 34fe6224bc..53716e5f44 100644 --- a/kubernetes/multicloud/templates/deployment.yaml +++ b/kubernetes/multicloud/templates/deployment.yaml @@ -63,7 +63,7 @@ spec: imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: {{ include "common.name" . }} volumeMounts: - - mountPath: /var/log/onap + - mountPath: "{{ .Values.log.path }}" name: framework-log - mountPath: /opt/multivimbroker/multivimbroker/pub/config/log.yml name: framework-logconfig @@ -89,17 +89,7 @@ spec: {{ end -}} # side car containers - - image: {{ include "repositoryGenerator.image.logging" . }} - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - name: filebeat-onap - volumeMounts: - - mountPath: /usr/share/filebeat/filebeat.yml - name: filebeat-conf - subPath: filebeat.yml - - mountPath: /var/log/onap - name: framework-log - - mountPath: /usr/share/filebeat/data - name: framework-data-filebeat + {{ include "common.log.sidecar" . | nindent 5 }} serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} volumes: - name: framework-log @@ -107,11 +97,7 @@ spec: - name: provider-plugin configMap: name: {{ include "common.fullname" . }}-provider-plugin-configmap - - name: framework-data-filebeat - emptyDir: {} - - name: filebeat-conf - configMap: - name: multicloud-filebeat-configmap + {{ include "common.log.volumes" . | nindent 5 }} - name: framework-logconfig configMap: name: {{ include "common.fullname" . }}-log-configmap diff --git a/kubernetes/multicloud/values.yaml b/kubernetes/multicloud/values.yaml index 90e72be044..4f946a70c7 100644 --- a/kubernetes/multicloud/values.yaml +++ b/kubernetes/multicloud/values.yaml @@ -22,6 +22,7 @@ global: prometheus: enabled: false persistence: {} + centralizedLoggingEnabled: true ################################################################# # Application configuration defaults. @@ -35,18 +36,23 @@ istioSidecar: true multicloud-fcaps: enabled: true + logConfigMapNamePrefix: '{{ include "common.release" . }}-multicloud' multicloud-k8s: enabled: true multicloud-pike: enabled: true + logConfigMapNamePrefix: '{{ include "common.release" . }}-multicloud' multicloud-prometheus: enabled: false multicloud-starlingx: enabled: false + logConfigMapNamePrefix: '{{ include "common.release" . }}-multicloud' multicloud-vio: enabled: false + logConfigMapNamePrefix: '{{ include "common.release" . }}-multicloud' multicloud-windriver: enabled: false + logConfigMapNamePrefix: '{{ include "common.release" . }}-multicloud' # application configuration config: @@ -114,3 +120,7 @@ serviceAccount: nameOverride: multicloud roles: - read + +#Log configuration +log: + path: /var/log/onap diff --git a/kubernetes/oof/resources/config/conf/common_config.yaml b/kubernetes/oof/resources/config/conf/common_config.yaml index b1bd0edea4..8f00ac72da 100644 --- a/kubernetes/oof/resources/config/conf/common_config.yaml +++ b/kubernetes/oof/resources/config/conf/common_config.yaml @@ -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')" diff --git a/kubernetes/portal/components/portal-app/templates/deployment.yaml b/kubernetes/portal/components/portal-app/templates/deployment.yaml index 39393efb59..db4454d5e5 100644 --- a/kubernetes/portal/components/portal-app/templates/deployment.yaml +++ b/kubernetes/portal/components/portal-app/templates/deployment.yaml @@ -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: diff --git a/kubernetes/portal/components/portal-app/values.yaml b/kubernetes/portal/components/portal-app/values.yaml index b46876ced9..6cf2513c44 100644 --- a/kubernetes/portal/components/portal-app/values.yaml +++ b/kubernetes/portal/components/portal-app/values.yaml @@ -166,3 +166,8 @@ resources: cpu: 2 memory: 8Gi unlimited: {} + +# Log configuration +log: + path: /var/log/onap +logConfigMapNamePrefix: '{{ include "common.fullname" . }}' diff --git a/kubernetes/portal/components/portal-sdk/templates/deployment.yaml b/kubernetes/portal/components/portal-sdk/templates/deployment.yaml index 95247b3dd2..abc5daab80 100644 --- a/kubernetes/portal/components/portal-sdk/templates/deployment.yaml +++ b/kubernetes/portal/components/portal-sdk/templates/deployment.yaml @@ -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 }} diff --git a/kubernetes/portal/components/portal-sdk/values.yaml b/kubernetes/portal/components/portal-sdk/values.yaml index 7631c3a482..f0c3954c11 100644 --- a/kubernetes/portal/components/portal-sdk/values.yaml +++ b/kubernetes/portal/components/portal-sdk/values.yaml @@ -161,3 +161,8 @@ resources: cpu: 4 memory: 10Gi unlimited: {} + +# Log configuration +log: + path: /var/log/onap +logConfigMapNamePrefix: '{{ include "common.fullname" . }}' diff --git a/kubernetes/portal/templates/configmap.yaml b/kubernetes/portal/templates/configmap.yaml index a474a6c3d3..681f24eff3 100644 --- a/kubernetes/portal/templates/configmap.yaml +++ b/kubernetes/portal/templates/configmap.yaml @@ -15,16 +15,4 @@ # 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" . }} diff --git a/kubernetes/portal/values.yaml b/kubernetes/portal/values.yaml index 0d4b023b12..0e6c9d63f5 100644 --- a/kubernetes/portal/values.yaml +++ b/kubernetes/portal/values.yaml @@ -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 diff --git a/kubernetes/sdc/components/sdc-be/values.yaml b/kubernetes/sdc/components/sdc-be/values.yaml index eec198865f..0449648b27 100644 --- a/kubernetes/sdc/components/sdc-be/values.yaml +++ b/kubernetes/sdc/components/sdc-be/values.yaml @@ -35,8 +35,8 @@ global: # Application configuration defaults. ################################################################# # application image -image: onap/sdc-backend-all-plugins:1.9.4 -backendInitImage: onap/sdc-backend-init:1.9.4 +image: onap/sdc-backend-all-plugins:1.9.5 +backendInitImage: onap/sdc-backend-init:1.9.5 pullPolicy: Always diff --git a/kubernetes/sdc/components/sdc-cs/values.yaml b/kubernetes/sdc/components/sdc-cs/values.yaml index a36fdb5c0d..e00475adc4 100644 --- a/kubernetes/sdc/components/sdc-cs/values.yaml +++ b/kubernetes/sdc/components/sdc-cs/values.yaml @@ -38,8 +38,8 @@ global: ################################################################# # application image repository: nexus3.onap.org:10001 -image: onap/sdc-cassandra:1.9.4 -cassandraInitImage: onap/sdc-cassandra-init:1.9.4 +image: onap/sdc-cassandra:1.9.5 +cassandraInitImage: onap/sdc-cassandra-init:1.9.5 pullPolicy: Always config: diff --git a/kubernetes/sdc/components/sdc-fe/values.yaml b/kubernetes/sdc/components/sdc-fe/values.yaml index bb68dd3610..a208226b76 100644 --- a/kubernetes/sdc/components/sdc-fe/values.yaml +++ b/kubernetes/sdc/components/sdc-fe/values.yaml @@ -47,7 +47,7 @@ certInitializer: # Application configuration defaults. ################################################################# # application image -image: onap/sdc-frontend:1.9.4 +image: onap/sdc-frontend:1.9.5 pullPolicy: Always config: diff --git a/kubernetes/sdc/components/sdc-onboarding-be/values.yaml b/kubernetes/sdc/components/sdc-onboarding-be/values.yaml index ae6de7f6c3..d8cc670bdf 100644 --- a/kubernetes/sdc/components/sdc-onboarding-be/values.yaml +++ b/kubernetes/sdc/components/sdc-onboarding-be/values.yaml @@ -59,8 +59,8 @@ certInitializer: # Application configuration defaults. ################################################################# # application image -image: onap/sdc-onboard-backend:1.9.4 -onboardingInitImage: onap/sdc-onboard-cassandra-init:1.9.4 +image: onap/sdc-onboard-backend:1.9.5 +onboardingInitImage: onap/sdc-onboard-cassandra-init:1.9.5 pullPolicy: Always # flag to enable debugging - application support required diff --git a/kubernetes/sdnc/templates/statefulset.yaml b/kubernetes/sdnc/templates/statefulset.yaml index fc584d8e25..f53c41c0f5 100644 --- a/kubernetes/sdnc/templates/statefulset.yaml +++ b/kubernetes/sdnc/templates/statefulset.yaml @@ -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 }} diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml index 15a8045d2f..cbf5678283 100644 --- a/kubernetes/sdnc/values.yaml +++ b/kubernetes/sdnc/values.yaml @@ -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 diff --git a/kubernetes/vfc/components/vfc-generic-vnfm-driver/templates/deployment.yaml b/kubernetes/vfc/components/vfc-generic-vnfm-driver/templates/deployment.yaml index c910f4786f..d5a043d533 100644 --- a/kubernetes/vfc/components/vfc-generic-vnfm-driver/templates/deployment.yaml +++ b/kubernetes/vfc/components/vfc-generic-vnfm-driver/templates/deployment.yaml @@ -69,7 +69,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/vfc/gvnfmdriver/config/log.yml subPath: log.yml @@ -85,18 +85,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 }} volumes: - name: {{ include "common.fullname" . }}-localtime hostPath: @@ -106,11 +95,6 @@ spec: - name: {{ include "common.fullname" . }}-logconfig configMap: name : {{ include "common.fullname" . }}-logging-configmap - - - name: {{ include "common.fullname" . }}-filebeat-conf - configMap: - name: {{ include "common.release" . }}-vfc-filebeat-configmap - - name: {{ include "common.fullname" . }}-data-filebeat - emptyDir: {} + {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/vfc/components/vfc-generic-vnfm-driver/values.yaml b/kubernetes/vfc/components/vfc-generic-vnfm-driver/values.yaml index dcdcef82ba..d92989dbcb 100644 --- a/kubernetes/vfc/components/vfc-generic-vnfm-driver/values.yaml +++ b/kubernetes/vfc/components/vfc-generic-vnfm-driver/values.yaml @@ -85,3 +85,8 @@ resources: cpu: 200m memory: 500Mi unlimited: {} + +# Log configuration +log: + path: /var/log/onap +logConfigMapNamePrefix: '{{ include "common.fullname" . }}' diff --git a/kubernetes/vfc/components/vfc-huawei-vnfm-driver/templates/deployment.yaml b/kubernetes/vfc/components/vfc-huawei-vnfm-driver/templates/deployment.yaml index 4f74d1ddd5..dd763b4f1e 100644 --- a/kubernetes/vfc/components/vfc-huawei-vnfm-driver/templates/deployment.yaml +++ b/kubernetes/vfc/components/vfc-huawei-vnfm-driver/templates/deployment.yaml @@ -72,7 +72,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/vfc/hwvnfmdriver/config/log4j.properties subPath: log4j.properties @@ -88,18 +88,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 }} volumes: - name: {{ include "common.fullname" . }}-localtime hostPath: @@ -109,11 +98,6 @@ spec: - name: {{ include "common.fullname" . }}-logconfig configMap: name : {{ include "common.fullname" . }}-logging-configmap - - - name: {{ include "common.fullname" . }}-filebeat-conf - configMap: - name: {{ include "common.release" . }}-vfc-filebeat-configmap - - name: {{ include "common.fullname" . }}-data-filebeat - emptyDir: {} + {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/vfc/components/vfc-huawei-vnfm-driver/values.yaml b/kubernetes/vfc/components/vfc-huawei-vnfm-driver/values.yaml index 548cab8d0f..596a1cf36d 100644 --- a/kubernetes/vfc/components/vfc-huawei-vnfm-driver/values.yaml +++ b/kubernetes/vfc/components/vfc-huawei-vnfm-driver/values.yaml @@ -86,4 +86,9 @@ resources: requests: cpu: 200m memory: 2000Mi - unlimited: {}
\ No newline at end of file + unlimited: {} + +# Log configuration +log: + path: /var/log/onap +logConfigMapNamePrefix: '{{ include "common.fullname" . }}' diff --git a/kubernetes/vfc/components/vfc-nslcm/templates/deployment.yaml b/kubernetes/vfc/components/vfc-nslcm/templates/deployment.yaml index 17d8cc263e..13c17059f4 100644 --- a/kubernetes/vfc/components/vfc-nslcm/templates/deployment.yaml +++ b/kubernetes/vfc/components/vfc-nslcm/templates/deployment.yaml @@ -115,18 +115,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 }} volumes: - name: {{ include "common.fullname" . }}-localtime hostPath: @@ -136,11 +125,6 @@ spec: - name: {{ include "common.fullname" . }}-logconfig configMap: name : {{ include "common.fullname" . }}-logging-configmap - - - name: {{ include "common.fullname" . }}-filebeat-conf - configMap: - name: {{ include "common.release" . }}-vfc-filebeat-configmap - - name: {{ include "common.fullname" . }}-data-filebeat - emptyDir: {} + {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/vfc/components/vfc-nslcm/values.yaml b/kubernetes/vfc/components/vfc-nslcm/values.yaml index be7820006c..21ff189046 100644 --- a/kubernetes/vfc/components/vfc-nslcm/values.yaml +++ b/kubernetes/vfc/components/vfc-nslcm/values.yaml @@ -104,3 +104,8 @@ resources: cpu: 200m memory: 500Mi unlimited: {} + +# Log configuration +log: + path: /var/log/onap +logConfigMapNamePrefix: '{{ include "common.fullname" . }}' diff --git a/kubernetes/vfc/components/vfc-vnflcm/templates/deployment.yaml b/kubernetes/vfc/components/vfc-vnflcm/templates/deployment.yaml index 75968b2ffe..69de15c171 100644 --- a/kubernetes/vfc/components/vfc-vnflcm/templates/deployment.yaml +++ b/kubernetes/vfc/components/vfc-vnflcm/templates/deployment.yaml @@ -99,7 +99,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/vfc/gvnfm-vnflcm/config/log.yml subPath: log.yml @@ -115,18 +115,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 }} volumes: - name: {{ include "common.fullname" . }}-localtime hostPath: @@ -136,11 +125,6 @@ spec: - name: {{ include "common.fullname" . }}-logconfig configMap: name : {{ include "common.fullname" . }}-logging-configmap - - - name: {{ include "common.fullname" . }}-filebeat-conf - configMap: - name: {{ include "common.release" . }}-vfc-filebeat-configmap - - name: {{ include "common.fullname" . }}-data-filebeat - emptyDir: {} + {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/vfc/components/vfc-vnflcm/values.yaml b/kubernetes/vfc/components/vfc-vnflcm/values.yaml index 9098b4468b..e4ae447491 100644 --- a/kubernetes/vfc/components/vfc-vnflcm/values.yaml +++ b/kubernetes/vfc/components/vfc-vnflcm/values.yaml @@ -104,3 +104,8 @@ resources: cpu: 200m memory: 500Mi unlimited: {} + +# Log configuration +log: + path: /var/log/onap +logConfigMapNamePrefix: '{{ include "common.fullname" . }}' diff --git a/kubernetes/vfc/components/vfc-vnfmgr/templates/deployment.yaml b/kubernetes/vfc/components/vfc-vnfmgr/templates/deployment.yaml index f9a8ba71f2..0ee0b931b2 100644 --- a/kubernetes/vfc/components/vfc-vnfmgr/templates/deployment.yaml +++ b/kubernetes/vfc/components/vfc-vnfmgr/templates/deployment.yaml @@ -99,7 +99,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/vfc/gvnfm-vnfmgr/config/log.yml subPath: log.yml @@ -115,18 +115,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 }} volumes: - name: {{ include "common.fullname" . }}-localtime hostPath: @@ -137,10 +126,6 @@ spec: configMap: name : {{ include "common.fullname" . }}-logging-configmap - - name: {{ include "common.fullname" . }}-filebeat-conf - configMap: - name: {{ include "common.release" . }}-vfc-filebeat-configmap - - name: {{ include "common.fullname" . }}-data-filebeat - emptyDir: {} + {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/vfc/components/vfc-vnfmgr/values.yaml b/kubernetes/vfc/components/vfc-vnfmgr/values.yaml index f8a5b28065..cc2becc576 100644 --- a/kubernetes/vfc/components/vfc-vnfmgr/values.yaml +++ b/kubernetes/vfc/components/vfc-vnfmgr/values.yaml @@ -103,3 +103,8 @@ resources: cpu: 200m memory: 500Mi unlimited: {} + +# Log configuration +log: + path: /var/log/onap +logConfigMapNamePrefix: '{{ include "common.fullname" . }}' diff --git a/kubernetes/vfc/components/vfc-vnfres/templates/deployment.yaml b/kubernetes/vfc/components/vfc-vnfres/templates/deployment.yaml index 06258a0d7e..a0178151d4 100644 --- a/kubernetes/vfc/components/vfc-vnfres/templates/deployment.yaml +++ b/kubernetes/vfc/components/vfc-vnfres/templates/deployment.yaml @@ -115,18 +115,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 }} volumes: - name: {{ include "common.fullname" . }}-localtime hostPath: @@ -136,11 +125,6 @@ spec: - name: {{ include "common.fullname" . }}-logconfig configMap: name : {{ include "common.fullname" . }}-logging-configmap - - - name: {{ include "common.fullname" . }}-filebeat-conf - configMap: - name: {{ include "common.release" . }}-vfc-filebeat-configmap - - name: {{ include "common.fullname" . }}-data-filebeat - emptyDir: {} + {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/vfc/components/vfc-vnfres/values.yaml b/kubernetes/vfc/components/vfc-vnfres/values.yaml index 74e5b21faf..68d66a6558 100644 --- a/kubernetes/vfc/components/vfc-vnfres/values.yaml +++ b/kubernetes/vfc/components/vfc-vnfres/values.yaml @@ -104,3 +104,8 @@ resources: cpu: 200m memory: 500Mi unlimited: {} + +# Log configuration +log: + path: /var/log/onap +logConfigMapNamePrefix: '{{ include "common.fullname" . }}' diff --git a/kubernetes/vfc/components/vfc-zte-vnfm-driver/templates/deployment.yaml b/kubernetes/vfc/components/vfc-zte-vnfm-driver/templates/deployment.yaml index 8c24dd6c45..9dcba3bf9b 100644 --- a/kubernetes/vfc/components/vfc-zte-vnfm-driver/templates/deployment.yaml +++ b/kubernetes/vfc/components/vfc-zte-vnfm-driver/templates/deployment.yaml @@ -69,7 +69,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/vfc/ztevnfmdriver/config/log.yml subPath: log.yml @@ -85,18 +85,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 }} volumes: - name: {{ include "common.fullname" . }}-localtime hostPath: @@ -106,11 +95,6 @@ spec: - name: {{ include "common.fullname" . }}-logconfig configMap: name : {{ include "common.fullname" . }}-logging-configmap - - - name: {{ include "common.fullname" . }}-filebeat-conf - configMap: - name: {{ include "common.release" . }}-vfc-filebeat-configmap - - name: {{ include "common.fullname" . }}-data-filebeat - emptyDir: {} + {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/vfc/components/vfc-zte-vnfm-driver/values.yaml b/kubernetes/vfc/components/vfc-zte-vnfm-driver/values.yaml index 643c3fbd84..c6db92a7a4 100644 --- a/kubernetes/vfc/components/vfc-zte-vnfm-driver/values.yaml +++ b/kubernetes/vfc/components/vfc-zte-vnfm-driver/values.yaml @@ -84,4 +84,9 @@ resources: requests: cpu: 100m memory: 500Mi - unlimited: {}
\ No newline at end of file + unlimited: {} + +# Log configuration +log: + path: /var/log/onap +logConfigMapNamePrefix: '{{ include "common.fullname" . }}' diff --git a/kubernetes/vfc/resources/config/logging/filebeat/filebeat.yml b/kubernetes/vfc/resources/config/log/filebeat/filebeat.yml index 0bc14ea908..0bc14ea908 100644 --- a/kubernetes/vfc/resources/config/logging/filebeat/filebeat.yml +++ b/kubernetes/vfc/resources/config/log/filebeat/filebeat.yml diff --git a/kubernetes/vfc/templates/configmap.yaml b/kubernetes/vfc/templates/configmap.yaml index 88fda224ee..e890b8d957 100644 --- a/kubernetes/vfc/templates/configmap.yaml +++ b/kubernetes/vfc/templates/configmap.yaml @@ -14,10 +14,4 @@ # limitations under the License. */}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.release" . }}-vfc-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" . }} diff --git a/kubernetes/vfc/values.yaml b/kubernetes/vfc/values.yaml index 64bd029bd1..01d9eefd67 100644 --- a/kubernetes/vfc/values.yaml +++ b/kubernetes/vfc/values.yaml @@ -35,6 +35,7 @@ global: service: mariadb-galera internalPort: 3306 nameOverride: mariadb-galera + centralizedLoggingEnabled: true ################################################################# # Secrets metaconfig @@ -69,13 +70,16 @@ mariadb-galera: &localMariadb vfc-generic-vnfm-driver: enabled: true + logConfigMapNamePrefix: '{{ include "common.release" . }}-vfc' vfc-huawei-vnfm-driver: enabled: true + logConfigMapNamePrefix: '{{ include "common.release" . }}-vfc' vfc-nslcm: enabled: true mariadb-galera: *localMariadb + logConfigMapNamePrefix: '{{ include "common.release" . }}-vfc' vfc-redis: enabled: true @@ -83,14 +87,17 @@ vfc-redis: vfc-vnflcm: enabled: true mariadb-galera: *localMariadb + logConfigMapNamePrefix: '{{ include "common.release" . }}-vfc' vfc-vnfmgr: enabled: true mariadb-galera: *localMariadb + logConfigMapNamePrefix: '{{ include "common.release" . }}-vfc' vfc-vnfres: enabled: true mariadb-galera: *localMariadb + logConfigMapNamePrefix: '{{ include "common.release" . }}-vfc' # sub-chart configuration vfc-workflow: @@ -103,3 +110,4 @@ vfc-workflow-engine: vfc-zte-vnfm-driver: enabled: true + logConfigMapNamePrefix: '{{ include "common.release" . }}-vfc' diff --git a/kubernetes/vid/templates/configmap.yaml b/kubernetes/vid/templates/configmap.yaml index 0ba466dfb9..5c423e61cc 100644 --- a/kubernetes/vid/templates/configmap.yaml +++ b/kubernetes/vid/templates/configmap.yaml @@ -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 diff --git a/kubernetes/vid/templates/deployment.yaml b/kubernetes/vid/templates/deployment.yaml index 478b44232b..116a7cdfed 100644 --- a/kubernetes/vid/templates/deployment.yaml +++ b/kubernetes/vid/templates/deployment.yaml @@ -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 diff --git a/kubernetes/vid/values.yaml b/kubernetes/vid/values.yaml index 91132e276c..aba010eb26 100644 --- a/kubernetes/vid/values.yaml +++ b/kubernetes/vid/values.yaml @@ -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 |