File tree 4 files changed +344
-79
lines changed
platforms/kubernetes/postgres-operator
4 files changed +344
-79
lines changed Original file line number Diff line number Diff line change 99
99
enum:
100
100
- true
101
101
- false
102
+ antiaffinity:
103
+ type: object
104
+ x-kubernetes-preserve-unknown-fields: true
105
+ properties:
106
+ policy:
107
+ type: string
108
+ enum:
109
+ - 'preferred'
110
+ - 'required'
111
+ podAntiAffinityTerm:
112
+ type: string
113
+ enum:
114
+ - 'none'
115
+ - 'autofailover-readwrite'
116
+ - 'autofailover-readwrite-readonly'
117
+ topologyKey:
118
+ type: string
102
119
services:
103
120
type: array
104
121
items:
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ metadata:
6
6
spec :
7
7
action : start # stop start
8
8
deletepvc : true
9
+ antiaffinity :
10
+ policy : preferred # preferred/required
11
+ podAntiAffinityTerm : autofailover-readwrite # none/autofailover-readwrite/autofailover-readwrite-readonly
12
+ topologyKey : " kubernetes.io/hostname" # when policy is required, only allow "kubernetes.io/hostname"
9
13
services :
10
14
- selector : primary # autofailover/primary/standby/readonly/standby-readonly
11
15
metadata :
31
35
podspec :
32
36
terminationGracePeriodSeconds : 60
33
37
containers :
34
- - image : radondb-postgresql:12.9 -v1.0.0
38
+ - image : radondb-postgresql:12.12 -v1.0.0
35
39
imagePullPolicy : IfNotPresent
36
40
name : postgresql # can't change the name
37
41
volumeMounts :
74
78
podspec :
75
79
terminationGracePeriodSeconds : 60
76
80
containers :
77
- - image : radondb-postgresql:12.9 -v1.0.0
81
+ - image : radondb-postgresql:12.12 -v1.0.0
78
82
imagePullPolicy : IfNotPresent
79
83
name : postgresql # can't change the name
80
84
volumeMounts :
@@ -101,7 +105,7 @@ spec:
101
105
podspec :
102
106
terminationGracePeriodSeconds : 60
103
107
containers :
104
- - image : radondb-postgresql:12.9 -v1.0.0
108
+ - image : radondb-postgresql:12.12 -v1.0.0
105
109
imagePullPolicy : IfNotPresent
106
110
name : postgresql # can't change the name
107
111
volumeMounts :
Original file line number Diff line number Diff line change 105
105
MACHINE_MODE = "machine"
106
106
K8S_MODE = "k8s"
107
107
108
+ # antiaffinity
109
+ SPEC_ANTIAFFINITY = "antiaffinity"
110
+ SPEC_ANTIAFFINITY_POLICY = "policy"
111
+ SPEC_ANTIAFFINITY_REQUIRED = "required"
112
+ SPEC_ANTIAFFINITY_PREFERRED = "preferred"
113
+ SPEC_ANTIAFFINITY_POLICY_REQUIRED = "requiredDuringSchedulingIgnoredDuringExecution"
114
+ SPEC_ANTIAFFINITY_POLICY_PREFERRED = "preferredDuringSchedulingIgnoredDuringExecution"
115
+ SPEC_ANTIAFFINITY_PODANTIAFFINITYTERM = "podAntiAffinityTerm"
116
+ SPEC_ANTIAFFINITY_TOPOLOGYKEY = "topologyKey"
117
+
108
118
# docker-compose
109
119
DOCKER_COMPOSE_FILE = "docker-compose.yaml"
110
120
DOCKER_COMPOSE_FILE_DATA = '''
You can’t perform that action at this time.
0 commit comments