-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
✨ Expose CRDInstallOptions via envtest.Environment #544
✨ Expose CRDInstallOptions via envtest.Environment #544
Conversation
f18db79
to
f339933
Compare
/assign @DirectXMan12 |
pkg/envtest/server.go
Outdated
// If both this field and Paths field in CRDInstallOptions are specified, this | ||
// value this ignored. | ||
// | ||
// Deprecated: Use CRDInstallOptions |
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.
let's not deprecate these -- they're way more convenient when constructing the object directly -- constructing embedded objects is a pain.
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.
Sounds reasonable.
pkg/envtest/server.go
Outdated
te.CRDInstallOptions.CRDs = te.CRDs | ||
} | ||
if len(te.CRDInstallOptions.Paths) == 0 { | ||
te.CRDInstallOptions.Paths = te.CRDDirectoryPaths |
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't we just append 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.
Sure, will do. Do we need to filter out "duplicate" paths and CRDs though? In case the same values are passed both directly and via CRDInstallOptions
?
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.
yeah, probably.
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.
Just to clarify, "duplicate" CRDs mean they contain the same name right? I don't have to DeepEqual or anything on those CRD objects?
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.
identical name is sufficient. Duplicate name with different contents is an error, so we don't need to try and support that.
f339933
to
fd5c30a
Compare
This change provides better control for installing CRDs in `envtest`. Addresses kubernetes-sigs#541
fd5c30a
to
c6bbb02
Compare
/ok-to-test |
let's see if we can re-trigger the tests /retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DirectXMan12, rajathagasthya The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Update book README, fix a typo and formatting
This change provides better control for installing CRDs in
envtest
.Fixes #541