-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
generate
: default CSV admissionReviewVersions
and sideEffects
#3903
generate
: default CSV admissionReviewVersions
and sideEffects
#3903
Conversation
a8ec8f1
to
65939a4
Compare
…ons and sideEffects
65939a4
to
1e8275a
Compare
/cc @varshaprasad96 |
if description.SideEffects == nil { | ||
seNone := admissionregv1.SideEffectClassNone | ||
description.SideEffects = &seNone | ||
} | ||
|
||
if serviceRef := webhook.ClientConfig.Service; serviceRef != nil { | ||
if serviceRef.Port != nil { |
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.
Can we include containerPort
too?
The reason being 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.
We shouldn't actually be defaulting this value, since a ServiceReference
already does to 443. If OLM or a validator requires this value be set, that should change instead of the SDK potentially incorrectly defaulting this value. @awgreene @kevinrizza.
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.
ContainerPort is not a required field and OLM defaults to 443 if the value is not set.
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.
/lgtm
This is actually a bugfix, not a feature, since a CSV with webhook definitions lacking these values is invalid. /remove-kind feature |
/cherry-pick v1.0.x |
@estroz: new pull request created: #4006 In response to this:
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. |
Description of the change:
Motivation for the change: a CSV is not valid if its webhook definitions do not contain admissionReviewVersions or sideEffects, each of which can be defaulted with reasonable values.
/kind feature
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments
(seechangelog/fragments/00-template.yaml
)website/content/en/docs