a8762291e549e18e11b018d32758b7522fbda99d
[dcaegen2/services.git] /
1 # ============LICENSE_START==========================================
2 # ===================================================================
3 #  Copyright (c) 2020 QCT
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 #============LICENSE_END============================================
17
18 apiVersion: apps/v1
19 kind: Deployment
20 metadata:
21   name: {{ include "dcae-datalake-feeder.fullname" . }}
22   namespace: {{ .Release.Namespace }}
23   labels:
24 {{ include "dcae-datalake-feeder.labels" . | indent 4 }}
25 spec:
26   hostname: dcae-datalake-feeder-feeder
27   replicas: {{ .Values.replicaCount }}
28   selector:
29     matchLabels:
30       app.kubernetes.io/name: {{ include "dcae-datalake-feeder.name" . }}
31       app.kubernetes.io/instance: {{ .Release.Name }}
32   template:
33     metadata:
34       labels:
35         app.kubernetes.io/name: {{ include "dcae-datalake-feeder.name" . }}
36         app.kubernetes.io/instance: {{ .Release.Name }}
37     spec:
38     {{- with .Values.imagePullSecrets }}
39       imagePullSecrets:
40         {{- toYaml . | nindent 8 }}
41     {{- end }}
42       containers:
43         - name: {{ .Chart.Name }}
44           image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
45           imagePullPolicy: {{ .Values.image.pullPolicy }}
46           env:
47           - name: HOSTNAME
48             value: k8s-datalake
49           - name: CONSUL_HOST
50             value: consul
51           - name: CONFIG_BINDING_SERVICE
52             value: config-binding-service      
53           ports:
54             - name: http
55               containerPort: 1680
56               protocol: TCP
57           livenessProbe:
58             httpGet:
59               path: /
60               port: http
61           resources:
62             {{- toYaml .Values.resources | nindent 12 }}
63           volumeMounts:
64             - name: config-volume
65               mountPath: /etc/datalake
66       volumes:
67         - name: config-volume
68           configMap:
69             name: {{ .Release.Name }}-dcae-datalake-feeder-configmap
70       {{- with .Values.nodeSelector }}
71       nodeSelector:
72         {{- toYaml . | nindent 8 }}
73       {{- end }}
74     {{- with .Values.affinity }}
75       affinity:
76         {{- toYaml . | nindent 8 }}
77     {{- end }}
78     {{- with .Values.tolerations }}
79       tolerations:
80         {{- toYaml . | nindent 8 }}
81     {{- end }}