Add validation and flag to support multi container#7167
Add validation and flag to support multi container#7167knative-prow-robot merged 7 commits intoknative:masterfrom
Conversation
knative-prow-robot
left a comment
There was a problem hiding this comment.
@savitaashture: 5 warnings.
Details
In response to this:
Proposed Changes
- Divided PR to multiple parts in order to cover all the functionality with sub PR's
Part1:
- Add flag
enable-multi-containerin order to allow multi container support
default value is false- Add validation check to support multi container
- Add default values to support multi container
Release Note
None/assign @mattmoor @dprotaso @markusthoemmes
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
mattmoor
left a comment
There was a problem hiding this comment.
Produced via:
gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)
54c97e6 to
d8c2768
Compare
d8c2768 to
35c9fb7
Compare
|
The following jobs failed:
Automatically retrying due to test flakiness... |
I must have missed this because the MD link checked is dying here: knative/serving#7167
I must have missed this because the MD link checked is dying here: knative/serving#7167
I must have missed this because the MD link checked is dying here: knative/serving#7167
I must have missed this because the MD link checked is dying here: knative/serving#7167
vagababov
left a comment
There was a problem hiding this comment.
Mostly nits from me.
Generally looks good.
Thanks a lot!
| nc := defaultConfig() | ||
|
|
||
| // Process bool field. | ||
| nc.EnableMultiContainer = strings.EqualFold(data["enable-multi-container"], "true") |
There was a problem hiding this comment.
nit: If we ever change the default for this property to true this will override it to false if the property is not set in a defaults config map
not important now
There was a problem hiding this comment.
I think that's WAI? Alpha=Opt-In, Beta=Opt-Out, GA=remove the option.
There was a problem hiding this comment.
Alpha=Opt-In, Beta=Opt-Out, GA=remove the option.
Yeah but data["enable-multi-container"] will return an empty string - so there's an explicit change that'll be needed when we swap from alpha to beta
not something that's necessary right now
There was a problem hiding this comment.
Yeah for beta this will require explicit code change, but I think that's by design, no? :)
There was a problem hiding this comment.
yeah - that's why I just marked it a nit
a4e34e1 to
04f589b
Compare
markusthoemmes
left a comment
There was a problem hiding this comment.
A few nits. I think it might've been worthwhile to even break the flag handling out into its own PR. Not strictly necessary to do that now though.
vagababov
left a comment
There was a problem hiding this comment.
/lgtm
But I'll let Dave or Matt do the final approval (nor I can in practice 😄 )
dprotaso
left a comment
There was a problem hiding this comment.
few minor things
After this PR - I'd prioritize _conversion.go changes between v1alpha1, v1beta1 & v1 - otherwise the conversion webhook will return errors.
| } | ||
| if _, ok := container.Resources.Requests[corev1.ResourceMemory]; !ok { | ||
| if rm := cfg.Defaults.RevisionMemoryRequest; rm != nil { | ||
| container.Resources.Requests[corev1.ResourceMemory] = *rm |
There was a problem hiding this comment.
Does applying this default still make sense?
I'd think RevisionCPURequest & RevisionMemoryRequest would imply totals for all user containers combined?
Now the Pod's requests/limits are a multiple of the number of containers
There was a problem hiding this comment.
I assume each user containers also should have Resource information
|
The following is the coverage report on the affected files.
|
|
I made an issue for one more minor thing: #7241 |
|
Can we prioritize landing the conversion changes next? thanks for PR @savitaashture 🎉 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprotaso, savitaashture The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@dprotaso Sure i will send conversion changes |
Fixes:
Parts of #5822 #3384
Design Doc: https://docs.google.com/document/d/1XjIRnOGaq9UGllkZgYXQHuTQmhbECNAOk6TT6RNfJMw/edit?ts=5e25d093#
Proposed Changes
Part1:
enable-multi-containerin order to allow multi container supportdefault value is false
Release Note
/assign @mattmoor @dprotaso @markusthoemmes