kj | 41ef22e | 2018-04-02 13:34:07 +0300 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright © 2017 Amdocs, Bell Canada |
Nishukumar | 376ba1e | 2018-08-03 09:17:23 +0000 | [diff] [blame] | 3 | # Modifications Copyright © 2018 AT&T |
kj | 41ef22e | 2018-04-02 13:34:07 +0300 | [diff] [blame] | 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | */}} |
| 17 | |
kwasiel | d74d38f | 2020-07-23 10:09:57 +0000 | [diff] [blame] | 18 | apiVersion: apps/v1 |
kj | 41ef22e | 2018-04-02 13:34:07 +0300 | [diff] [blame] | 19 | kind: Deployment |
Andreas Geissler | 718fb74 | 2023-03-09 09:44:02 +0100 | [diff] [blame] | 20 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
kj | 41ef22e | 2018-04-02 13:34:07 +0300 | [diff] [blame] | 21 | spec: |
Andreas Geissler | 718fb74 | 2023-03-09 09:44:02 +0100 | [diff] [blame] | 22 | selector: {{- include "common.selectors" . | nindent 4 }} |
kj | 41ef22e | 2018-04-02 13:34:07 +0300 | [diff] [blame] | 23 | replicas: {{ .Values.replicaCount }} |
kj | 41ef22e | 2018-04-02 13:34:07 +0300 | [diff] [blame] | 24 | template: |
Andreas Geissler | 718fb74 | 2023-03-09 09:44:02 +0100 | [diff] [blame] | 25 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
kj | 41ef22e | 2018-04-02 13:34:07 +0300 | [diff] [blame] | 26 | spec: |
Andreas Geissler | 718fb74 | 2023-03-09 09:44:02 +0100 | [diff] [blame] | 27 | containers: |
| 28 | - env: |
| 29 | - name: MSB_PROTO |
| 30 | value: "http" |
| 31 | - name: MSB_ADDR |
| 32 | value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}" |
| 33 | - name: MSB_PORT |
| 34 | value: "{{ .Values.config.msbPort }}" |
| 35 | - name: AAI_ADDR |
| 36 | value: "aai.{{ include "common.namespace" . }}" |
| 37 | - name: AAI_PORT |
| 38 | value: "{{ .Values.config.aai.aaiPlainPort }}" |
| 39 | - name: AAI_SCHEMA_VERSION |
| 40 | value: "{{ .Values.config.aai.schemaVersion }}" |
| 41 | - name: AAI_USERNAME |
| 42 | value: "{{ .Values.config.aai.username }}" |
| 43 | - name: AAI_PASSWORD |
| 44 | value: "{{ .Values.config.aai.password }}" |
| 45 | - name: AAI_PROTOCOL |
| 46 | value: "http" |
| 47 | - name: SSL_ENABLED |
| 48 | value: "false" |
| 49 | resources: {{ include "common.resources" . | nindent 10 }} |
| 50 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
| 51 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 52 | name: {{ include "common.name" . }} |
| 53 | volumeMounts: |
| 54 | - mountPath: "{{ .Values.log.path }}" |
| 55 | name: framework-log |
| 56 | - mountPath: /opt/multivimbroker/multivimbroker/pub/config/log.yml |
| 57 | name: framework-logconfig |
| 58 | subPath: log.yml |
| 59 | - mountPath: /opt/multivimbroker/multivimbroker/pub/config/provider-plugin.json |
| 60 | name: provider-plugin |
| 61 | subPath: provider-plugin.json |
| 62 | ports: {{ include "common.containerPorts" . | nindent 10 }} |
| 63 | # disable liveness probe when breakpoints set in debugger |
| 64 | # so K8s doesn't restart unresponsive container |
| 65 | {{- if eq .Values.liveness.enabled true }} |
| 66 | livenessProbe: |
| 67 | httpGet: |
| 68 | path: /api/multicloud/v0/swagger.json |
| 69 | port: {{ .Values.service.internalPort }} |
| 70 | scheme: "HTTP" |
| 71 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 72 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 73 | timeoutSeconds: {{ .Values.liveness.timeoutSeconds }} |
| 74 | successThreshold: {{ .Values.liveness.successThreshold }} |
| 75 | failureThreshold: {{ .Values.liveness.failureThreshold }} |
| 76 | {{ end -}} |
kj | 41ef22e | 2018-04-02 13:34:07 +0300 | [diff] [blame] | 77 | |
| 78 | # side car containers |
Andreas Geissler | 718fb74 | 2023-03-09 09:44:02 +0100 | [diff] [blame] | 79 | {{ include "common.log.sidecar" . | nindent 6 }} |
| 80 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
| 81 | volumes: |
| 82 | - name: framework-log |
| 83 | emptyDir: {} |
| 84 | - name: provider-plugin |
| 85 | configMap: |
| 86 | name: {{ include "common.fullname" . }}-provider-plugin-configmap |
| 87 | {{ include "common.log.volumes" . | nindent 6 }} |
| 88 | - name: framework-logconfig |
| 89 | configMap: |
| 90 | name: {{ include "common.fullname" . }}-log-configmap |
Andreas Geissler | bd0d31a | 2024-03-20 09:51:32 +0100 | [diff] [blame^] | 91 | {{- include "common.imagePullSecrets" . | nindent 6 }} |
Andreas Geissler | 718fb74 | 2023-03-09 09:44:02 +0100 | [diff] [blame] | 92 | restartPolicy: Always |