Jakub Latusek | d71d26c | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 2 | # ============LICENSE_START======================================================= |
| 3 | # Copyright (C) 2018 Ericsson. All rights reserved. |
jhh | d425867 | 2020-08-09 12:08:08 -0500 | [diff] [blame] | 4 | # Modifications Copyright (C) 2020 AT&T Intellectual Property. |
Sirisha_Manchikanti | b402a59 | 2022-09-09 12:01:20 +0100 | [diff] [blame] | 5 | # Modifications Copyright © 2022 Nordix Foundation |
Andreas Geissler | 5768113 | 2024-07-29 10:18:26 +0200 | [diff] [blame^] | 6 | # Modification (C) 2023-2024 Deutsche Telekom. All rights reserved. |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 7 | # ================================================================================ |
| 8 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | # you may not use this file except in compliance with the License. |
| 10 | # You may obtain a copy of the License at |
| 11 | # |
| 12 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | # |
| 14 | # Unless required by applicable law or agreed to in writing, software |
| 15 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | # See the License for the specific language governing permissions and |
| 18 | # limitations under the License. |
| 19 | # |
| 20 | # SPDX-License-Identifier: Apache-2.0 |
| 21 | # ============LICENSE_END========================================================= |
Jakub Latusek | d71d26c | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 22 | */}} |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 23 | |
Grzegorz-Lis | 4fad302 | 2020-07-31 10:18:21 +0200 | [diff] [blame] | 24 | apiVersion: apps/v1 |
saul.gill | ef208b0 | 2023-04-26 16:16:05 +0100 | [diff] [blame] | 25 | kind: Deployment |
Andreas Geissler | f10c555 | 2023-03-21 18:09:46 +0100 | [diff] [blame] | 26 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 27 | spec: |
Andreas Geissler | f10c555 | 2023-03-21 18:09:46 +0100 | [diff] [blame] | 28 | selector: {{- include "common.selectors" . | nindent 4 }} |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 29 | replicas: {{ .Values.replicaCount }} |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 30 | template: |
Andreas Geissler | f10c555 | 2023-03-21 18:09:46 +0100 | [diff] [blame] | 31 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 32 | spec: |
Andreas Geissler | 5768113 | 2024-07-29 10:18:26 +0200 | [diff] [blame^] | 33 | {{ include "common.podSecurityContext" . | indent 6 | trim }} |
Dominik Mizyn | b8c44b4 | 2020-04-21 10:48:27 +0200 | [diff] [blame] | 34 | initContainers: |
saul.gill | ef208b0 | 2023-04-26 16:16:05 +0100 | [diff] [blame] | 35 | - command: ["/bin/sh", "-cx"] |
Dominik Mizyn | b8c44b4 | 2020-04-21 10:48:27 +0200 | [diff] [blame] | 36 | args: |
saul.gill | ef208b0 | 2023-04-26 16:16:05 +0100 | [diff] [blame] | 37 | - JAASLOGIN=`echo $JAASLOGIN | tr -d '"'`; |
| 38 | cd /config-input && for PFILE in `ls -1`; |
| 39 | do envsubst <${PFILE} >/config/${PFILE}; done |
Dominik Mizyn | b8c44b4 | 2020-04-21 10:48:27 +0200 | [diff] [blame] | 40 | env: |
Dominik Mizyn | b8c44b4 | 2020-04-21 10:48:27 +0200 | [diff] [blame] | 41 | - name: RESTSERVER_USER |
| 42 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-creds" "key" "login") | indent 10 }} |
| 43 | - name: RESTSERVER_PASSWORD |
| 44 | {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-creds" "key" "password") | indent 10 }} |
Sirisha_Manchikanti | b402a59 | 2022-09-09 12:01:20 +0100 | [diff] [blame] | 45 | - name: JAASLOGIN |
saul.gill | ef208b0 | 2023-04-26 16:16:05 +0100 | [diff] [blame] | 46 | valueFrom: |
| 47 | secretKeyRef: |
| 48 | name: {{ include "common.name" . }}-ku |
| 49 | key: sasl.jaas.config |
| 50 | - name: KAFKA_URL |
rameshiyer27 | bc8a6a4 | 2024-03-11 17:18:11 +0000 | [diff] [blame] | 51 | value: {{ include "common.release" . }}-{{ .Values.global.kafkaBootstrap }} |
saul.gill | ef208b0 | 2023-04-26 16:16:05 +0100 | [diff] [blame] | 52 | - name: SASL |
| 53 | value: {{ .Values.kafkaUser.authenticationType | upper }} |
| 54 | - name: GROUP_ID |
| 55 | value: {{ .Values.config.kafka.consumer.groupId }} |
| 56 | - name: PAP_TOPIC |
| 57 | value: {{ .Values.config.app.listener.policyPdpPapTopic }} |
Dominik Mizyn | b8c44b4 | 2020-04-21 10:48:27 +0200 | [diff] [blame] | 58 | volumeMounts: |
| 59 | - mountPath: /config-input |
| 60 | name: apexconfig-input |
| 61 | - mountPath: /config |
| 62 | name: apexconfig |
Sylvain Desbureaux | 7c8c686 | 2020-11-19 18:02:37 +0100 | [diff] [blame] | 63 | image: {{ include "repositoryGenerator.image.envsubst" . }} |
Dominik Mizyn | b8c44b4 | 2020-04-21 10:48:27 +0200 | [diff] [blame] | 64 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 65 | name: {{ include "common.name" . }}-update-config |
Andreas Geissler | 5768113 | 2024-07-29 10:18:26 +0200 | [diff] [blame^] | 66 | {{ include "common.containerSecurityContext" . | indent 8 | trim }} |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 67 | containers: |
| 68 | - name: {{ include "common.name" . }} |
Andreas Geissler | 5768113 | 2024-07-29 10:18:26 +0200 | [diff] [blame^] | 69 | {{ include "common.containerSecurityContext" . | indent 10 | trim }} |
Sylvain Desbureaux | 7c8c686 | 2020-11-19 18:02:37 +0100 | [diff] [blame] | 70 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 71 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
saul.gill | ef208b0 | 2023-04-26 16:16:05 +0100 | [diff] [blame] | 72 | command: [ "/bin/sh", "-cx" ] |
| 73 | args: |
| 74 | - id apexuser; |
| 75 | cat /home/apexuser/config/OnapPfConfig.json; |
| 76 | /opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /home/apexuser/config/OnapPfConfig.json |
Andreas Geissler | f10c555 | 2023-03-21 18:09:46 +0100 | [diff] [blame] | 77 | ports: {{ include "common.containerPorts" . | nindent 12 }} |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 78 | {{- if eq .Values.liveness.enabled true }} |
| 79 | livenessProbe: |
| 80 | tcpSocket: |
Andreas Geissler | f10c555 | 2023-03-21 18:09:46 +0100 | [diff] [blame] | 81 | port: {{ .Values.service.internalPort }} |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 82 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 83 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 84 | {{- end }} |
| 85 | readinessProbe: |
| 86 | tcpSocket: |
Andreas Geissler | f10c555 | 2023-03-21 18:09:46 +0100 | [diff] [blame] | 87 | port: {{ .Values.service.internalPort }} |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 88 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 89 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 90 | env: |
| 91 | - name: REPLICAS |
| 92 | value: "{{ .Values.replicaCount }}" |
| 93 | volumeMounts: |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 94 | - mountPath: /var/log/onap |
| 95 | name: policy-logs |
mmis | 0d92fb7 | 2018-09-19 12:44:35 +0100 | [diff] [blame] | 96 | - mountPath: /home/apexuser/config |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 97 | name: apexconfig |
miroslavmasaryk | a7ac7f0 | 2023-03-01 14:12:26 +0100 | [diff] [blame] | 98 | resources: {{ include "common.resources" . | nindent 12 }} |
saul.gill | ef208b0 | 2023-04-26 16:16:05 +0100 | [diff] [blame] | 99 | {{- if .Values.nodeSelector }} |
| 100 | nodeSelector: |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 101 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 102 | {{- end -}} |
saul.gill | ef208b0 | 2023-04-26 16:16:05 +0100 | [diff] [blame] | 103 | {{- if .Values.affinity }} |
| 104 | affinity: |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 105 | {{ toYaml .Values.affinity | indent 10 }} |
| 106 | {{- end }} |
farida azmy | c117837 | 2021-04-11 12:55:33 +0200 | [diff] [blame] | 107 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 108 | volumes: |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 109 | - name: policy-logs |
Andreas Geissler | 5768113 | 2024-07-29 10:18:26 +0200 | [diff] [blame^] | 110 | emptyDir: |
| 111 | sizeLimit: {{ .Values.dirSizes.logDir.sizeLimit }} |
Dominik Mizyn | b8c44b4 | 2020-04-21 10:48:27 +0200 | [diff] [blame] | 112 | - name: apexconfig-input |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 113 | configMap: |
| 114 | name: {{ include "common.fullname" . }}-configmap |
mmis | 0d92fb7 | 2018-09-19 12:44:35 +0100 | [diff] [blame] | 115 | defaultMode: 0755 |
Dominik Mizyn | b8c44b4 | 2020-04-21 10:48:27 +0200 | [diff] [blame] | 116 | - name: apexconfig |
| 117 | emptyDir: |
| 118 | medium: Memory |
Andreas Geissler | 5768113 | 2024-07-29 10:18:26 +0200 | [diff] [blame^] | 119 | sizeLimit: 64Mi |
Andreas Geissler | bd0d31a | 2024-03-20 09:51:32 +0100 | [diff] [blame] | 120 | {{- include "common.imagePullSecrets" . | nindent 6 }} |