-
Notifications
You must be signed in to change notification settings - Fork 1k
Add topologySpreadConstraints configuration to pod spec. #2530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
263242a
63f8657
89e2405
8c9840c
ad4dd00
f52d9bc
a40ba6e
3a8fc1b
8a0f389
fc8d6cf
a7cc221
bb676f5
fa6dadd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,6 +111,7 @@ var OperatorConfigCRDResourceColumns = []apiextv1.CustomResourceColumnDefinition | |
|
||
var min0 = 0.0 | ||
var min1 = 1.0 | ||
var minLength1 int64 = 1 | ||
var minDisable = -1.0 | ||
|
||
// PostgresCRDResourceValidation to check applied manifest parameters | ||
|
@@ -895,6 +896,34 @@ var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{ | |
}, | ||
}, | ||
}, | ||
"topologySpreadConstraints": { | ||
Type: "array", | ||
Nullable: true, | ||
Items: &apiextv1.JSONSchemaPropsOrArray{ | ||
Schema: &apiextv1.JSONSchemaProps{ | ||
Type: "object", | ||
Properties: map[string]apiextv1.JSONSchemaProps{ | ||
"maxSkew": { | ||
Type: "integer", | ||
Format: "int32", | ||
Minimum: &min1, | ||
}, | ||
"topologyKey": { | ||
Type: "string", | ||
MinLength: &minLength1, | ||
}, | ||
"whenUnsatisfiable": { | ||
Type: "string", | ||
Enum: []apiextv1.JSON{ | ||
{Raw: []byte(`"DoNotSchedule"`)}, | ||
{Raw: []byte(`"ScheduleAnyway"`)}, | ||
}, | ||
}, | ||
}, | ||
Required: []string{"maxSkew", "topologyKey", "whenUnsatisfiable"}, | ||
}, | ||
}, | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here with the |
||
"useLoadBalancer": { | ||
Type: "boolean", | ||
Description: "deprecated", | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect that the e2e test patches the Postgresql manifest and adds topologySpreadConstraints to then check if the pods spread evenly. But you're only patching the nodes here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the e2e test.