-
Notifications
You must be signed in to change notification settings - Fork 32
/
deployment.yaml
50 lines (50 loc) · 1.59 KB
/
deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "hive-metastore.name" . }}
labels:
{{- include "hive-metastore.labels" $ | trim | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "hive-metastore.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "hive-metastore.labels" $ | trim | nindent 8 }}
{{- include "hive-metastore.selectorLabels" . | nindent 8 }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{.Values.image.name}}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["/opt/hive-metastore/bin/entrypoint.sh"]
env:
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: "{{ $value }}"
{{- end }}
ports:
- name: tcp
containerPort: 9083
protocol: TCP
livenessProbe:
tcpSocket:
port: 9083
readinessProbe:
tcpSocket:
port: 9083
resources:
{{- toYaml .Values.resources | trim | nindent 12 }}
{{- if eq .Values.env.HIVE_DB_EXTERNAL "true" }}
volumeMounts:
- name: hive-conf-templates
mountPath: /opt/hive-metastore/conf/templates
volumes:
- name: hive-conf-templates
configMap:
name: {{ template "hive-metastore.name" . }}-conf-templates
{{- end }}