forked from openshift/hive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
statefulset.yaml
85 lines (85 loc) · 2.18 KB
/
statefulset.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: hive-clustersync
namespace: hive
labels:
control-plane: clustersync
controller-tools.k8s.io: "1.0"
spec:
selector:
matchLabels:
control-plane: clustersync
controller-tools.k8s.io: "1.0"
template:
metadata:
labels:
control-plane: clustersync
controller-tools.k8s.io: "1.0"
spec:
topologySpreadConstraints: # this forces the clustersync pods to be on separate nodes.
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
control-plane: clustersync
controller-tools.k8s.io: "1.0"
serviceAccount: hive-controllers
serviceAccountName: hive-controllers
containers:
- name: clustersync
resources:
requests:
cpu: 50m
memory: 512Mi
command:
- "/opt/services/manager"
args:
- "--controllers"
- "clustersync"
envFrom:
- configMapRef:
name: hive-controllers-config
env:
- name: HIVE_NS
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: HIVE_CLUSTERSYNC_POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: HIVE_SKIP_LEADER_ELECTION
value: "true"
- name: TMPDIR
value: /tmp
volumeMounts:
- name: tmp
mountPath: /tmp
securityContext:
privileged: false
readOnlyRootFilesystem: true
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: 8080
scheme: HTTP
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
failureThreshold: 3
httpGet:
path: /readyz
port: 8080
scheme: HTTP
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
volumes:
- name: tmp
emptyDir: {}