blob: 1822695eab740a2c90b65084b0a8ea2201d6f48a [file] [log] [blame]
Huang Haibin5978c462018-09-28 10:24:46 +08001{{/*
2# Copyright (c) 2018 Intel Corporation.
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
Huang Haibin5978c462018-09-28 10:24:46 +080018kind: Deployment
Andreas Geissler718fb742023-03-09 09:44:02 +010019metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
Huang Haibin5978c462018-09-28 10:24:46 +080020spec:
Andreas Geissler718fb742023-03-09 09:44:02 +010021 selector: {{- include "common.selectors" . | nindent 4 }}
Huang Haibin5978c462018-09-28 10:24:46 +080022 replicas: {{ .Values.replicaCount }}
Huang Haibin5978c462018-09-28 10:24:46 +080023 template:
Andreas Geissler718fb742023-03-09 09:44:02 +010024 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
Huang Haibin5978c462018-09-28 10:24:46 +080025 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: pike-log
50 - mountPath: /opt/pike/pike/pub/config/log.yml
51 name: pike-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 command: ["/bin/sh"]
57 args: ["-c", "/bin/sh /opt/pike/run.sh"]
58 ports: {{ include "common.containerPorts" . | nindent 10 }}
59 # disable liveness probe when breakpoints set in debugger
60 # so K8s doesn't restart unresponsive container
61 {{ if .Values.liveness.enabled }}
62 livenessProbe:
63 httpGet:
64 path: /api/multicloud-pike/v0/swagger.json
65 port: {{ .Values.service.internalPort }}
66 scheme: HTTP
67 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
68 periodSeconds: {{ .Values.liveness.periodSeconds }}
69 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
70 successThreshold: {{ .Values.liveness.successThreshold }}
71 failureThreshold: {{ .Values.liveness.failureThreshold }}
72 {{ end }}
73 # side car containers
74 {{ include "common.log.sidecar" . | nindent 6 }}
75 - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.memcached }}
76 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
77 name: memcached
78 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
79 volumes:
80 - name: pike-log
81 emptyDir: {}
82 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
83 - name: pike-logconfig
84 configMap:
85 name: {{ include "common.fullname" . }}-log-configmap
Andreas Geisslerbd0d31a2024-03-20 09:51:32 +010086 {{- include "common.imagePullSecrets" . | nindent 6 }}
Andreas Geissler718fb742023-03-09 09:44:02 +010087 restartPolicy: Always