X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fdcaegen2%2Fcharts%2Fdcae-servicechange-handler%2Fcharts%2Fdcae-inventory-api%2Ftemplates%2Fdeployment.yaml;h=28eeae23a1c9fb5e85d7008977f6b010bb7d1aef;hb=a4535c94d838cd0d784fd14ff8497be878c81176;hp=e49be94a791af7acdbb90beec0bac93bc6ddd511;hpb=32cd72c61b0b33613f8ed6f15af7b83146e5727d;p=oom.git diff --git a/kubernetes/dcaegen2/charts/dcae-servicechange-handler/charts/dcae-inventory-api/templates/deployment.yaml b/kubernetes/dcaegen2/charts/dcae-servicechange-handler/charts/dcae-inventory-api/templates/deployment.yaml index e49be94a79..28eeae23a1 100644 --- a/kubernetes/dcaegen2/charts/dcae-servicechange-handler/charts/dcae-inventory-api/templates/deployment.yaml +++ b/kubernetes/dcaegen2/charts/dcae-servicechange-handler/charts/dcae-inventory-api/templates/deployment.yaml @@ -50,15 +50,30 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.namespace + - name: init-tls + env: + - name: POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + image: {{ .Values.global.tlsRepository }}/{{ .Values.global.tlsImage }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + resources: {} + volumeMounts: + - mountPath: /opt/tls/shared + name: tls-info containers: - name: {{ include "common.name" . }} - image: "{{ include "common.repository" . }}/{{ .Values.image }}:{{ .Values.image_version }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - command: ["java"] + # Assumes that the Docker image is built with ENTRYPOINT set to + # ["java", "-jar", "/opt/inventory-api-x.y.z.jar", "server"] + # where "x.y.z" is the version number (matches the Docker image version number) + # The arg below adds a parameter, the path to a config file. + # This tells the inventory-api app to get its configuration from the file + # rather than querying Consul. args: - - "-jar" - - "/opt/inventory-api-{{ .Values.image_version }}.jar" - - "server" - "/opt/config.json" resources: {{ include "common.resources" . | indent 12 }} @@ -77,12 +92,15 @@ spec: httpGet: path: {{ .Values.readiness.path }} port: {{ .Values.service.internalPort }} + scheme: {{ .Values.readiness.scheme }} initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} volumeMounts: - name: {{ include "common.fullname" . }}-inv-config mountPath: /opt/config.json subPath: config.json + - mountPath: /opt/cert/ + name: tls-info env: - name: CONSUL_HOST value: consul.{{ include "common.namespace" . }} @@ -90,5 +108,7 @@ spec: - name: {{ include "common.fullname" . }}-inv-config configMap: name: {{ include "common.fullname" . }}-configmap + - emptyDir: {} + name: tls-info imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key"