-
Notifications
You must be signed in to change notification settings - Fork 254
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
🌱 Replace uses of kubectl and cmctl binaries in e2e #1440
🌱 Replace uses of kubectl and cmctl binaries in e2e #1440
Conversation
c5f3a3a
to
fd6eed1
Compare
/test-centos-e2e-integration-main |
fd6eed1
to
bc4ebaf
Compare
/test-centos-e2e-integration-main |
bc4ebaf
to
bf0a5e2
Compare
/test-centos-e2e-integration-main |
553ac04
to
82a585e
Compare
/test-centos-e2e-integration-main |
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.
Great job! Just some minor comments
@@ -3,6 +3,7 @@ module github.com/metal3-io/baremetal-operator/test | |||
go 1.20 | |||
|
|||
require ( | |||
github.com/cert-manager/cert-manager v1.10.0 |
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.
The version seems strange considering that we have v1.13 in the e2e config.
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.
Yes. Basically using newer versions would trigger upgrades in many of the dependencies, which'd make everything a mess :-s 1.10 is the newest one I could find that didn't trigger too many breaks.
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.
Ok I see. We can take this for now probably, but at some point we will need to bump it
manifest, err := buildKustomizeManifest(kustomization) | ||
Expect(err).NotTo(HaveOccurred()) | ||
err = clusterProxy.Apply(ctx, manifest) | ||
Expect(err).NotTo(HaveOccurred()) |
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.
Nice!
test/e2e/e2e_suite_test.go
Outdated
Eventually(func() bool { | ||
err := checkCertManagerWebhook(ctx, clusterProxy) | ||
return err == nil | ||
}, e2eConfig.GetIntervals("default", "wait-available")...).Should(BeTrue()) |
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 may be missing something, but is it not possible to just return the error directly and way for Succeed
instead?
Eventually(func() bool { | |
err := checkCertManagerWebhook(ctx, clusterProxy) | |
return err == nil | |
}, e2eConfig.GetIntervals("default", "wait-available")...).Should(BeTrue()) | |
Eventually(func() err { | |
return checkCertManagerWebhook(ctx, clusterProxy) | |
}, e2eConfig.GetIntervals("default", "wait-available")...).Should(Succeed()) |
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.
Thanks a lot! That's the way to go 😅 I'm still pretty not familiar yet with Ginkgo. Initially I waited for BeNil()
, thinking because the function returns an error. It always timed out 😅
This is the test to trigger for e2e. The other tests are not relevant 😅 |
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
Thanks. It seems that |
82a585e
to
a5d2b08
Compare
/metal3-bmo-e2e-test |
126a20a
to
2aa51bc
Compare
Any idea why? |
It's because CAPI test framework I can make a separate apply function to get rid of the |
I see! It is fine like this I would say. No need to make it unnecessarily complicated 🙂 |
@@ -27,6 +27,7 @@ variables: | |||
BOOT_MAC_ADDRESS: "00:60:2f:31:81:01" | |||
IMAGE_URL: "http://192.168.222.1/cirros-0.6.2-x86_64-disk.img" | |||
IMAGE_CHECKSUM: "c8fc807773e5354afe61636071771906" | |||
CERT_MANAGER_VERSION: "v1.13.0" |
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.
This needs to be added in fixture.yaml
also!
(We will have automated tests to check the fixture tests when #1437 is merged.)
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.
Done.
2aa51bc
to
63a8382
Compare
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
/metal3-bmo-e2e-test |
/test-centos-e2e-integration-main |
@Rozzii: adding LGTM is restricted to approvers and reviewers in OWNERS files. 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. |
/cc @honza |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kashifest, Rozzii 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 |
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #1373
I chose different implementations from what was suggested in #1373:
Instead of usingkrusty
package, I copied the kustomize build workflow used by capi. This is only for simplicity, and to be aligned with CAPI. Thekrusty
package seemed to be not too complicated, but imo the simplier, the better.Changed (back) to
krusty
after discussion with @lentzi90.cert-manager
workflow from CAPI takes into control many of CAPI internal data structures, therefore is not easy to replicate. For our usecase, I think simply download the cert-manager manifests, apply andwait for all deployments to be readyperform a dry-run of self-signed issuer&certificate creation on cert-manager webhook should be enough.I'm fully open to all suggestion/negotiation.