Commit f8181987 authored by 吕振江's avatar 吕振江

modified: statefulset.yaml

parent 1ad354a3
apiVersion: apps/v1beta1
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ template "hbase.fullname" . }}-master
......@@ -11,6 +11,11 @@ metadata:
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:
......@@ -19,7 +24,8 @@ spec:
component: hbase-master
spec:
affinity:
requiredDuringSchedulingIgnoredDuringExecution:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels:
......@@ -54,4 +60,4 @@ spec:
volumes:
- name: hbase-config
configMap:
name: hbase-configmap
\ No newline at end of file
name: hbase-configmap
apiVersion: apps/v1beta1
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ template "hbase.name" . }}-rs
......@@ -11,6 +11,11 @@ metadata:
spec:
serviceName: {{ template "hbase.name" . }}-rs
replicas: {{ .Values.hdfs.dataNode.replicas }}
selector:
matchLabels:
app: {{ template "hbase.name" . }}
release: {{ .Release.Name }}
component: hbase-rs
template:
metadata:
labels:
......@@ -19,7 +24,8 @@ spec:
component: hbase-rs
spec:
affinity:
requiredDuringSchedulingIgnoredDuringExecution:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels:
......@@ -54,4 +60,4 @@ spec:
volumes:
- name: hbase-config
configMap:
name: hbase-configmap
\ No newline at end of file
name: hbase-configmap
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment