Update pizpub config 85/3985/2
authorZhe Huang <zhehuang@research.att.com>
Wed, 3 Jun 2020 23:04:11 +0000 (19:04 -0400)
committerZhe Huang <zhehuang@research.att.com>
Thu, 4 Jun 2020 20:57:31 +0000 (16:57 -0400)
Signed-off-by: Zhe Huang <zhehuang@research.att.com>
Change-Id: Ie4ab62e95c70fefb8345edee9edd5553491968b6

helm/e2term/resources/configfile.properties
helm/e2term/resources/pizpub.crontab
helm/e2term/templates/configmap-pizpub.yaml
helm/e2term/templates/service-sctp.yaml

index 0155202..140cc73 100644 (file)
@@ -1,3 +1,4 @@
+{{- with index .Values.e2term .key }}
 Processors: pub
 pub.Class: com.att.research.basin.pubsubx.Publisher
 pub.Threads: 2
@@ -16,3 +17,4 @@ scanner.ScanIntervalSeconds: 10
 scanner.DeleteOrGZip: delete
 scanner.LinkDirectory: {{ .pizpub.dataRootDir }}/{{ .pizpub.processedDirectory }}
 scanner.meta.record_count: countNewLines
+{{- end }}
index a41b109..44b8a8e 100644 (file)
@@ -15,4 +15,6 @@
 ################################################################################
 
 #
+{{- with index .Values.e2term .key }}
 0 * * * * find {{ .pizpub.dataRootDir }}/{{ .pizpub.processedDirectory }} -type f  -mtime +3 -delete
+{{- end }}
index 5ef9cb5..63ea7d8 100644 (file)
 {{- $topCtx :=  . }}
 {{- range keys .Values.e2term }}
 {{- $key := . }}
+{{- $_ := set $topCtx "key" $key }}
 {{- with index $topCtx.Values.e2term . }}
 
 {{ if .pizpub.enabled }}
+---
 apiVersion: v1
 kind: ConfigMap
 metadata:
index 8efec7c..b239fbc 100644 (file)
@@ -15,8 +15,8 @@
 #   limitations under the License.                                             #
 ################################################################################
 {{- $topCtx :=  . }} 
-{{- range keys .Values.e2term }} 
-{{- $key := . }} 
+{{- range $index, $element := keys .Values.e2term }} 
+{{- $key := . }}
 {{- with index $topCtx.Values.e2term . }}
 ---
 apiVersion: v1
@@ -33,7 +33,7 @@ spec:
   type: NodePort
   ports:
     - port: {{ include "common.serviceport.e2term.sctp" $topCtx }}
-      nodePort: 31888
+      nodePort: {{ add 32222 $index }}
       protocol: "SCTP"
       targetPort: {{ include "common.serviceport.e2term.sctp" $topCtx }}
       name: "rmrsctp-{{ $key }}"