blob: f1c024bc4eef46b117cb989aa492efbf8017bbb6 [file] [log] [blame]
mmis95971132018-07-17 00:13:13 +01001# ============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
19apiVersion: apps/v1beta1
20kind: StatefulSet
21metadata:
22 name: {{ include "common.fullname" . }}
23 namespace: {{ include "common.namespace" . }}
24 labels:
25 app: {{ include "common.name" . }}
26 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27 release: {{ .Release.Name }}
28 heritage: {{ .Release.Service }}
29spec:
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" . }}
39 release: {{ .Release.Name }}
40 spec:
41 containers:
42 - name: {{ include "common.name" . }}
43 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
44 command:
a.sreekumar7f4efaf2019-04-16 16:24:01 +000045 - /opt/app/policy/apex-pdp/bin/apexOnapPf.sh
mmis95971132018-07-17 00:13:13 +010046 - -c
a.sreekumar7f4efaf2019-04-16 16:24:01 +000047 - /home/apexuser/config/OnapPfConfig.json
48 - -p
49 - /home/apexuser/config/topic.properties
mmis95971132018-07-17 00:13:13 +010050 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 ports:
52 - containerPort: {{ .Values.service.externalPort }}
53 {{- if eq .Values.liveness.enabled true }}
54 livenessProbe:
55 tcpSocket:
56 port: {{ .Values.service.externalPort }}
57 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
58 periodSeconds: {{ .Values.liveness.periodSeconds }}
59 {{- end }}
60 readinessProbe:
61 tcpSocket:
62 port: {{ .Values.service.externalPort }}
63 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
64 periodSeconds: {{ .Values.readiness.periodSeconds }}
65 env:
66 - name: REPLICAS
67 value: "{{ .Values.replicaCount }}"
68 volumeMounts:
69 - mountPath: /etc/localtime
70 name: localtime
71 readOnly: true
72 - mountPath: /var/log/onap
73 name: policy-logs
mmis0d92fb72018-09-19 12:44:35 +010074 - mountPath: /home/apexuser/config
mmis95971132018-07-17 00:13:13 +010075 name: apexconfig
mmis95971132018-07-17 00:13:13 +010076 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +000077{{ include "common.resources" . | indent 12 }}
mmis95971132018-07-17 00:13:13 +010078 {{- if .Values.nodeSelector }}
79 nodeSelector:
80{{ toYaml .Values.nodeSelector | indent 10 }}
81 {{- end -}}
82 {{- if .Values.affinity }}
83 affinity:
84{{ toYaml .Values.affinity | indent 10 }}
85 {{- end }}
86 volumes:
87 - name: localtime
88 hostPath:
89 path: /etc/localtime
90 - name: policy-logs
91 emptyDir: {}
92 - name: apexconfig
93 configMap:
94 name: {{ include "common.fullname" . }}-configmap
mmis0d92fb72018-09-19 12:44:35 +010095 defaultMode: 0755
mmis95971132018-07-17 00:13:13 +010096 imagePullSecrets:
97 - name: "{{ include "common.namespace" . }}-docker-registry-key"