helm3 and K8 1.18 support added
[ric-plt/ric-dep.git] / helm / jaegeradapter / templates / deployment.yaml
1 #   Copyright (c) 2019 AT&T Intellectual Property.
2 #
3 #   Licensed under the Apache License, Version 2.0 (the "License");
4 #   you may not use this file except in compliance with the License.
5 #   You may obtain a copy of the License at
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #   Unless required by applicable law or agreed to in writing, software
10 #   distributed under the License is distributed on an "AS IS" BASIS,
11 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #   See the License for the specific language governing permissions and
13 #   limitations under the License.
14 {{- $imagectx := dict "ctx" . "defaultregistry" .Values.jaegeradapter.image.registry }}
15 {{- $pullpolicyctx := dict "ctx" . "defaultpullpolicy" .Values.jaegeradapter.imagePullPolicy }}
16 apiVersion: apps/v1
17 kind: Deployment
18 metadata:
19   name: {{ include "common.deploymentname.jaegeradapter" . }}
20   namespace: {{ include "common.namespace.platform" . }}
21   labels:
22     app: {{ include "common.namespace.platform" . }}-{{ include "common.name.jaegeradapter" . }}
23     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24     release: {{ .Release.Name }}
25     heritage: {{ .Release.Service }}
26 spec:
27   replicas: {{ .Values.jaegeradapter.replicaCount }}
28   selector:
29     matchLabels:
30       app: {{ include "common.namespace.platform" . }}-{{ include "common.name.jaegeradapter" . }}
31       release: {{ .Release.Name }}
32   template:
33     metadata:
34       {{- if .Values.jaegeradapter.annotations }}
35       annotations:
36         {{- .Values.jaegeradapter.annotations | nindent 8 -}}
37       {{ end }}
38       labels:
39         app: {{ include "common.namespace.platform" . }}-{{ include "common.name.jaegeradapter" . }}
40         release: {{ .Release.Name }}
41     spec:
42       hostname: {{ include "common.name.jaegeradapter" . }}
43       imagePullSecrets:
44         - name: {{ include "common.dockerregistry.credential" $imagectx }}
45       containers:
46         - name: {{ include "common.containername.jaegeradapter" . }}
47           image: {{ include "common.dockerregistry.url" $imagectx }}/{{ .Values.jaegeradapter.image.name }}:{{ .Values.jaegeradapter.image.tag }}
48           imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $pullpolicyctx }}
49           envFrom:
50             - configMapRef:
51                 name: {{ include "common.configmapname.jaegeradapter" . }}
52           ports:
53             - name: {{ include "common.portname.jaegeradapter.zipkincompact" . }} 
54               containerPort: {{ include "common.serviceport.jaegeradapter.zipkincompact" . }}
55               protocol: UDP
56             - name: {{ include "common.portname.jaegeradapter.jaegercompact" . }}  
57               containerPort: {{ include "common.serviceport.jaegeradapter.jaegercompact" . }}
58               protocol: UDP
59             - name: {{ include "common.portname.jaegeradapter.jaegerbinary" . }} 
60               containerPort: {{ include "common.serviceport.jaegeradapter.jaegerbinary" . }}
61               protocol: UDP
62             - name: {{ include "common.portname.jaegeradapter.httpquery" . }} 
63               containerPort: {{ include "common.serviceport.jaegeradapter.httpquery" . }}
64               protocol: TCP
65             - name: {{ include "common.portname.jaegeradapter.httpconfig" . }} 
66               containerPort: {{ include "common.serviceport.jaegeradapter.httpconfig" . }}
67               protocol: TCP
68             - name: {{ include "common.portname.jaegeradapter.zipkinhttp" . }} 
69               containerPort: {{ include "common.serviceport.jaegeradapter.zipkinhttp" . }}
70               protocol: TCP
71             - name: {{ include "common.portname.jaegeradapter.jaegerhttp" . }} 
72               containerPort: {{ include "common.serviceport.jaegeradapter.jaegerhttp" . }}
73               protocol: TCP
74             - name: {{ include "common.portname.jaegeradapter.jaegerhttpt" . }}
75               containerPort: {{ include "common.serviceport.jaegeradapter.jaegerhttpt" . }}
76               protocol: TCP
77           livenessProbe:
78             httpGet:
79               path: /
80               port: {{ include "common.serviceport.jaegeradapter.httpquery" . }}
81           readinessProbe:
82             httpGet:
83               path: /
84               port: {{ include "common.serviceport.jaegeradapter.httpquery" . }}
85             initialDelaySeconds: 5