-
Notifications
You must be signed in to change notification settings - Fork 149
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
Add apiserver-proxy for KubeVirt UI Plugin #2401
Conversation
hco-e2e-operator-sdk-sno-aws lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-operator-sdk-sno-azure 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. |
hco-e2e-operator-sdk-gcp, hco-e2e-operator-sdk-aws lanes succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-operator-sdk-azure 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. |
hco-e2e-kv-smoke-gcp lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-kv-smoke-azure 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. |
Pull Request Test Coverage Report for Build 5402102077
💛 - Coveralls |
okd-hco-e2e-operator-sdk-gcp lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/okd-hco-e2e-operator-sdk-aws 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. |
okd-hco-e2e-operator-sdk-aws lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/okd-hco-e2e-operator-sdk-gcp 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. |
hco-e2e-operator-sdk-azure lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-operator-sdk-aws, ci/prow/hco-e2e-operator-sdk-gcp, ci/prow/okd-hco-e2e-operator-sdk-gcp 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. |
hco-e2e-upgrade-index-sno-aws lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-index-sno-azure 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. |
hco-e2e-kv-smoke-gcp lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-kv-smoke-azure 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. |
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.
Overall looks good.
My main comment is about the DescribeTable
tests, where the code keep asking about thing it can get from the outside - this is the whole idea of the parameterized tests. To make it easier, let's get rid of the error return values from some creation functions, that will never return an error.
kvUIProxyServingCertPath, hcoutil.UIProxyServerPort, hcoutil.AppComponentUIProxy) | ||
} | ||
|
||
func getKvUIDeployment(hc *hcov1beta1.HyperConverged, deploymentName string, image string, |
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 function never returns error. can we get rid of the error return value?
@@ -57,14 +71,53 @@ func newKvUIPluginCRHandler(_ log.Logger, Client client.Client, Scheme *runtime. | |||
return []Operand{newConsolePluginHandler(Client, Scheme, kvUIConsolePluginCR)}, nil | |||
} | |||
|
|||
func NewKvUIPluginDeplymnt(hc *hcov1beta1.HyperConverged) (*appsv1.Deployment, error) { | |||
func NewKvUIPluginDeployment(hc *hcov1beta1.HyperConverged) (*appsv1.Deployment, error) { |
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 function never returns error. can we get rid of the error return value?
var err error | ||
switch appComponent { | ||
case hcoutil.AppComponentUIPlugin: | ||
expectedResource, err = NewKvUIPluginDeployment(hco) | ||
case hcoutil.AppComponentUIProxy: | ||
expectedResource, err = NewKvUIProxyDeployment(hco) | ||
} | ||
Expect(err).ToNot(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.
Please consider to pass the deployment as a parameter. This will be possible if we'll get rid of all the return values above. The result will be cleaner code, without code branches.
handler, err := newKvUIPluginDeploymentHandler(logger, cl, commontestutils.GetScheme(), hco) | ||
var handler []Operand | ||
switch appComponent { | ||
case hcoutil.AppComponentUIPlugin: | ||
handler, err = newKvUIPluginDeploymentHandler(logger, cl, commontestutils.GetScheme(), hco) | ||
case hcoutil.AppComponentUIProxy: | ||
handler, err = newKvUIProxyDeploymentHandler(logger, cl, commontestutils.GetScheme(), hco) | ||
} | ||
Expect(err).ToNot(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.
same
switch appComponent { | ||
case hcoutil.AppComponentUIPlugin: | ||
expectedResource = NewKvUIPluginSvc(hco) | ||
handler = (*genericOperand)(newServiceHandler(cl, commontestutils.GetScheme(), NewKvUIPluginSvc)) | ||
case hcoutil.AppComponentUIProxy: | ||
expectedResource = NewKvUIProxySvc(hco) | ||
handler = (*genericOperand)(newServiceHandler(cl, commontestutils.GetScheme(), NewKvUIProxySvc)) | ||
} |
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.
same
switch appComponent { | ||
case hcoutil.AppComponentUIPlugin: | ||
expectedResource = NewKvUIPluginSvc(hco) | ||
cl = commontestutils.InitClient([]client.Object{hco, expectedResource}) | ||
handler = (*genericOperand)(newServiceHandler(cl, commontestutils.GetScheme(), NewKvUIPluginSvc)) | ||
case hcoutil.AppComponentUIProxy: | ||
expectedResource = NewKvUIProxySvc(hco) | ||
cl = commontestutils.InitClient([]client.Object{hco, expectedResource}) | ||
handler = (*genericOperand)(newServiceHandler(cl, commontestutils.GetScheme(), NewKvUIProxySvc)) |
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.
same
switch appComponent { | ||
case hcoutil.AppComponentUIPlugin: | ||
expectedResource = NewKvUIPluginSvc(hco) | ||
outdatedResource = NewKvUIPluginSvc(hco) | ||
case hcoutil.AppComponentUIProxy: | ||
expectedResource = NewKvUIProxySvc(hco) | ||
outdatedResource = NewKvUIProxySvc(hco) |
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.
same
switch appComponent { | ||
case hcoutil.AppComponentUIPlugin: | ||
expectedResource = NewKvUIPluginSvc(hco) | ||
handler = (*genericOperand)(newServiceHandler(cl, commontestutils.GetScheme(), NewKvUIPluginSvc)) | ||
case hcoutil.AppComponentUIProxy: | ||
expectedResource = NewKvUIProxySvc(hco) | ||
handler = (*genericOperand)(newServiceHandler(cl, commontestutils.GetScheme(), NewKvUIProxySvc)) | ||
} |
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.
same
Signed-off-by: Oren Cohen <ocohen@redhat.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
okd-hco-e2e-operator-sdk-aws lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-operator-sdk-azure, ci/prow/okd-hco-e2e-operator-sdk-gcp 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. |
okd-hco-e2e-operator-sdk-aws lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/okd-hco-e2e-operator-sdk-gcp, ci/prow/okd-hco-e2e-upgrade-index-aws 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. |
hco-e2e-upgrade-index-sno-azure lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-index-sno-aws, ci/prow/hco-e2e-upgrade-prev-index-sno-aws 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. |
hco-e2e-upgrade-index-azure lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-index-aws 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. |
@orenc1: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
hco-e2e-kv-smoke-gcp lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-kv-smoke-azure 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. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nunnatsa 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 |
/retest |
An apiserver proxy pod is being introduced to improve API queries performance for virtual machines resources done by the UI client.
VirtualMachines table is getting data from the apiserver proxy:
What this PR does / why we need it:
Reviewer Checklist
Jira Ticket:
Release note: