1 ################################################################################
2 # Copyright (c) 2019 AT&T Intellectual Property. #
3 # Copyright (c) 2019 Nokia. #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
18 {{- range keys .Values.e2term }}
20 {{- with index $topCtx.Values.e2term . }}
22 {{- $imagectx := dict "ctx" $topCtx "defaultregistry" .image.registry }}
23 {{- $pullpolicyctx := dict "ctx" $topCtx "defaultpullpolicy" .imagePullPolicy }}
28 name: {{ include "common.deploymentname.e2term" $topCtx }}-{{ $key }}
29 namespace: {{ include "common.namespace.platform" $topCtx }}
31 app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}
32 chart: {{ $topCtx.Chart.Name }}-{{ $topCtx.Chart.Version | replace "+" "_" }}
33 release: {{ $topCtx.Release.Name }}
34 heritage: {{ $topCtx.Release.Service }}
36 replicas: {{ .replicaCount }}
39 app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}
40 release: {{ $topCtx.Release.Name }}
43 {{- if .annotations }}
45 {{- .annotations | nindent 8 -}}
48 app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}
49 release: {{ $topCtx.Release.Name }}
51 hostname: {{ include "common.name.e2term" $topCtx }}-{{ $key }}
52 hostNetwork: {{ .hostnetworkmode }}
53 dnsPolicy: ClusterFirstWithHostNet
55 - name: {{ include "common.dockerregistry.credential" $imagectx }}
56 {{- with .nodeselector }}
57 nodeSelector: {{ toYaml . | trim | nindent 8 -}}
60 - name: {{ include "common.containername.e2term" $topCtx }}
61 image: {{ include "common.dockerregistry.url" $imagectx }}/{{ .image.name }}:{{ .image.tag }}
62 imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $pullpolicyctx }}
64 - mountPath: /opt/e2/router.txt
65 name: local-router-file
67 - mountPath: /tmp/rmr_verbose
68 name: local-router-file
70 {{ if .pizpub.enabled }}
71 - mountPath: "{{ .env.messagecollectorfile }}"
74 subPath: "{{ .pizpub.scanDirectory }}"
76 - mountPath: "{{ .env.messagecollectorfile }}"
82 name: {{ include "common.configmapname.e2term" $topCtx }}-env-{{ $key }}
84 - name: "rmrroute-{{ $key }}"
85 containerPort: {{ include "common.serviceport.e2term.rmr.route" $topCtx }}
86 - name: "rmrdata-{{ $key }}"
87 containerPort: {{ include "common.serviceport.e2term.rmr.data" $topCtx }}
91 privileged: {{ .privilegedmode }}
93 {{ if .pizpub.enabled }}
94 - name: {{ include "common.containername.e2term" $topCtx }}-pizpub
95 {{- $pizpubimagectx := dict "ctx" $topCtx "defaultregistry" .pizpub.image.registry }}
96 image: {{ include "common.dockerregistry.url" $pizpubimagectx }}/{{ .pizpub.image.name }}:{{ .pizpub.image.tag }}
97 imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $pullpolicyctx }}
99 - mountPath: /etc/localtime
102 - mountPath: "{{ .pizpub.dataRootDir }}"
105 - name: pizpub-config
106 mountPath: /opt/app/config/conf/
110 command: ["/bin/sh", "/opt/app/config/conf/cleaner.sh", "{{ .pizpub.dataRootDir }}/{{ .pizpub.processedDirectory }}", "3"]
113 - name: local-router-file
115 name: {{ include "common.configmapname.e2term" $topCtx }}-router-configmap
116 {{ if .pizpub.enabled }}
120 - name: pizpub-config
122 name: {{ include "common.configmapname.e2term" $topCtx }}-pizpub-{{ $key }}
125 persistentVolumeClaim:
126 claimName: {{ include "common.pvcname.e2term" $topCtx }}-{{ $key }}