[COMMON] Fix resources indent
[oom.git] / kubernetes / multicloud / components / multicloud-vio / templates / deployment.yaml
index 5548359..d00d78b 100644 (file)
@@ -41,14 +41,16 @@ spec:
     spec:
      containers:
      - env:
+       - name: MSB_PROTO
+         value: "{{ if (include "common.needTLS" .) }}https{{ else }}http{{ end }}"
        - name: MSB_ADDR
-         value: "{{ .Values.config.msbgateway }}"
+         value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
        - name: MSB_PORT
-         value: "{{ .Values.config.msbPort }}.{{ include "common.namespace" . }}"
+         value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.msbPort }}{{ else }}{{ .Values.config.msbPlainPort }}{{ end }}"
        - name: AAI_ADDR
-         value: aai.{{ include "common.namespace" . }}
+         value: "aai.{{ include "common.namespace" . }}"
        - name: AAI_PORT
-         value: "{{ .Values.config.aai.port }}"
+         value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.aai.aaiPort }}{{ else }}{{ .Values.config.aai.aaiPlainPort }}{{ end }}"
        - name: AAI_SCHEMA_VERSION
          value: "{{ .Values.config.aai.schemaVersion }}"
        - name: AAI_USERNAME
@@ -57,13 +59,12 @@ spec:
          value: "{{ .Values.config.aai.password }}"
        name: {{ include "common.name" . }}
        volumeMounts:
-       - mountPath: /var/log/onap
+       - mountPath: "{{ .Values.log.path }}"
          name: vio-log
        - mountPath: /opt/vio/vio/pub/config/log.yml
          name: vio-logconfig
          subPath: log.yml
-       resources:
-{{ include "common.resources" . | indent 12 }}
+       resources: {{ include "common.resources" . | nindent 9 }}
        image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        ports:
@@ -83,26 +84,12 @@ spec:
          failureThreshold: {{ .Values.liveness.failureThreshold }}
        {{ end -}}
        # side car containers
-     - image: {{ include "repositoryGenerator.image.logging" . }}
-       imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-       name: filebeat-onap
-       volumeMounts:
-       - mountPath: /usr/share/filebeat/filebeat.yml
-         name: filebeat-conf
-         subPath: filebeat.yml
-       - mountPath: /var/log/onap
-         name: vio-log
-       - mountPath: /usr/share/filebeat/data
-         name: vio-data-filebeat
+     {{ include "common.log.sidecar" . | nindent 5 }}
      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
      volumes:
      - name: vio-log
        emptyDir: {}
-     - name: vio-data-filebeat
-       emptyDir: {}
-     - name: filebeat-conf
-       configMap:
-         name: multicloud-filebeat-configmap
+     {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 5 }}
      - name: vio-logconfig
        configMap:
          name: {{ include "common.fullname" . }}-log-configmap