...
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
{{- define "common.dmaap.provisioning.initContainer" -}} {{- $dot := default . .dot -}} {{- $drFeedConfig := default $dot.Values.drFeedConfig .drFeedConfig -}} {{- $drPubConfig := default $dot.Values.drPubConfig .drPubConfig -}} {{- if or $drFeedConfig $drPubConfig -}} - name: {{ include "common.name" $dot }}-init-dmaap-provisioning image: {{ include "repositoryGenerator.image.dbcClient" $dot }} imagePullPolicy: {{ $dot.Values.global.pullPolicy | default $dot.Values.pullPolicy }} env: - name: RESP_CACHE value: /opt/app/config/cache - name: REQUESTID value: "{{ include "common.name" $dot }}-dmaap-provisioning" resources: {{ include "common.resources" $dot | nindent 1 }} volumeMounts: {{- include "common.dmaap.provisioning._volumeMounts" $dot | trim | nindent 2 }} - name: {{ include "common.name" $dot }}-init-merge-config image: {{ include "repositoryGenerator.image.envsubst" $dot }} imagePullPolicy: {{ $dot.Values.global.pullPolicy | default $dot.Values.pullPolicy }} command: - /bin/sh args: - -c - | if [ -d /opt/app/config/cache/ ]; then cd /opt/app/config/cache/ for file in $(ls feed*); do NUM=$(echo "$file" | sed 's/feedConfig-\([0-9]\+\)-resp.json/\1/') export DR_LOG_URL_"$NUM"="$(grep -o '"logURL":"[^"]*' "$file" | cut -d '"' -f4)" export DR_FILES_PUBLISHER_URL_"$NUM"="$(grep -o '"publishURL":"[^"]*' "$file" | cut -d '"' -f4)" done for file in $(ls drpub*); do NUM=$(echo "$file" | sed 's/drpubConfig-\([0-9]\+\)-resp.json/\1/') export DR_USERNAME_"$NUM"="$(grep -o '"username":"[^"]*' "$file" | cut -d '"' -f4)" export DR_PASSWORD_"$NUM"="$(grep -o '"userpwd":"[^"]*' "$file" | cut -d '"' -f4)" export DR_FILES_PUBLISHER_ID_"$NUM"="$(grep -o '"pubId":"[^"]*' "$file" | cut -d '"' -f4)" done for file in $(ls drsub*); do NUM=$(echo "$file" | sed 's/drsubConfig-\([0-9]\+\)-resp.json/\1/') export DR_USERNAME_"$NUM"="$(grep -o '"username":"[^"]*' "$file" | cut -d '"' -f4)" export DR_PASSWORD_"$NUM"="$(grep -o '"userpwd":"[^"]*' "$file" | cut -d '"' -f4)" export DR_FILES_SUBSCRIBER_ID_"$NUM"="$(grep -o '"subId":"[^"]*' "$file" | cut -d '"' -f4)" done else echo "No Response logged for Dmaap BusController Http POST Request..!" fi cd /config-input && for PFILE in `ls -1`; do envsubst <${PFILE} >/config/${PFILE}; done volumeMounts: - mountPath: /opt/app/config/cache/ name: dbc-response-cache - mountPath: /config-input name: app-config-input - mountPath: /config name: app-config resources: limits: cpu: 200m memory: 250Mi requests: cpu: 100m memory: 200Mi {{- end -}} {{- end -}} |
Open Issues
Data Router Publisher/Subscriber behaviour is not consistentÂ
...