X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fsdnc%2Fcomponents%2Fdmaap-listener%2Ftemplates%2Fdeployment.yaml;h=d8f1afd7c33b7d66b706d081ba1ebbe623127f78;hb=bd0d31acc349a67c01de0595d152b8448b5311d1;hp=c2d69a1aac93f5c2915fd408eee74e5b38c8ee9c;hpb=ee3bc7e90b6f08a99be2e35ef6db4d7204c659ae;p=oom.git diff --git a/kubernetes/sdnc/components/dmaap-listener/templates/deployment.yaml b/kubernetes/sdnc/components/dmaap-listener/templates/deployment.yaml index c2d69a1aac..d8f1afd7c3 100644 --- a/kubernetes/sdnc/components/dmaap-listener/templates/deployment.yaml +++ b/kubernetes/sdnc/components/dmaap-listener/templates/deployment.yaml @@ -18,9 +18,6 @@ apiVersion: apps/v1 kind: Deployment metadata: {{- include "common.resourceMetadata" . | nindent 2 }} spec: - selector: - matchLabels: - app: {{ include "common.name" . }} replicas: {{ .Values.replicaCount }} selector: {{- include "common.selectors" . | nindent 4 }} template: @@ -46,15 +43,15 @@ spec: name: config-input - mountPath: /config name: properties - image: "{{ .Values.global.envsubstImage }}" + image: {{ include "repositoryGenerator.image.envsubst" . }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: {{ include "common.name" . }}-update-config - command: - - /root/ready.py + - /app/ready.py args: - - --container-name - - {{ include "common.mariadbService" . }} + - --app-name + - {{ include "common.mariadbAppName" . }} - --container-name - {{ .Values.config.sdncChartName }} - --container-name @@ -65,20 +62,29 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.namespace - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + image: {{ include "repositoryGenerator.image.readiness" . }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: {{ include "common.name" . }}-readiness + resources: + limits: + cpu: "100m" + memory: "500Mi" + requests: + cpu: "3m" + memory: "20Mi" containers: - command: - /opt/onap/sdnc/dmaap-listener/bin/start-dmaap-listener.sh name: {{ include "common.name" . }} - image: "{{ include "common.repository" . }}/{{ .Values.image }}" + image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - name: PROPERTY_DIR value: "{{ .Values.config.configDir }}" - name: SDNC_CONFIG_DIR value: "{{ .Values.config.configDir }}" + - name: LOG4J_FORMAT_MSG_NO_LOOKUPS + value: "true" volumeMounts: - mountPath: /etc/localtime name: localtime @@ -104,17 +110,18 @@ spec: - mountPath: {{ .Values.config.configDir }}/dmaap-consumer-oofpcipoc.properties name: properties subPath: dmaap-consumer-oofpcipoc.properties - resources: -{{ include "common.resources" . | indent 12 }} - {{- if .Values.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeSelector | indent 10 }} - {{- end -}} - {{- if .Values.affinity }} - affinity: -{{ toYaml .Values.affinity | indent 10 }} - {{- end }} - + - mountPath: {{ .Values.config.configDir }}/dmaap-consumer-RANSlice.properties + name: properties + subPath: dmaap-consumer-RANSlice.properties + resources: {{ include "common.resources" . | nindent 10 }} + ports: {{ include "common.containerPorts" . | nindent 10 }} + {{- if .Values.nodeSelector }} + nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }} + {{- end }} + {{- if .Values.affinity }} + affinity: {{ toYaml .Values.affinity | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} volumes: - name: localtime hostPath: @@ -126,5 +133,4 @@ spec: - name: properties emptyDir: medium: Memory - imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key" + {{- include "common.imagePullSecrets" . | nindent 6 }}