X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Faai%2Ftemplates%2Fdata-router-deployment.yaml;h=37b9fb411cfba952312a5dfdcdb42d7e3b8a1268;hb=e04b2feb855e5ab20e28c867d2bd7f89f6b8c425;hp=f823061c33aa4ef7cddd0da104f15fbef5751852;hpb=b473f849cd6d94165f95d7fa181fff0aaae1289e;p=oom.git diff --git a/kubernetes/aai/templates/data-router-deployment.yaml b/kubernetes/aai/templates/data-router-deployment.yaml index f823061c33..37b9fb411c 100644 --- a/kubernetes/aai/templates/data-router-deployment.yaml +++ b/kubernetes/aai/templates/data-router-deployment.yaml @@ -1,20 +1,58 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#{{ if not .Values.disableAaiDataRouter }} apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: data-router - namespace: "{{ .Values.nsPrefix }}-aai" + name: aai-data-router + namespace: "{{ .Values.nsPrefix }}" spec: + replicas: {{ .Values.dataRouterReplicas }} selector: matchLabels: - app: data-router + app: aai-data-router template: metadata: labels: - app: data-router - name: data-router + app: aai-data-router + name: aai-data-router spec: + initContainers: + - command: + - /bin/sh + - -c + - | + mkdir -p /logroot/data-router/logs + chmod -R 777 /logroot/data-router/logs + chown -R root:root /logroot + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + securityContext: + privileged: true + image: {{ .Values.image.es_bb }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: init-sysctl + volumeMounts: + - name: aai-data-router-logs + mountPath: /logroot/ containers: - - name: data-router + - name: aai-data-router image: "{{ .Values.image.dataRouterImage }}:{{ .Values.image.dataRouterVersion }}" imagePullPolicy: {{ .Values.pullPolicy }} env: @@ -33,12 +71,34 @@ spec: - name: JAVA_HOME value: usr/lib/jvm/java-8-openjdk-amd64 volumeMounts: - - mountPath: /opt/app/data-router/config/ - name: data-router-config - - mountPath: /opt/app/data-router/dynamic/ - name: data-router-dynamic + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /opt/app/data-router/config/model/aai_oxm_v8.xml + subPath: aai_oxm_v8.xml + name: aai-data-router-model-v8 + - mountPath: /opt/app/data-router/config/model/aai_oxm_v9.xml + subPath: aai_oxm_v9.xml + name: aai-data-router-model-v9 + - mountPath: /opt/app/data-router/config/model/aai_oxm_v10.xml + subPath: aai_oxm_v10.xml + name: aai-data-router-model-v10 + - mountPath: /opt/app/data-router/config/model/aai_oxm_v11.xml + subPath: aai_oxm_v11.xml + name: aai-data-router-model-v11 + - mountPath: /opt/app/data-router/config/auth + name: aai-data-router-auth + - mountPath: /opt/app/data-router/config/data-router.properties + name: aai-data-router-properties + subPath: data-router.properties + - mountPath: /opt/app/data-router/dynamic/routes/entity-event.route + subPath: entity-event.route + name: aai-data-router-dynamic-route + - mountPath: /opt/app/data-router/dynamic/conf/entity-event-policy.xml + subPath: entity-event-policy.xml + name: aai-data-router-dynamic-policy - mountPath: /logs/ - name: data-router-logs + name: aai-data-router-logs ports: - containerPort: 9502 readinessProbe: @@ -47,15 +107,37 @@ spec: initialDelaySeconds: 5 periodSeconds: 10 volumes: - - name: data-router-config - hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/data-router/appconfig/" - - name: data-router-dynamic + - name: localtime hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/data-router/dynamic/" - - name: data-router-logs + path: /etc/localtime + - name: aai-data-router-model-v8 + configMap: + name: aai-data-router-model-v8-configmap + - name: aai-data-router-model-v9 + configMap: + name: aai-data-router-model-v9-configmap + - name: aai-data-router-model-v10 + configMap: + name: aai-data-router-model-v10-configmap + - name: aai-data-router-model-v11 + configMap: + name: aai-data-router-model-v11-configmap + - name: aai-data-router-auth + secret: + secretName: aai-data-router-secret + - name: aai-data-router-properties + configMap: + name: aai-data-router-prop-configmap + - name: aai-data-router-dynamic-route + configMap: + name: aai-data-router-dynamic-configmap + - name: aai-data-router-dynamic-policy + configMap: + name: aai-data-router-dynamic-configmap + - name: aai-data-router-logs hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/data-router/logs/" + path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/data-router/logs" restartPolicy: Always imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" +#{{ end }}