acce1325838b65ea34f05f034dc54b12d1d290a0
[it/dep.git] / ric-platform / 50-RIC-Platform / helm / appmgr / templates / deployment.yaml
1 ################################################################################
2 #   Copyright (c) 2019 AT&T Intellectual Property.                             #
3 #   Copyright (c) 2019 Nokia.                                                  #
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
18 apiVersion: apps/v1
19 kind: Deployment
20 metadata:
21   name: {{ include "common.deploymentname.appmgr" . }}
22   namespace: {{ include "common.namespace" . }}
23   labels:
24     app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
25     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
26     release: {{ .Release.Name }}
27     heritage: {{ .Release.Service }}
28 spec:
29   replicas: {{ .Values.appmgr.replicaCount }}
30   selector:
31     matchLabels:
32       app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
33       release: {{ .Release.Name }}
34   template:
35     metadata:
36       labels:
37         app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
38         release: {{ .Release.Name }}
39     spec:
40       hostname: {{ .Chart.Name }}
41       hostAliases:
42         - ip: "137.135.91.204"
43           hostnames:
44             - "snapshot.helm.ranco-dev-tools.eastus.cloudapp.azure.com"
45       imagePullSecrets:
46         - name: {{ include "common.repositoryCred" . }}
47       containers:
48         - name: {{ include "common.namespace" . }}-{{ include "common.name" . }}
49           image: {{ include "common.repository" . }}/{{ .Values.appmgr.image.name }}:{{ .Values.appmgr.image.tag }}
50           imagePullPolicy: {{ include "common.pullPolicy" . }}
51           ports:
52             - name: http
53               containerPort: {{ .Values.appmgr.containerPort }}
54               protocol: TCP
55           volumeMounts:
56             - name: config-volume
57               mountPath: {{ .Values.appmgr.appconfigpath }}/appmgr.yaml
58               subPath: appmgr.yaml
59             - name: secret-volume
60               mountPath: {{ .Values.appmgr.appsecretpath }}
61             - name: cert-volume
62               mountPath: {{ .Values.appmgr.appcertpath }}
63           envFrom:
64             - configMapRef:
65                 name: {{ include "common.configmapname.appmgr" . }}-appenv
66           livenessProbe:
67             #exec:
68             #  command:
69             #    - /bin/bash
70             #    - -c
71             #    - ps -ef | grep {{ .Values.livenessprocessname }}| grep -v "grep"
72             #initialDelaySeconds: 120
73             #periodSeconds: 30
74           readinessProbe:
75           #  httpGet:
76           #    path: /
77           #    port: http
78           restartPolicy: Always
79           securityContext:
80             # ubuntu
81             #runAsUser: 1000
82             #allowPrivilegeEscalation: false
83       volumes:
84         - name: config-volume
85           configMap:
86             name: {{ include "common.configmapname.appmgr" . }}-appconfig
87         - name: secret-volume
88           secret:
89             secretName: {{ include "common.helmrepositorycred" . }}
90         - name: cert-volume
91           configMap:
92             name: {{ include "common.helmrepositorycert" . }}