From 44d649d04591fb2938fafb4483ce6ac0431792bd Mon Sep 17 00:00:00 2001 From: Zhe Huang Date: Wed, 3 Jun 2020 19:04:11 -0400 Subject: [PATCH] Update pizpub config Signed-off-by: Zhe Huang Change-Id: Ie4ab62e95c70fefb8345edee9edd5553491968b6 --- helm/e2term/resources/configfile.properties | 2 ++ helm/e2term/resources/pizpub.crontab | 2 ++ helm/e2term/templates/configmap-pizpub.yaml | 2 ++ helm/e2term/templates/service-sctp.yaml | 6 +++--- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/helm/e2term/resources/configfile.properties b/helm/e2term/resources/configfile.properties index 0155202..140cc73 100644 --- a/helm/e2term/resources/configfile.properties +++ b/helm/e2term/resources/configfile.properties @@ -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 }} diff --git a/helm/e2term/resources/pizpub.crontab b/helm/e2term/resources/pizpub.crontab index a41b109..44b8a8e 100644 --- a/helm/e2term/resources/pizpub.crontab +++ b/helm/e2term/resources/pizpub.crontab @@ -15,4 +15,6 @@ ################################################################################ # +{{- with index .Values.e2term .key }} 0 * * * * find {{ .pizpub.dataRootDir }}/{{ .pizpub.processedDirectory }} -type f -mtime +3 -delete +{{- end }} diff --git a/helm/e2term/templates/configmap-pizpub.yaml b/helm/e2term/templates/configmap-pizpub.yaml index 5ef9cb5..63ea7d8 100644 --- a/helm/e2term/templates/configmap-pizpub.yaml +++ b/helm/e2term/templates/configmap-pizpub.yaml @@ -16,9 +16,11 @@ {{- $topCtx := . }} {{- range keys .Values.e2term }} {{- $key := . }} +{{- $_ := set $topCtx "key" $key }} {{- with index $topCtx.Values.e2term . }} {{ if .pizpub.enabled }} +--- apiVersion: v1 kind: ConfigMap metadata: diff --git a/helm/e2term/templates/service-sctp.yaml b/helm/e2term/templates/service-sctp.yaml index 8efec7c..b239fbc 100644 --- a/helm/e2term/templates/service-sctp.yaml +++ b/helm/e2term/templates/service-sctp.yaml @@ -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 }}" -- 2.16.6