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: serviceAccountName: {{ include "hive-metastore.name" . }} containers: - name: {{ .Chart.Name }} image: "{{.Values.image.name}}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} resources: {{ toYaml .Values.resources | nindent 12 }} command: ["/opt/hive-metastore/bin/entrypoint.sh"] env: {{- range $key, $value := .Values.env }} - name: {{ $key }} value: "{{ $value }}" {{- end }} {{- include "hive-metastore.secret-env-variables" . | nindent 10 }} 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 }}