-
Notifications
You must be signed in to change notification settings - Fork 298
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
Keep adjusted workload resources in sync with limitRanges and runtimeClasses #653
Changes from all commits
7b7fb66
c872509
9fe203e
353eb66
c74ef81
13b1df2
465321a
f1b5e17
cd991fd
89e5eb8
754e5e4
a956f88
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 |
---|---|---|
|
@@ -58,19 +58,25 @@ type Admission struct { | |
// clusterQueue is the name of the ClusterQueue that admitted this workload. | ||
ClusterQueue ClusterQueueReference `json:"clusterQueue"` | ||
|
||
// podSetFlavors hold the admission results for each of the .spec.podSets entries. | ||
// PodSetAssignments hold the admission results for each of the .spec.podSets entries. | ||
// +listType=map | ||
// +listMapKey=name | ||
PodSetFlavors []PodSetFlavors `json:"podSetFlavors"` | ||
PodSetAssignments []PodSetAssignment `json:"podSetAssignments"` | ||
} | ||
|
||
type PodSetFlavors struct { | ||
type PodSetAssignment struct { | ||
// Name is the name of the podSet. It should match one of the names in .spec.podSets. | ||
// +kubebuilder:default=main | ||
Name string `json:"name"` | ||
|
||
// Flavors are the flavors assigned to the workload for each resource. | ||
Flavors map[corev1.ResourceName]ResourceFlavorReference `json:"flavors,omitempty"` | ||
|
||
// resourceUsage keeps track of the total resources all the pods in the podset need to run. | ||
// | ||
// Beside what is provided in podSet's specs, this calculation takes into account | ||
// the LimitRange defaults and RuntimeClass overheads at the moment of admission. | ||
ResourceUsage corev1.ResourceList `json:"resourceUsage,omitempty"` | ||
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. Can you make a PR that includes the field name changes without adding I would like to merge that before cutting the release. If this PR ends up taking longer, we can leave it to the next release. |
||
} | ||
|
||
type PodSet struct { | ||
|
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.
we are on time to change
PodSetFlavors
by something else, given that it's no longer just about flavors.Maybe
PodSetAssignments
is a bit more generic?And we could have a single list holding both the quantity and the flavor, instead of two maps. I'm not to sure about this one. How does the calculation of
workload.Info
change if we do this?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.
For the first part done.
For the second one ... , it will imply adding two addition conversion methods ... but it will look strange. Also since ResourceList is "standard", I'd say to keep it as is. (also the time that will take to re-re-work the tests might not be negligible )