mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 1 | # ============LICENSE_START======================================================= |
| 2 | # Copyright (C) 2018 Ericsson. All rights reserved. |
| 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 | # SPDX-License-Identifier: Apache-2.0 |
| 17 | # ============LICENSE_END========================================================= |
| 18 | |
| 19 | apiVersion: apps/v1beta1 |
| 20 | kind: StatefulSet |
| 21 | metadata: |
| 22 | name: {{ include "common.fullname" . }} |
| 23 | namespace: {{ include "common.namespace" . }} |
| 24 | labels: |
| 25 | app: {{ include "common.name" . }} |
| 26 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame^] | 27 | release: {{ include "common.release" . }} |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 28 | heritage: {{ .Release.Service }} |
| 29 | spec: |
| 30 | serviceName: {{ include "common.servicename" . }} |
| 31 | replicas: {{ .Values.replicaCount }} |
| 32 | selector: |
| 33 | matchLabels: |
| 34 | app: {{ include "common.name" . }} |
| 35 | template: |
| 36 | metadata: |
| 37 | labels: |
| 38 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame^] | 39 | release: {{ include "common.release" . }} |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 40 | spec: |
| 41 | containers: |
| 42 | - name: {{ include "common.name" . }} |
| 43 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
| 44 | command: |
a.sreekumar | 7f4efaf | 2019-04-16 16:24:01 +0000 | [diff] [blame] | 45 | - /opt/app/policy/apex-pdp/bin/apexOnapPf.sh |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 46 | - -c |
a.sreekumar | 7f4efaf | 2019-04-16 16:24:01 +0000 | [diff] [blame] | 47 | - /home/apexuser/config/OnapPfConfig.json |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 48 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 49 | ports: |
| 50 | - containerPort: {{ .Values.service.externalPort }} |
| 51 | {{- if eq .Values.liveness.enabled true }} |
| 52 | livenessProbe: |
| 53 | tcpSocket: |
| 54 | port: {{ .Values.service.externalPort }} |
| 55 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 56 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 57 | {{- end }} |
| 58 | readinessProbe: |
| 59 | tcpSocket: |
| 60 | port: {{ .Values.service.externalPort }} |
| 61 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 62 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 63 | env: |
| 64 | - name: REPLICAS |
| 65 | value: "{{ .Values.replicaCount }}" |
| 66 | volumeMounts: |
| 67 | - mountPath: /etc/localtime |
| 68 | name: localtime |
| 69 | readOnly: true |
| 70 | - mountPath: /var/log/onap |
| 71 | name: policy-logs |
mmis | 0d92fb7 | 2018-09-19 12:44:35 +0100 | [diff] [blame] | 72 | - mountPath: /home/apexuser/config |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 73 | name: apexconfig |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 74 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 75 | {{ include "common.resources" . | indent 12 }} |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 76 | {{- if .Values.nodeSelector }} |
| 77 | nodeSelector: |
| 78 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 79 | {{- end -}} |
| 80 | {{- if .Values.affinity }} |
| 81 | affinity: |
| 82 | {{ toYaml .Values.affinity | indent 10 }} |
| 83 | {{- end }} |
| 84 | volumes: |
| 85 | - name: localtime |
| 86 | hostPath: |
| 87 | path: /etc/localtime |
| 88 | - name: policy-logs |
| 89 | emptyDir: {} |
| 90 | - name: apexconfig |
| 91 | configMap: |
| 92 | name: {{ include "common.fullname" . }}-configmap |
mmis | 0d92fb7 | 2018-09-19 12:44:35 +0100 | [diff] [blame] | 93 | defaultMode: 0755 |
mmis | 9597113 | 2018-07-17 00:13:13 +0100 | [diff] [blame] | 94 | imagePullSecrets: |
| 95 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |