From 7b9a087af97652471e6239916442c9953c5deecf Mon Sep 17 00:00:00 2001 From: efiacor Date: Wed, 28 Aug 2019 21:20:22 +0000 Subject: DMaaP DR refactoring # Increase docker images # Refactor global vars # Fix logstash paths etc # Remove default feed script Change-Id: Ib15fecc57d6f7f2d4049eff7903c08bc3adb78da Issue-ID: DMAAP-1283 Signed-off-by: efiacor --- .../resources/config/feeds/createFeed.sh | 14 - .../resources/config/feeds/dedicatedFeed.json | 18 - .../resources/config/log/filebeat/filebeat.yml | 4 +- .../dmaap-dr-node/resources/config/logback.xml | 170 +++++-- .../dmaap-dr-node/resources/config/node.properties | 4 +- .../dmaap-dr-node/templates/configmap.yaml | 15 +- .../dmaap-dr-node/templates/statefulset.yaml | 31 +- .../dmaap/components/dmaap-dr-node/values.yaml | 16 +- .../resources/config/log/filebeat/filebeat.yml | 3 +- .../dmaap-dr-prov/resources/config/logback.xml | 505 ++++++++++++++++----- .../resources/config/provserver.properties | 4 +- .../dmaap-dr-prov/templates/configmap.yaml | 2 +- .../dmaap-dr-prov/templates/deployment.yaml | 17 +- .../dmaap-dr-prov/templates/service.yaml | 36 +- .../dmaap/components/dmaap-dr-prov/values.yaml | 10 +- .../resources/config/log/filebeat/filebeat.yml | 2 +- kubernetes/dmaap/values.yaml | 12 +- 17 files changed, 565 insertions(+), 298 deletions(-) delete mode 100644 kubernetes/dmaap/components/dmaap-dr-node/resources/config/feeds/createFeed.sh delete mode 100644 kubernetes/dmaap/components/dmaap-dr-node/resources/config/feeds/dedicatedFeed.json (limited to 'kubernetes') diff --git a/kubernetes/dmaap/components/dmaap-dr-node/resources/config/feeds/createFeed.sh b/kubernetes/dmaap/components/dmaap-dr-node/resources/config/feeds/createFeed.sh deleted file mode 100644 index 1289ecae86..0000000000 --- a/kubernetes/dmaap/components/dmaap-dr-node/resources/config/feeds/createFeed.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -dr_prov_url="{{.Values.config.dmaapDrProv.name}}:{{.Values.config.dmaapDrProv.internalPort2}}" -ct_header="Content-Type:application/vnd.dmaap-dr.feed" -obo_header="X-DMAAP-DR-ON-BEHALF-OF:dradmin" -feed_payload=/opt/app/datartr/etc/dedicatedFeed.json - -sleep 20 - -if curl -k https://${dr_prov_url}/internal/prov | awk 'BEGIN{ORS=""} {print}' | egrep "\"feeds\":\s+\[\]"; then - curl -X POST -H ${ct_header} -H ${obo_header} --data-ascii @${feed_payload} --post301 --location-trusted -k https://${dr_prov_url}; -else - echo "NO feed creation required"; -fi diff --git a/kubernetes/dmaap/components/dmaap-dr-node/resources/config/feeds/dedicatedFeed.json b/kubernetes/dmaap/components/dmaap-dr-node/resources/config/feeds/dedicatedFeed.json deleted file mode 100644 index a96f46d528..0000000000 --- a/kubernetes/dmaap/components/dmaap-dr-node/resources/config/feeds/dedicatedFeed.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "Default PM Feed", - "version": "m1.0", - "description": "Default feed provisioned for PM File collector", - "business_description": "Default Feed", - "suspend": false, - "deleted": false, - "changeowner": true, - "authorization": { - "classification": "unclassified", - "endpoint_addrs": [], - "endpoint_ids": [ - { - "password": "dradmin", - "id": "dradmin" - }] - } -} \ No newline at end of file diff --git a/kubernetes/dmaap/components/dmaap-dr-node/resources/config/log/filebeat/filebeat.yml b/kubernetes/dmaap/components/dmaap-dr-node/resources/config/log/filebeat/filebeat.yml index f1cf7394b6..e0cb1dd21b 100644 --- a/kubernetes/dmaap/components/dmaap-dr-node/resources/config/log/filebeat/filebeat.yml +++ b/kubernetes/dmaap/components/dmaap-dr-node/resources/config/log/filebeat/filebeat.yml @@ -16,6 +16,7 @@ # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END========================================================= +# dmaap-dr-node filebeat.yml filebeat.prospectors: #it is mandatory, in our case it's log - input_type: log @@ -24,7 +25,6 @@ filebeat.prospectors: - /var/log/onap/*/*/*/*.log - /var/log/onap/*/*/*.log - /var/log/onap/*/*.log - - /opt/app/datartr/logs/*.log #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive ignore_older: 48h # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit @@ -40,7 +40,7 @@ output.logstash: #List of logstash server ip addresses with port number. #But, in our case, this will be the loadbalancer IP address. #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately. - hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"] + hosts: ["{{.Values.global.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.global.logstashPort}}"] #If enable will do load balancing among available Logstash, automatically. loadbalance: true diff --git a/kubernetes/dmaap/components/dmaap-dr-node/resources/config/logback.xml b/kubernetes/dmaap/components/dmaap-dr-node/resources/config/logback.xml index 25a2c6e093..ba247e151c 100644 --- a/kubernetes/dmaap/components/dmaap-dr-node/resources/config/logback.xml +++ b/kubernetes/dmaap/components/dmaap-dr-node/resources/config/logback.xml @@ -17,18 +17,21 @@ SPDX-License-Identifier: Apache-2.0 ============LICENSE_END========================================================= --> - + - - - + + + + + + + - - - - - + + + + ${defaultPattern} @@ -39,110 +42,181 @@ - + + + - ${logDirectory}/${generalLogName}.log - - INFO - ACCEPT - DENY + ${logDirectory}/${auditLog}.log + - ${logDirectory}/${generalLogName}.%i.log.zip + ${logDirectory}/${auditLog}.%i.log.zip 1 9 - 5MB + 50MB + + + ${defaultPattern} + + + + + 256 + + + + + + + ${logDirectory}/${metricsLog}.log + + + + ${logDirectory}/${metricsLog}.%i.log.zip + + 1 + 9 + + + 50MB ${defaultPattern} - + 256 - + - + + + + ${logDirectory}/${debugLog}.log + + + + ${logDirectory}/${debugLog}.%i.log.zip + + 1 + 9 + + + 50MB + + + ${defaultPattern} + + + + + 256 + + + + + + - ${logDirectory}/${errorLogName}.log - - ERROR - ACCEPT - DENY + ${logDirectory}/${errorLog}.log + - ${logDirectory}/${errorLogName}.%i.log.zip + ${logDirectory}/${errorLog}.%i.log.zip 1 9 - 5MB + 50MB ${defaultPattern} - + 256 - + - - ${logDirectory}/${jettyAndNodeLogName}.log - + ${logDirectory}/${jettyLog}.log + - ${logDirectory}/${jettyAndNodeLogName}.%i.log.zip + ${logDirectory}/${jettyLog}.%i.log.zip 1 9 - 5MB + 50MB - ${jettyAndNodeLoggerPattern} + ${defaultPattern} - + 256 - + true + + + - + + + + + + + + + - - - + + + + + + + - - - - - - + + + + + - + \ No newline at end of file diff --git a/kubernetes/dmaap/components/dmaap-dr-node/resources/config/node.properties b/kubernetes/dmaap/components/dmaap-dr-node/resources/config/node.properties index 5de5fc1814..4379dfbf1d 100644 --- a/kubernetes/dmaap/components/dmaap-dr-node/resources/config/node.properties +++ b/kubernetes/dmaap/components/dmaap-dr-node/resources/config/node.properties @@ -26,13 +26,13 @@ # URL to retrieve dynamic configuration # #ProvisioningURL: ${DRTR_PROV_INTURL} -ProvisioningURL=https://{{.Values.config.dmaapDrProv.name}}:{{.Values.config.dmaapDrProv.externalPort2}}/internal/prov +ProvisioningURL=https://{{ .Values.global.dmaapDrProvName }}:{{ .Values.global.dmaapDrProvExtPort2 }}/internal/prov # # URL to upload PUB/DEL/EXP logs # #LogUploadURL: ${DRTR_LOG_URL} -LogUploadURL=https://{{.Values.config.dmaapDrProv.name}}:{{.Values.config.dmaapDrProv.externalPort2}}/internal/logs +LogUploadURL=https://{{ .Values.global.dmaapDrProvName }}:{{ .Values.global.dmaapDrProvExtPort2 }}/internal/logs # # The port number for http as seen within the server diff --git a/kubernetes/dmaap/components/dmaap-dr-node/templates/configmap.yaml b/kubernetes/dmaap/components/dmaap-dr-node/templates/configmap.yaml index a3882bcb38..5c581beee7 100644 --- a/kubernetes/dmaap/components/dmaap-dr-node/templates/configmap.yaml +++ b/kubernetes/dmaap/components/dmaap-dr-node/templates/configmap.yaml @@ -27,19 +27,6 @@ data: --- apiVersion: v1 kind: ConfigMap -metadata: - name: {{ include "common.fullname" . }}-create-feed-configmap - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: -{{ tpl (.Files.Glob "resources/config/feeds/*").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap metadata: name: {{ include "common.fullname" . }}-log namespace: {{ include "common.namespace" . }} @@ -62,7 +49,7 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "common.fullname" . }}-dmaap-filebeat-configmap + name: {{ include "common.fullname" . }}-dmaap-dr-node-filebeat-configmap namespace: {{ include "common.namespace" . }} data: {{ tpl (.Files.Glob "resources/config/log/filebeat/filebeat.yml").AsConfig . | indent 2 }} diff --git a/kubernetes/dmaap/components/dmaap-dr-node/templates/statefulset.yaml b/kubernetes/dmaap/components/dmaap-dr-node/templates/statefulset.yaml index a508886f10..a190d0d7d2 100644 --- a/kubernetes/dmaap/components/dmaap-dr-node/templates/statefulset.yaml +++ b/kubernetes/dmaap/components/dmaap-dr-node/templates/statefulset.yaml @@ -81,23 +81,17 @@ spec: - mountPath: /etc/localtime name: localtime readOnly: false - - mountPath: /opt/app/datartr/etc/dedicatedFeed.json - name: {{ include "common.fullname" . }}-create-feed-config - subPath: dedicatedFeed.json - - mountPath: /opt/app/datartr/etc/createFeed.sh - name: {{ include "common.fullname" . }}-create-feed-config - subPath: createFeed.sh - mountPath: /opt/app/datartr/etc/node.properties name: {{ include "common.fullname" . }}-config subPath: node.properties - mountPath: /opt/app/datartr/etc/drNodeCadi.properties name: {{ include "common.fullname" . }}-config subPath: drNodeCadi.properties - lifecycle: - postStart: - exec: - command: - - /opt/app/datartr/etc/createFeed.sh + - mountPath: /opt/app/datartr/etc/logback.xml + name: {{ include "common.fullname" . }}-log-conf + subPath: logback.xml + - mountPath: {{ .Values.global.loggingDirectory }} + name: {{ include "common.fullname" . }}-logs resources: {{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} @@ -118,7 +112,7 @@ spec: subPath: filebeat.yml - name: {{ include "common.fullname" . }}-data-filebeat mountPath: /usr/share/filebeat/data - - name: {{ include "common.fullname" . }}-event-logs-pvc + - name: {{ include "common.fullname" . }}-logs mountPath: /var/log/onap/datarouter-node imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" @@ -126,15 +120,6 @@ spec: - name: localtime hostPath: path: /etc/localtime - - name: {{ include "common.fullname" . }}-create-feed-config - configMap: - name: {{ include "common.fullname" . }}-create-feed-configmap - defaultMode: 0755 - items: - - key: createFeed.sh - path: createFeed.sh - - key: dedicatedFeed.json - path: dedicatedFeed.json - name: {{ include "common.fullname" . }}-config configMap: name: {{ include "common.fullname" . }}-configmap @@ -148,11 +133,13 @@ spec: name: {{ include "common.fullname" . }}-log - name: {{ include "common.fullname" . }}-filebeat-conf configMap: - name: {{ .Release.Name }}-dmaap-filebeat-configmap + name: {{ include "common.fullname" . }}-dmaap-dr-node-filebeat-configmap - name: {{ include "common.fullname" . }}-data-filebeat emptyDir: {} - name: {{ include "common.fullname" . }}-event-logs-pvc emptyDir: {} + - name: {{ include "common.fullname" . }}-logs + emptyDir: {} volumeClaimTemplates: - metadata: name: {{ include "common.fullname" . }}-spool-data-pvc diff --git a/kubernetes/dmaap/components/dmaap-dr-node/values.yaml b/kubernetes/dmaap/components/dmaap-dr-node/values.yaml index 154018a018..723d977867 100644 --- a/kubernetes/dmaap/components/dmaap-dr-node/values.yaml +++ b/kubernetes/dmaap/components/dmaap-dr-node/values.yaml @@ -16,12 +16,7 @@ # Global configuration defaults. ################################################################# global: - nodePortPrefixExt: 304 - readinessRepository: oomk8s - readinessImage: readiness-check:2.0.0 - loggingRepository: docker.elastic.co - loggingImage: beats/filebeat:5.5.0 - loggingDirectory: /opt/app/datartr/logs + loggingDirectory: /var/log/onap/datarouter busyBoxImage: busybox:1.30 busyBoxRepository: docker.io @@ -29,8 +24,7 @@ global: # Application configuration defaults. ################################################################# # application image -repository: nexus3.onap.org:10001 -image: onap/dmaap/datarouter-node:2.1.0 +image: onap/dmaap/datarouter-node:2.1.1 pullPolicy: Always # flag to enable debugging - application support required @@ -107,9 +101,3 @@ config: portName2: dr-node-port2 nodePort: 93 nodePort2: 94 - -# dr provisioning server configuration - dmaapDrProv: - name: dmaap-dr-prov - externalPort2: 8443 - internalPort2: 8443 diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/log/filebeat/filebeat.yml b/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/log/filebeat/filebeat.yml index f1cf7394b6..db02b2115d 100644 --- a/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/log/filebeat/filebeat.yml +++ b/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/log/filebeat/filebeat.yml @@ -16,6 +16,7 @@ # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END========================================================= +# dmaap-dr-prov filebeat.yml filebeat.prospectors: #it is mandatory, in our case it's log - input_type: log @@ -40,7 +41,7 @@ output.logstash: #List of logstash server ip addresses with port number. #But, in our case, this will be the loadbalancer IP address. #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately. - hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"] + hosts: ["{{.Values.global.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.global.logstashPort}}"] #If enable will do load balancing among available Logstash, automatically. loadbalance: true diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/logback.xml b/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/logback.xml index 942d898695..f67b1cf380 100644 --- a/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/logback.xml +++ b/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/logback.xml @@ -18,131 +18,390 @@ ============LICENSE_END========================================================= --> + + + + - - - - - - - - - - - - - ${defaultPattern} - - - - - - - - - ${logDirectory}/${generalLogName}.log - - INFO - ACCEPT - DENY - - - ${logDirectory}/${generalLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${defaultPattern} - - - - - 256 - - - - - ${logDirectory}/${errorLogName}.log - - ERROR - ACCEPT - DENY - - - ${logDirectory}/${errorLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${defaultPattern} - - - - - 256 - - - - - - ${logDirectory}/${jettyLogName}.log - - - ${logDirectory}/${jettyLogName}.%i.log.zip - - 1 - 9 - - - 5MB - - - ${jettyLoggerPattern} - - - - - 256 - - true - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${defaultPattern} + + + + + + + + + + + + ${logDirectory}/${generalLogName}.log + + INFO + ACCEPT + DENY + + + ${logDirectory}/${generalLogName}.%i.log.zip + + 1 + 9 + + + 50MB + + + ${defaultPattern} + + + + + 256 + + + + + + + + + + + + + + + + + + + + + + + + + + + ${logDirectory}/${errorLogName}.log + + ERROR + ACCEPT + DENY + + + ${logDirectory}/${errorLogName}.%i.log.zip + + 1 + 9 + + + 50MB + + + ${defaultPattern} + + + + + 256 + + + + + + ${logDirectory}/${jettyLogName}.log + + + ${logDirectory}/${jettyLogName}.%i.log.zip + + 1 + 9 + + + 50MB + + + ${jettyLoggerPattern} + + + + + 256 + + true + + + + + + + ${logDirectory}/${debugLogName}.log + + + ${logDirectory}/${debugLogName}.%i.log.zip + + 1 + 9 + + + 50MB + + + ${defaultPattern} + + + + + 256 + + true + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + - + \ No newline at end of file diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/provserver.properties b/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/provserver.properties index a4e96f0af6..52f1f3f5c0 100644 --- a/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/provserver.properties +++ b/kubernetes/dmaap/components/dmaap-dr-prov/resources/config/provserver.properties @@ -23,8 +23,8 @@ #Jetty Server properties -org.onap.dmaap.datarouter.provserver.http.port = {{.Values.config.dmaapDrProv.externalPort}} -org.onap.dmaap.datarouter.provserver.https.port = {{.Values.config.dmaapDrProv.externalPort2}} +org.onap.dmaap.datarouter.provserver.http.port = {{.Values.global.dmaapDrProvExtPort}} +org.onap.dmaap.datarouter.provserver.https.port = {{.Values.global.dmaapDrProvExtPort2}} org.onap.dmaap.datarouter.provserver.https.relaxation = true org.onap.dmaap.datarouter.provserver.keymanager.password = FZNkU,B%NJzcT1v7;^v]M#ZX diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/templates/configmap.yaml b/kubernetes/dmaap/components/dmaap-dr-prov/templates/configmap.yaml index fe93cb0dcd..a39cb556a1 100644 --- a/kubernetes/dmaap/components/dmaap-dr-prov/templates/configmap.yaml +++ b/kubernetes/dmaap/components/dmaap-dr-prov/templates/configmap.yaml @@ -36,7 +36,7 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "common.fullname" . }}-dmaap-filebeat-configmap + name: {{ include "common.fullname" . }}-dmaap-dr-prov-filebeat-configmap namespace: {{ include "common.namespace" . }} data: {{ tpl (.Files.Glob "resources/config/log/filebeat/filebeat.yml").AsConfig . | indent 2 }} diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/templates/deployment.yaml b/kubernetes/dmaap/components/dmaap-dr-prov/templates/deployment.yaml index b9c144de72..ea487d0571 100644 --- a/kubernetes/dmaap/components/dmaap-dr-prov/templates/deployment.yaml +++ b/kubernetes/dmaap/components/dmaap-dr-prov/templates/deployment.yaml @@ -29,13 +29,13 @@ spec: app: {{ include "common.name" . }} release: {{ .Release.Name }} spec: - hostname: {{.Values.config.dmaapDrProv.name}} + hostname: {{ .Values.global.dmaapDrProvName }} initContainers: - command: - /root/ready.py args: - --container-name - - {{.Values.config.dmaapDrDb.mariadbContName}} + - {{ .Values.config.dmaapDrDb.mariadbContName }} env: - name: NAMESPACE valueFrom: @@ -50,18 +50,18 @@ spec: image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - - containerPort: {{.Values.config.dmaapDrProv.externalPort}} - - containerPort: {{.Values.config.dmaapDrProv.externalPort2}} + - containerPort: {{ .Values.global.dmaapDrProvExtPort }} + - containerPort: {{ .Values.global.dmaapDrProvExtPort2 }} {{- if eq .Values.liveness.enabled true }} livenessProbe: tcpSocket: - port: {{.Values.config.dmaapDrProv.externalPort}} + port: {{ .Values.global.dmaapDrProvExtPort }} initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} {{ end -}} readinessProbe: tcpSocket: - port: {{.Values.config.dmaapDrProv.externalPort}} + port: {{ .Values.global.dmaapDrProvExtPort }} initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} volumeMounts: @@ -74,6 +74,9 @@ spec: - mountPath: /opt/app/datartr/etc/drProvCadi.properties name: {{ include "common.fullname" . }}-config subPath: drProvCadi.properties + - mountPath: /opt/app/datartr/etc/logback.xml + name: {{ include "common.fullname" . }}-log-conf + subPath: logback.xml - mountPath: {{ .Values.global.loggingDirectory }} name: {{ include "common.fullname" . }}-logs resources: @@ -115,7 +118,7 @@ spec: name: {{ include "common.fullname" . }}-log - name: {{ include "common.fullname" . }}-filebeat-conf configMap: - name: {{ .Release.Name }}-dmaap-filebeat-configmap + name: {{ include "common.fullname" . }}-dmaap-dr-prov-filebeat-configmap - name: {{ include "common.fullname" . }}-data-filebeat emptyDir: {} - name: {{ include "common.fullname" . }}-logs diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/templates/service.yaml b/kubernetes/dmaap/components/dmaap-dr-prov/templates/service.yaml index 0b40389b55..20e29c347a 100644 --- a/kubernetes/dmaap/components/dmaap-dr-prov/templates/service.yaml +++ b/kubernetes/dmaap/components/dmaap-dr-prov/templates/service.yaml @@ -15,7 +15,7 @@ apiVersion: v1 kind: Service metadata: - name: {{.Values.config.dmaapDrProv.name}} + name: {{ .Values.global.dmaapDrProvName }} namespace: {{ include "common.namespace" . }} labels: app: {{ include "common.name" . }} @@ -26,36 +26,36 @@ metadata: service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" msb.onap.org/service-info: '[ { - "serviceName": "{{.Values.config.dmaapDrProv.name}}", + "serviceName": "{{ .Values.global.dmaapDrProvName }}", "version": "v1", "url": "/", "protocol": "REST", - "port": "{{.Values.config.dmaapDrProv.externalPort2}}", + "port": "{{ .Values.global.dmaapDrProvExtPort2 }}", "visualRange":"1" } ]' spec: - type: {{.Values.config.dmaapDrProv.servicetype}} + type: {{ .Values.config.dmaapDrProv.servicetype }} ports: {{- if eq .Values.config.dmaapDrProv.servicetype "NodePort" }} {{- if .Values.global.allow_http }} - - port: {{.Values.config.dmaapDrProv.externalPort}} - targetPort: {{.Values.config.dmaapDrProv.internalPort}} - nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{.Values.config.dmaapDrProv.nodePort}} - name: {{.Values.config.dmaapDrProv.name}} + - port: {{ .Values.global.dmaapDrProvExtPort }} + targetPort: {{ .Values.config.dmaapDrProv.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.config.dmaapDrProv.nodePort }} + name: {{ .Values.config.dmaapDrProv.portName }} {{- end}} - - port: {{.Values.config.dmaapDrProv.externalPort2}} - targetPort: {{.Values.config.dmaapDrProv.internalPort2}} - nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{.Values.config.dmaapDrProv.nodePort2}} - name: {{.Values.config.dmaapDrProv.name}}2 + - port: {{ .Values.global.dmaapDrProvExtPort2 }} + targetPort: {{ .Values.config.dmaapDrProv.internalPort2 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.config.dmaapDrProv.nodePort2 }} + name: {{ .Values.config.dmaapDrProv.portName }}2 {{- else -}} - - port: {{.Values.config.dmaapDrProv.externalPort}} - targetPort: {{.Values.config.dmaapDrProv.internalPort}} - name: {{.Values.config.dmaapDrProv.name}} - - port: {{.Values.config.dmaapDrProv.externalPort2}} - targetPort: {{.Values.config.dmaapDrProv.internalPort2}} - name: {{.Values.config.dmaapDrProv.name}}2 + - port: {{ .Values.global.dmaapDrProvExtPort }} + targetPort: {{ .Values.config.dmaapDrProv.internalPort }} + name: {{ .Values.config.dmaapDrProv.portName }} + - port: {{ .Values.global.dmaapDrProvExtPort2 }} + targetPort: {{ .Values.config.dmaapDrProv.internalPort2 }} + name: {{ .Values.config.dmaapDrProv.portName }}2 {{- end}} selector: app: {{ include "common.name" . }} diff --git a/kubernetes/dmaap/components/dmaap-dr-prov/values.yaml b/kubernetes/dmaap/components/dmaap-dr-prov/values.yaml index 39977f80e3..aca2c83adb 100644 --- a/kubernetes/dmaap/components/dmaap-dr-prov/values.yaml +++ b/kubernetes/dmaap/components/dmaap-dr-prov/values.yaml @@ -17,18 +17,13 @@ ################################################################# global: nodePortPrefix: 302 - readinessRepository: oomk8s - readinessImage: readiness-check:2.0.0 - loggingRepository: docker.elastic.co - loggingImage: beats/filebeat:5.5.0 loggingDirectory: /opt/app/datartr/logs ################################################################# # Application configuration defaults. ################################################################# # application image -repository: nexus3.onap.org:10001 -image: onap/dmaap/datarouter-prov:2.1.0 +image: onap/dmaap/datarouter-prov:2.1.1 pullPolicy: Always # flag to enable debugging - application support required @@ -86,9 +81,6 @@ config: # dr provisioning server configuration dmaapDrProv: servicetype: NodePort - name: dmaap-dr-prov - externalPort: 8080 - externalPort2: 8443 internalPort: 8080 internalPort2: 8443 portName: dr-prov-port diff --git a/kubernetes/dmaap/resources/config/log/filebeat/filebeat.yml b/kubernetes/dmaap/resources/config/log/filebeat/filebeat.yml index f1cf7394b6..40d2476b8e 100644 --- a/kubernetes/dmaap/resources/config/log/filebeat/filebeat.yml +++ b/kubernetes/dmaap/resources/config/log/filebeat/filebeat.yml @@ -40,7 +40,7 @@ output.logstash: #List of logstash server ip addresses with port number. #But, in our case, this will be the loadbalancer IP address. #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately. - hosts: ["{{.Values.config.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.config.logstashPort}}"] + hosts: ["{{.Values.global.logstashServiceName}}.{{.Release.Namespace}}:{{.Values.global.logstashPort}}"] #If enable will do load balancing among available Logstash, automatically. loadbalance: true diff --git a/kubernetes/dmaap/values.yaml b/kubernetes/dmaap/values.yaml index d5b7bffefe..89c8baa1a4 100644 --- a/kubernetes/dmaap/values.yaml +++ b/kubernetes/dmaap/values.yaml @@ -18,20 +18,28 @@ ################################################################# global: nodePortPrefix: 302 + nodePortPrefixExt: 304 readinessRepository: oomk8s readinessImage: readiness-check:2.0.0 loggingRepository: docker.elastic.co loggingImage: beats/filebeat:5.5.0 clientImage: onap/dmaap/dbc-client:1.0.9 + repository: nexus3.onap.org:10001 #Global DMaaP app config allow_http: true -# application configuration -config: + #Logstash config logstashServiceName: log-ls logstashPort: 5044 + #dmaap-dr-prov server configuration + dmaapDrProvName: dmaap-dr-prov + dmaapDrProvExtPort2: 8443 + dmaapDrProvExtPort: 8080 + + +#Component overrides message-router: enabled: true dmaap-bc: -- cgit 1.2.3-korg