[COMMON] Fix resources indent
[oom.git] / kubernetes / multicloud / components / multicloud-fcaps / templates / deployment.yaml
index f71255b..7a19fcf 100644 (file)
@@ -41,15 +41,15 @@ spec:
      containers:
      - env:
        - name: MSB_PROTO
-         value: {{ .Values.config.msbprotocol }}
+         value: "{{ if (include "common.needTLS" .) }}https{{ else }}http{{ end }}"
        - name: MSB_ADDR
          value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
        - name: MSB_PORT
-         value: "{{ .Values.config.msbPort }}"
+         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,7 +57,7 @@ spec:
        - name: AAI_PASSWORD
          value: "{{ .Values.config.aai.password }}"
        - name: SSL_ENABLED
-         value: "{{ .Values.config.ssl_enabled }}"
+         value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }}"
        name: {{ include "common.name" . }}
        volumeMounts:
        - mountPath: "{{ .Values.log.path }}"
@@ -65,8 +65,7 @@ spec:
        - mountPath: /opt/fcaps/fcaps/pub/config/log.yml
          name: fcaps-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:
@@ -78,7 +77,7 @@ spec:
          httpGet:
            path: /api/multicloud-fcaps/v1/healthcheck
            port: {{ .Values.service.internalPort }}
-           scheme: HTTPS
+           scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
          periodSeconds: {{ .Values.liveness.periodSeconds }}
          timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}