Merge "[SDNC] Fix dependencies for SDNRONLY mode"
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Mon, 15 Nov 2021 16:19:43 +0000 (16:19 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 15 Nov 2021 16:19:43 +0000 (16:19 +0000)
1  2 
kubernetes/sdnc/templates/statefulset.yaml

@@@ -130,11 -130,11 +130,11 @@@ spec
          image: {{ include "repositoryGenerator.image.envsubst" . }}
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
          name: {{ include "common.name" . }}-update-config
-       {{ if .Values.dgbuilder.enabled -}}
+       {{ if or .Values.dgbuilder.enabled .Values.config.sdnr.enabled -}}
        - command:
          - /app/ready.py
          args:
-         {{ if or .Values.dgbuilder.enabled .Values.config.sdnr.enabled -}}
+         {{ if .Values.dgbuilder.enabled -}}
          - --container-name
          - {{ include "common.mariadbService" . }}
          - --job-name
              initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
              periodSeconds: {{ .Values.readiness.periodSeconds }}
            env:
+           {{ if and .Values.config.sdnr.enabled .Values.config.sdnr.sdnronly -}}
            - name: MYSQL_ROOT_PASSWORD
              {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
+           {{ end -}}
            - name: ODL_ADMIN_USERNAME
              {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
            - name: ODL_USER
              subPath: blueprints-processor-adaptor.properties
            - mountPath: {{ .Values.persistence.mdsalPath }}
              name: {{ include "common.fullname" . }}-data
 -          - mountPath: /var/log/onap
 +          - mountPath: {{ .Values.log.path }}
              name: logs
            - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
              name: properties
            {{ end }}
            resources: {{ include "common.resources" . | nindent 12 }}
          # side car containers
 -        - name: filebeat-onap
 -          image: {{ include "repositoryGenerator.image.logging" . }}
 -          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
 -          volumeMounts:
 -          - mountPath: /usr/share/filebeat/filebeat.yml
 -            name: filebeat-conf
 -            subPath: filebeat.yml
 -          - mountPath: /var/log/onap
 -            name: logs
 -          - mountPath: /usr/share/filebeat/data
 -            name: data-filebeat
 +        {{ include "common.log.sidecar" . | nindent 8 }}
        {{- if .Values.nodeSelector }}
        nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
        {{- end }}
              path: /etc/localtime
          - name: logs
            emptyDir: {}
 -        - name: data-filebeat
 -          emptyDir: {}
 -        - name: filebeat-conf
 -          configMap:
 -            name: {{ include "common.fullname" . }}-filebeat-configmap
 +        {{ include "common.log.volumes" . | nindent 8 }}
          - name: sdnc-logging-cfg-config
            configMap:
              name: {{ include "common.fullname" . }}-log-configmap