blob: 344548940a390288c4e0d1d25e5168b6a4e609e3 [file] [log] [blame]
Bin Yangf28d0b12019-05-07 01:27:31 +00001{{/*
2# Copyright (c) 2019, CMCC Technologies Co., Ltd.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15*/}}
16
kwasield74d38f2020-07-23 10:09:57 +000017apiVersion: apps/v1
Bin Yangf28d0b12019-05-07 01:27:31 +000018kind: Deployment
Andreas Geissler718fb742023-03-09 09:44:02 +010019metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
Bin Yangf28d0b12019-05-07 01:27:31 +000020spec:
Andreas Geissler718fb742023-03-09 09:44:02 +010021 selector: {{- include "common.selectors" . | nindent 4 }}
Bin Yangf28d0b12019-05-07 01:27:31 +000022 replicas: {{ .Values.replicaCount }}
Bin Yangf28d0b12019-05-07 01:27:31 +000023 template:
Andreas Geissler718fb742023-03-09 09:44:02 +010024 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
Bin Yangf28d0b12019-05-07 01:27:31 +000025 spec:
Andreas Geissler718fb742023-03-09 09:44:02 +010026 containers:
27 - env:
28 - name: MSB_PROTO
29 value: "http"
30 - name: MSB_ADDR
31 value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
32 - name: MSB_PORT
33 value: "{{ .Values.config.msbPort }}"
34 - name: AAI_ADDR
35 value: "aai.{{ include "common.namespace" . }}"
36 - name: AAI_PORT
37 value: "{{ .Values.config.aai.aaiPort }}"
38 - name: AAI_SCHEMA_VERSION
39 value: "{{ .Values.config.aai.schemaVersion }}"
40 - name: AAI_USERNAME
41 value: "{{ .Values.config.aai.username }}"
42 - name: AAI_PASSWORD
43 value: "{{ .Values.config.aai.password }}"
44 - name: SSL_ENABLED
45 value: "false"
46 name: {{ include "common.name" . }}
47 volumeMounts:
48 - mountPath: "{{ .Values.log.path }}"
49 name: fcaps-log
50 - mountPath: /opt/fcaps/fcaps/pub/config/log.yml
51 name: fcaps-logconfig
52 subPath: log.yml
53 resources: {{ include "common.resources" . | nindent 10 }}
54 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
55 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
56 ports: {{ include "common.containerPorts" . | nindent 10 }}
57 # disable liveness probe when breakpoints set in debugger
58 # so K8s doesn't restart unresponsive container
59 {{ if .Values.liveness.enabled }}
60 livenessProbe:
61 httpGet:
62 path: /api/multicloud-fcaps/v1/healthcheck
63 port: {{ .Values.service.internalPort }}
64 scheme: HTTP
65 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
66 periodSeconds: {{ .Values.liveness.periodSeconds }}
67 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
68 successThreshold: {{ .Values.liveness.successThreshold }}
69 failureThreshold: {{ .Values.liveness.failureThreshold }}
70 {{ end }}
71 # side car containers
72 {{ include "common.log.sidecar" . | nindent 6 }}
73 - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.rabbitmq }}
74 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
75 name: rabbit-mq
76 - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.memcached }}
77 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
78 name: memcached
79 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
80 volumes:
81 - name: fcaps-log
82 emptyDir: {}
83 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 6 }}
84 - name: fcaps-logconfig
85 configMap:
86 name: {{ include "common.fullname" . }}-log-configmap
87 imagePullSecrets:
88 - name: "{{ include "common.namespace" . }}-docker-registry-key"
89 restartPolicy: Always