-
Notifications
You must be signed in to change notification settings - Fork 248
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
Implement helm add & install in helm e2e test #1803
base: master
Are you sure you want to change the base?
Conversation
Welcome @THUzxj! |
Hi @THUzxj. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
❌ Deploy Preview for kubernetes-sigs-nfd failed. Why did it fail? →
|
/assign @marquiz |
/assign |
test/e2e/helm_test.go
Outdated
"k8s.io/kubernetes/test/e2e/framework" | ||
"sigs.k8s.io/e2e-framework/third_party/helm" | ||
|
||
// e2enetwork "k8s.io/kubernetes/test/e2e/framework/network" |
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.
??
test/e2e/helm_test.go
Outdated
admissionapi "k8s.io/pod-security-admission/api" | ||
) | ||
|
||
// Actual test suite |
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.
Helm based test suite
test/e2e/helm_test.go
Outdated
chart_name := "nfd/node-feature-discovery" | ||
release_name := "node-feature-discovery" | ||
version := "0.16.3" | ||
|
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 should test local helm charts, instead of released ones, this way we can tests if current changes will break Helm deployment
test/e2e/helm_test.go
Outdated
version := "0.16.3" | ||
|
||
Context("when deploying by helm", Ordered, func() { | ||
|
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.
trailing extra line
test/e2e/helm_test.go
Outdated
// manager := helm.New(framework.TestContext.KubeConfig) | ||
// err := manager.RunRepo(helm.WithArgs("remove", "nfd")) | ||
// 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.
??
test/e2e/helm_test.go
Outdated
// Error: error waiting for service node-feature-discovery-xxxx/ to appear: resource name may not be empty | ||
// By("Waiting for the nfd-master service to be up") | ||
// nfdSvc, err := f.ClientSet.CoreV1().Services(f.Namespace.Name).Get(ctx, "nfd-master", v1.GetOptions{}) | ||
// Expect(e2enetwork.WaitForService(ctx, f.ClientSet, f.Namespace.Name, nfdSvc.Name, true, time.Second, 10*time.Second)).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.
???
test/e2e/helm_test.go
Outdated
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.
If we are adding comments here, we should comment each step also
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.
@THUzxj please address this comment
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.
Sorry maybe I don't fully understand "comment each step", so I just removed this comment
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: THUzxj The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@ArangoGutierrez Thanks for your review. I will fix the code soon. |
4859578
to
f0ae10e
Compare
Hey @THUzxj how's this going, ping me if you need any help |
Sorry that I am not familiar with the review process. I have fixed your comments and maybe you could review it again. |
test/e2e/helm_test.go
Outdated
workingDir, err := os.Getwd() | ||
chartPath := filepath.Join(workingDir, "../../", "deployment", "helm", "node-feature-discovery") | ||
Expect(err).NotTo(HaveOccurred()) | ||
By("helm install " + release_name + " " + chartPath + " --namespace " + f.Namespace.Name + " --wait") |
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.
https://onsi.github.io/ginkgo/#documenting-complex-specs-by
Let's re write this "By"
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
test/e2e/helm_test.go
Outdated
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.
@THUzxj please address this comment
PR needs rebase. 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-sigs/prow repository. |
Hi,
for adding helm e2e tests discussed in #1769, I have implemented helm add repo, and install chart. The helm API is from e2e-framework. I would appreciate it if you could review the implementation for further development.
And for our future plan:
Additionally, I encountered an error stating:
when running
helm install
via the code, despite the command working fine when executed manually in the terminal. As a workaround, I addedf.NamespacePodSecurityEnforceLevel = admissionapi.LevelBaseline
. I'm uncertain if this is the correct approach. Do you have any suggestions or improvements for this issue?Thank you very much!