File tree 3 files changed +11
-0
lines changed
platforms/kubernetes/postgres-operator
3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 47
47
- enable_seqscan=on
48
48
podspec :
49
49
terminationGracePeriodSeconds : 60
50
+ # priorityClassName: high-priority
50
51
containers :
51
52
- image : radondb-postgresql:12.12-v1.0.0
52
53
imagePullPolicy : IfNotPresent
Original file line number Diff line number Diff line change 121
121
SPEC_ANTIAFFINITY_PODANTIAFFINITYTERM = "podAntiAffinityTerm"
122
122
SPEC_ANTIAFFINITY_TOPOLOGYKEY = "topologyKey"
123
123
124
+ # pod PriorityClass
125
+ SPEC_POD_PRIORITY_CLASS = "priorityClassName"
126
+ SPEC_POD_PRIORITY_CLASS_SCOPE_NODE = "system-node-critical"
127
+ SPEC_POD_PRIORITY_CLASS_SCOPE_CLUSTER = "system-cluster-critical"
128
+
124
129
# time
125
130
SECONDS = 1
126
131
MINUTES = SECONDS * 60
Original file line number Diff line number Diff line change 137
137
MINUTES ,
138
138
HOURS ,
139
139
DAYS ,
140
+ SPEC_POD_PRIORITY_CLASS ,
141
+ SPEC_POD_PRIORITY_CLASS_SCOPE_NODE ,
142
+ SPEC_POD_PRIORITY_CLASS_SCOPE_CLUSTER ,
140
143
)
141
144
142
145
PRIMARY_FORMATION = " --formation primary "
@@ -619,6 +622,8 @@ def create_statefulset(
619
622
"serviceName" ] = statefulset_name_get_service_name (name )
620
623
podspec = podspec_need_copy .copy ()
621
624
podspec ["restartPolicy" ] = "Always"
625
+ podspec .setdefault (SPEC_POD_PRIORITY_CLASS ,
626
+ SPEC_POD_PRIORITY_CLASS_SCOPE_CLUSTER )
622
627
antiaffinity = antiaffinity_need_copy .copy ()
623
628
is_required = antiaffinity [
624
629
SPEC_ANTIAFFINITY_POLICY ] == SPEC_ANTIAFFINITY_REQUIRED
You can’t perform that action at this time.
0 commit comments