X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fsdnc%2Fcomponents%2Fsdnc-web%2Ftemplates%2Fdeployment.yaml;h=90632820e762dc9235fcfdf8246ef8bad68f5ea8;hb=refs%2Fheads%2Fmaster;hp=52345deed8d0df186f1617986f0a71b08e029bbe;hpb=a381595907638085ae049b37507a69b19fb58209;p=oom.git diff --git a/kubernetes/sdnc/components/sdnc-web/templates/deployment.yaml b/kubernetes/sdnc/components/sdnc-web/templates/deployment.yaml index 52345deed8..90632820e7 100644 --- a/kubernetes/sdnc/components/sdnc-web/templates/deployment.yaml +++ b/kubernetes/sdnc/components/sdnc-web/templates/deployment.yaml @@ -14,24 +14,23 @@ # limitations under the License. */}} -nclude "common.repository" . }}apiVersion: apps/v1 +apiVersion: apps/v1 kind: Deployment metadata: {{- include "common.resourceMetadata" . | nindent 2 }} spec: - serviceName: "sdnc-web" replicas: {{ .Values.replicaCount }} selector: {{- include "common.selectors" . | nindent 4 }} template: metadata: {{- include "common.templateMetadata" . | nindent 6 }} spec: - initContainers: {{ include "common.certInitializer.initContainer" . | indent 6 }} + initContainers: - name: {{ include "common.name" . }}-readiness - image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}" + image: {{ include "repositoryGenerator.image.readiness" . }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: - /app/ready.py args: - - --container-name + - --service-name - {{ .Values.config.sdncChartName }} env: - name: NAMESPACE @@ -39,10 +38,17 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.namespace + resources: + limits: + cpu: "100m" + memory: "500Mi" + requests: + cpu: "3m" + memory: "20Mi" containers: - name: {{ include "common.name" . }} - image: "{{ include "common.repository" . }}/{{ .Values.image }}" + image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: {{- include "common.containerPorts" . | indent 10 }} # disable liveness probe when breakpoints set in debugger @@ -63,36 +69,35 @@ spec: - name: WEBPROTOCOL value: {{ .Values.config.webProtocol }} - name: WEBPORT - value: {{ .Values.config.webPort | quote }} + value : {{ .Values.config.webPort | quote }} - name: SDNRPROTOCOL - value: {{ .Values.config.sdnrProtocol }} + value : {{ .Values.config.sdnrProtocol }} - name: SDNRHOST - value: {{ .Values.config.sdnrHost }}.{{ include "common.namespace" . }} + value : {{ .Values.config.sdnrHost }}.{{ include "common.namespace" . }} - name: SDNRPORT - value: {{ .Values.config.sdnrPort | quote }} - - name: SSL_CERT_DIR - value: {{ .Values.config.sslCertDir }} - - name: SSL_CERTIFICATE - value: {{ .Values.config.sslCertiticate }} - - name: SSL_CERTIFICATE_KEY - value: {{ .Values.config.sslCertKey }} - volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }} - - mountPath: /etc/localtime - name: localtime - readOnly: true - + value : {{ .Values.config.sdnrPort | quote }} + {{ if .Values.config.transportpce.enabled }} + - name: TRPCEURL + value: {{ .Values.config.transportpce.transportpceUrl }} + {{ end }} + {{ if .Values.config.topologyserver.enabled }} + - name: TOPOURL + value: {{ .Values.config.topologyserver.topologyserverUrl }} + - name: TILEURL + value: {{ .Values.config.topologyserver.tileserverUrl }} + {{ end }} + - name: ENABLE_OAUTH + value: "{{ .Values.config.oauth.enabled | default "false" }}" + - name: ENABLE_ODLUX_RBAC + value: "{{ .Values.config.oauth.odluxRbac.enabled | default "false" }}" + - name: SDNRWEBSOCKETPORT + value: "{{ .Values.sdnrWebsocketPort | default "8182" }}" resources: {{ include "common.resources" . | nindent 12 }} - {{- if .Values.nodeSelector }} - nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }} - {{- end -}} - {{- if .Values.affinity }} - affinity: -{{ toYaml .Values.affinity | indent 10 }} - {{- end }} - volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }} - - name: localtime - hostPath: - path: /etc/localtime - - imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key" + {{- 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" . )}} + {{- include "common.imagePullSecrets" . | nindent 6 }}