apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ template "hbase.fullname" . }}-master labels: app: {{ template "hbase.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} component: hbase-master spec: serviceName: {{ template "hbase.fullname" . }}-master replicas: {{ .Values.hbase.hmaster.replicas }} selector: matchLabels: app: {{ template "hbase.name" . }} release: {{ .Release.Name }} component: hbase-master template: metadata: labels: app: {{ template "hbase.name" . }} release: {{ .Release.Name }} component: hbase-master spec: affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - topologyKey: "kubernetes.io/hostname" labelSelector: matchLabels: app: {{ .Values.hbase.hdfs.name }} release: {{ .Values.hbase.hdfs.release | quote }} component: hdfs-nn terminationGracePeriodSeconds: 0 containers: - name: hbase-master image: {{ .Values.hbaseImage }} imagePullPolicy: {{ .Values.imagePullPolicy }} command: - "/bin/bash" - "/tmp/hbase-config/bootstrap.sh" resources: {{ toYaml .Values.hdfs.nameNode.resources | indent 10 }} readinessProbe: httpGet: path: / port: 16010 initialDelaySeconds: 5 timeoutSeconds: 2 livenessProbe: httpGet: path: / port: 16010 initialDelaySeconds: 10 timeoutSeconds: 2 volumeMounts: - name: hbase-config mountPath: /tmp/hbase-config volumes: - name: hbase-config configMap: name: hbase-configmap