Skip to content

KubeVirt extension PoC #888

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

Closed

Conversation

vojtechszocs
Copy link
Contributor

@vojtechszocs vojtechszocs commented Nov 30, 2018

This is a work in progress. Changes will be made based on received feedback.

Summary

This PR introduces KubeVirt extension of Console UI.

To avoid complexity and time spent on designing a formal extension mechanism, the current form of integration is through minimum necessary changes to application code. This PR therefore contains two types of code:

  • KubeVirt code, isolated to public/extend/kubevirt directory
    • example: public/extend/kubevirt/components/vm-list.jsx
  • modification of application code, importing and using KubeVirt code
    • example: public/components/resource-pages.ts

Code in public/extend/kubevirt directory contains program elements necessary for the integration, like the list and details page for the VirtualMachine resource. KubeVirt specific UI elements, like the "Create VM" wizard, are maintained in a separate repository and consumed via npm package:

React components in kubevirt-web-ui-components package generally follow Console UI dependency requirements, including PatternFly 3 and the corresponding PatternFly-React implementation. Files contained in this package include Babel-processed JavaScript and Sass partials.

Scope

VM list page

vm-list

VM details page

vm-details

KubeVirt version on all-projects overview page

all-overview

VM list and details on project overview page

vm-overview

VM actions

vm-actions

What's missing from kubevirt-web-ui fork

Below features have been skipped on purpose in order to reduce initial PR complexity:

  • VM list page:
    • missing create VM through wizard workflow
  • VM details page:
    • missing detail tabs: Consoles, Network Interfaces, Disks
  • VM actions:
    • missing "Restart Virtual Machine"

Environment setup

Here are the steps I've used to prepare a local development environment with KubeVirt enabled:

  1. download the oc binary distributed via openshift-origin-client-tools archive for OKD v3.10.0 and put it on your PATH

    • if you plan to run UI integration tests, create a kubectl symlink to oc
  2. make sure your cluster is up, note the cluster up configuration directory:

    ocBaseDir="/path/to/openshift.local.clusterup"
  3. put your cluster down and update node/node-config.yaml:

    sed -i "/kind/ a\kubeletArguments:\n  feature-gates:\n  - DevicePlugins=true" $ocBaseDir/node/node-config.yaml
  4. put your cluster up and login as admin user:

    oc login -u system:admin
  5. prepare your cluster for KubeVirt installation:

    KUBELET_ROOTFS=$(docker inspect $(docker ps | grep kubelet | cut -d" " -f1) | jq -r ".[0].GraphDriver.Data.MergedDir" -)
    sudo mkdir -p /var/lib/kubelet/device-plugins $KUBELET_ROOTFS/var/lib/kubelet/device-plugins
    sudo mount -o bind $KUBELET_ROOTFS/var/lib/kubelet/device-plugins /var/lib/kubelet/device-plugins
    oc adm policy add-cluster-role-to-user cluster-admin developer
    oc label node localhost kubevirt.io/schedulable=true
    oc adm policy add-scc-to-user privileged system:serviceaccount:kube-system:kubevirt-privileged
    oc adm policy add-scc-to-user privileged system:serviceaccount:kube-system:kubevirt-controller
    oc adm policy add-scc-to-user privileged system:serviceaccount:kube-system:kubevirt-infra
    oc adm policy add-scc-to-user privileged system:serviceaccount:kube-system:kubevirt-apiserver
    cat <<EOF > dv-featuregate.yaml
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: kubevirt-config
      namespace: kube-system
      labels:
        kubevirt.io: ""
    data:
      feature-gates: "DataVolumes"
    EOF
    oc create -f dv-featuregate.yaml
    oc adm policy add-scc-to-user privileged -z cdi-sa
  6. install KubeVirt v0.9.1 and CDI v1.2.0

    oc create -f https://github.com/kubevirt/containerized-data-importer/releases/download/v1.2.0/cdi-controller.yaml
    oc create -f https://github.com/kubevirt/kubevirt/releases/download/v0.9.1/kubevirt.yaml
  7. add sample VM resource

    oc apply -f https://raw.githubusercontent.com/kubevirt/demo/master/manifests/vm.yaml

Related resources

Action items necessary for PR completion

  • improve KubeVirt code to use TypeScript
  • ensure that initial application chunk (main-chunk) is not impacted by KubeVirt code
  • analyze KubeVirt related chunks (virtual-machine-chunk) and try to reduce their footprint

@coreos-ui
Copy link

Can one of the admins verify this patch?

1 similar comment
@coreos-ui
Copy link

Can one of the admins verify this patch?

@openshift-ci-robot openshift-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 30, 2018
@alecmerdler alecmerdler self-assigned this Nov 30, 2018
@alecmerdler alecmerdler self-requested a review November 30, 2018 19:55
@vojtechszocs
Copy link
Contributor Author

cc @jelkosz @mareklibra @rawagner

@ohadlevy after talking with @spadgett, the current plan for KubeVirt integration with Console UI is through minimum necessary changes to application code. This approach is also used in kubevirt-web-ui fork, which should be discontinued in the long term.

The goal of this PR is to have some initial KubeVirt support in Console UI, which leaves a more formal extension mechanism up to follow-up discussion, taking both Console and KubeVirt goals into consideration.

@@ -85,6 +86,7 @@
"react-tagsinput": "3.19.x",
"react-transition-group": "2.3.x",
"react-virtualized": "9.x",
"reactabular-dnd": "8.x",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should track down why this is needed. I don't think anything you've added should need this dependency.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, declaring an explicit dependency on reactabular-dnd shouldn't be necessary from target application's perspective. Adding only the kubevirt-web-ui-components one should be enough.

Please note that:

  • patternfly-react declares reactabular-table as a regular dependency (it's used to implement PF-React Table component)
  • kubevirt-web-ui-components uses reactabular-dnd which adds drag'n'drop support to Reactabular tables (to be used with PF-React Table component)

However, kubevirt-web-ui-components package currently doesn't declare reactabular-dnd as its dependency, which is a problem we're going to fix (along with some other dependency issues). See here for more details.

So with kubevirt-web-ui-components, we'll try not to introduce any additional peer dependencies (on top of existing ones that come from PF-React).

Currently, your dependency tree includes reactabular-table. After adding kubevirt-web-ui-components, it will also include reactabular-dnd. With webpack, code for reactabular-dnd should be (lazy) loaded only as part of KubeVirt specific chunk (assuming the main application doesn't use reactabular-dnd).

Copy link
Contributor Author

@vojtechszocs vojtechszocs Dec 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PRs for patternfly-react and kubevirt-web-ui-components projects posted, these should clean up dependencies and reduce warnings when calling yarn install.

@spadgett In order to eliminate unmet peer dependency warnings on lodash (coming mostly from patternfly-react's transitive deps), I'm planning to add "lodash": "npm:lodash-es" custom alias.

const buildConfigs = this.getBuildConfigsForResource(vm);
const services = this.getServicesForResource(vm);
const routes = this.getRoutesForServices(services);
const pods = this.getPodsForResource(vm);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will VMs have these resources?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not too sure. For now, I simply wanted to comply with the OverviewItem contract.

@jelkosz @mareklibra can you please share your thoughts here?

Also note that I've changed

@@ -1008,7 +1040,7 @@ export type OverviewItem = {
   obj: K8sResourceKind;
   pods?: K8sResourceKind[];
   previous?: PodControllerOverviewItem;
-  readiness: OverviewItemReadiness;
+  readiness?: OverviewItemReadiness;
   routes: K8sResourceKind[];
   services: K8sResourceKind[];
 };

in order to avoid rendering "X of Y pods" label on the right side of object list row.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, there is an initiative to make the VMs to be completely native. It means they should play well with all the features of kubernetes/openshift such as deployments, replica sets etc. We are not there yet but we are getting there.

For this particular objects:
buildconfig - there has been no effort yet to make this work nor to test it. So I would go with "it does not work" for this case
services: yes, plays well with VMs
routes: yes, plays well with VMs
pods: if the VM is running, there is a pod associated with it in which the qemu process is actually living. So yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buildconfig - there has been no effort yet to make this work nor to test it. So I would go with "it does not work" for this case

@jelkosz I can set buildConfigs to an empty array (i.e. remove the call to getBuildConfigsForResource function).

Still, OverviewItem.buildConfigs is currently not optional, so we'll end up with "No Build Configs found for this resource." item in the overview details pane anyway:

vm-overview-list

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vojtechszocs how big change it would be to enrich the infra to support conditionally not to render the particular resources?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jelkosz It shouldn't be a big change, I'll try to do that as part of this PR.


const K8S_CREATION_TIMEOUT = 15000;

const getKindForCRD = (model: K8sKind) => `${model.apiGroup}~${model.apiVersion}~${model.kind}`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use referenceForModel

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Importing the referenceForModel function here:

import { referenceForModel } from '../../public/module/k8s';

and calling it causes the following error:

E/launcher - Error: /home/vszocs/go/src/github.com/openshift/console/frontend/node_modules/lodash-es/lodash.js:10
export { default as add } from './add.js';
^^^^^^

SyntaxError: Unexpected token export
    at new Script (vm.js:79:7)
    at createScript (vm.js:251:10)
    at Object.runInThisContext (vm.js:303:10)
    at Module._compile (internal/modules/cjs/loader.js:656:28)
    at Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Object.require.extensions.(anonymous function) [as .js] (/home/vszocs/go/src/github.com/openshift/console/frontend/node_modules/ts-node/src/index.ts:392:14)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Module.require (internal/modules/cjs/loader.js:636:17)

In public/module/k8s/k8s we do import * as _ from 'lodash-es' and in lodash-es/lodash.js there's ES6 style export:

export { default as add } from './add.js'

which causes this error. This is the reason why didn't use the referenceForModel function.

I can look into this problem and try to fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, with Jest you're white-listing node_modules/lodash-es/* for module transformation (transformIgnorePatterns). Anything else in node_modules is expected to be already pre-compiled and is therefore excluded from transformation by ts-jest.

I guess we'll need to apply a similar approach when running Protractor. This issue is basically Protractor unable to parse node_modules/lodash-es/lodash.js which is referenced by application code (public/module/k8s/k8s.ts) that we're trying to reuse.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I see now that integration tests actually use lodash instead of lodash-es 😃

I've tried to use -I 'node_modules/(?!lodash-es/.*)' (custom ignore pattern) argument for ts-node within the test-suite script, but ran into some weird issues.

So for integration tests specifically, we'll need to map lodash-es to lodash in terms of TypeScript module resolution.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've solved the issue of aliasing lodash-es to lodash in context of integration tests.

Doing that, I've run into another issue - access to window global which is undefined when being evaluated in context of integration tests (Jasmine) as part of the import process, for example:

// public/module/k8s/k8s.ts
export const k8sBasePath = `${(window as any).SERVER_FLAGS.basePath}api/kubernetes`;

I've solved that issue as well, mocking window.SERVER_FLAGS object as necessary.

It's now possible to import any code from public directory within integration test code, so I'll go ahead and use the referenceForModel function as suggested by @spadgett.

@@ -0,0 +1,2 @@
export const startStopVmModal = (props) => import('./start-stop-vm-modal' /* webpackChunkName: "start-stop-vm-modal" */)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeps acronyms capitalized

Suggested change
export const startStopVmModal = (props) => import('./start-stop-vm-modal' /* webpackChunkName: "start-stop-vm-modal" */)
export const startStopVMModal = (props) => import('./start-stop-vm-modal' /* webpackChunkName: "start-stop-vm-modal" */)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, will do.

import { createModalLauncher, ModalTitle, ModalBody, ModalSubmitFooter } from '../../../../components/factory/modal';
import { k8sPatch } from '../../../../module/k8s';

class StartStopVmModal extends PromiseComponent {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class StartStopVmModal extends PromiseComponent {
class StartStopVMModal extends PromiseComponent {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, will do.

if (props.loaded) {
const data = props.flatten(props.resources);
if (data) {
let resource = data[0];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let resource = data[0];
const resource = props.filter ? props.filter(data) : data[0];

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do in case we keep our custom filter prop function here.

const title = resource.metadata.uid;
const kind = resource.kind || PodModel.kind;
// TODO: if `kind` refers to CRD object, use `referenceForModel` function
return <ResourceLink kind={kind} name={name} namespace={namespace} title={title} />;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd leave off title here. UID is not helpful to show on hover. (I know we do it other places).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (and a lot of other code) was taken from existing code, I'll remove the title as suggested.

}
if (resource) {
const name = resource.metadata.name;
const namespace = resource.metadata.namespace;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer ES6 destructuring

const { name, namespace } = resource.metadata;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, will do.

<ColHead {...props} className="col-lg-2 col-md-2 col-sm-2 hidden-xs" sortField="spec.running">State</ColHead>
<ColHead {...props} className="col-lg-2 col-md-2 col-sm-2 hidden-xs" sortField="metadata.phase">Phase</ColHead>
<ColHead {...props} className="col-lg-2 col-md-2 col-sm-2 hidden-xs">Virtual Machine Instance</ColHead>
<ColHead {...props} className="col-lg-2 col-md-2 col-sm-2 hidden-xs">Pod</ColHead>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should only need to say col-sm-2 on each of these if md and lg are the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, will do.

<ColHead {...props} className="col-lg-2 col-md-2 col-sm-2 col-xs-6" sortField="metadata.name">Name</ColHead>
<ColHead {...props} className="col-lg-2 col-md-2 col-sm-2 col-xs-6" sortField="metadata.namespace">Namespace</ColHead>
<ColHead {...props} className="col-lg-2 col-md-2 col-sm-2 hidden-xs" sortField="spec.running">State</ColHead>
<ColHead {...props} className="col-lg-2 col-md-2 col-sm-2 hidden-xs" sortField="metadata.phase">Phase</ColHead>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sort field looks wrong?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which column are you referring to?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one. I don't think metadata.phase exists?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. As @mareklibra wrote, the Phase column was removed in kubevirt-web-ui so I'll remove it here as well. Updated PR should reflect latest kubevirt-web-ui modifications.

@spadgett
Copy link
Member

We'll look at setting up approvals and an OWNERS file for your component.

@openshift-bot
Copy link
Contributor

@vojtechszocs: 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/test-infra repository.

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 2, 2018
@vojtechszocs
Copy link
Contributor Author

Thanks again @spadgett for your quick review, I'll update the PR accordingly.

@mareklibra @rawagner please take a look at Sam's comments where I've mentioned you and provide your feedback.

We'll look at setting up approvals and an OWNERS file for your component.

Thanks, I can add a public/extend/kubevirt/OWNERS file in my next PR update, need to look more closely into test-infra Reviewers and Approvers doc to understand it better.

One more note - for now, I didn't add the touchpoints.js validation mechanism I've mentioned in our last discussion; I think the added complexity of having a custom ESLint rule (plus a unit test for it, plus a more constrained ESLint config regarding imports to ensure this rule catches all static & dynamic forms of imports) isn't really worth it.

@alecmerdler
Copy link
Contributor

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 5, 2018
@vojtechszocs
Copy link
Contributor Author

@jelkosz @mareklibra Once this PR gets merged, KubeVirt-wise, we should bring openshift/console up to parity with kubevirt-web-ui (via follow-up PR) and then start working primarily on openshift/console repo.

The public/extend/kubevirt directory should have an OWNERS file - from OpenShift GitHub review and approval perspective, this means that this directory is a unit of independent code.

@vojtechszocs vojtechszocs force-pushed the kubevirt-extension-poc branch 2 times, most recently from 067e876 to a95bac1 Compare January 11, 2019 18:24
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 11, 2019
@vojtechszocs
Copy link
Contributor Author

Hi @spadgett and @jelkosz, PR is now rebased, all review comments should be addressed (see below for details). Please let me know if you see anything that needs further changes.

Recent changes impacting this PR

  • kubevirt-web-ui-components has adopted BEM methodology with a kubevirt prefix
  • react and react-dom peer dependency versions in kubevirt-web-ui-components package have been aligned with Console UI dependencies (less warnings upon yarn install)
  • kubevirt-web-ui-components no longer imposes any special peer dependencies (current list includes patternfly-react, prop-types, react, react-dom, react-router-dom)

Notes on PR review comments

  • all code under frontend/public/extend/kubevirt has been updated to use TypeScript (although, our typings should be improved over time)
  • for integration tests, lodash-es module is aliased to lodash in context of Node.js module resolution mechanism (this allows us to import application modules that depend on lodash-es which would otherwise fail due to ts-node excluding everything under node_modules directory from compilation)
  • related to above item, for integration tests, window.SERVER_FLAGS object is mocked
  • as for VirtualMachine CRD list page:
    • the State/Phase column merge/rework is still TODO but has been addressed in the fork (PR)
    • the multiple websocket connection for the same resource issue is still TODO but has been addressed in the fork (PR)
    • we're tracking the issue to decrease connection count needed to render the VM status

@spadgett I'd prefer to do above TODO items (backports) via follow-up PR, is that OK with you?

What's coming in very near future

As soon as this PR gets merged, we can start working on reconciling code between openshift/console and its kubevirt/web-ui fork.

Once we reach parity, our primary PR target should shift from kubevirt/web-ui to openshift/console, i.e. Console first, fork second. PRs for Console UI are generally expected to be merged later than the corresponding PRs for our fork, since the former involves Console maintainer intervention. I've added the frontend/public/extend/kubevirt/OWNERS file to denote ownership of KubeVirt specific code in context of Console UI repo.

I really hope the transition period where every KubeVirt-related Console PR has a fork PR equivalent won't be too long, so we can discontinue the fork. (For the short term, our fork gives us the flexibility to quickly deliver new features.)

CC @mareklibra @rawagner @pcbailey @suomiy

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 14, 2019
@openshift-ci-robot openshift-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 24, 2019
@vojtechszocs
Copy link
Contributor Author

Added commit with UI integration tests for basic VM actions, based on Radim's PR for kubevirt/web-ui.

Note that the all suite is not modified. For now, KubeVirt test suite can be executed manually:

yarn test-suite --suite kubevirt

Also note that CRUD test suite now supports KubeVirt objects:

yarn test-suite --suite crud --params.kubevirt true

@spadgett spadgett changed the base branch from master to kubevirt January 24, 2019 17:15
@spadgett
Copy link
Member

/refresh

@vojtechszocs vojtechszocs force-pushed the kubevirt-extension-poc branch from cb71560 to 32eb996 Compare January 25, 2019 16:15
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 25, 2019
@spadgett spadgett changed the base branch from kubevirt to master-next January 25, 2019 18:39
@jelkosz
Copy link

jelkosz commented Mar 7, 2019

/retest

@spadgett
Copy link
Member

#1290 will pick up the latest test fixes

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 14, 2019
@spadgett
Copy link
Member

@vojtechszocs sorry, needs rebase now that i updated master-next

@vojtechszocs
Copy link
Contributor Author

vojtechszocs commented Mar 14, 2019

@vojtechszocs sorry, needs rebase now that i updated master-next

No problem. Thank you for helping us with this PR.

Edit: just realized I need to rebase 😄 will do that shortly.

@vojtechszocs vojtechszocs force-pushed the kubevirt-extension-poc branch from 2914460 to 0be1d81 Compare March 14, 2019 21:39
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mareklibra, rawagner, vojtechszocs
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: alecmerdler

If they are not already assigned, you can assign the PR to them by writing /assign @alecmerdler in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vojtechszocs
Copy link
Contributor Author

PR rebased on latest master-next. Conflicts in yarn.lock were manually checked and resolved.

@openshift-ci-robot
Copy link
Contributor

@vojtechszocs: 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/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 15, 2019
@lizsurette
Copy link

@openshift/team-ux-review It would be great to hear what you all have to say on where the KubeVirt extension is heading. Here is a demo video that @mareklibra created. There have been some minor UX tweaks since then, but this covers all of the major features:
https://www.youtube.com/watch?v=ouqiFeQN6cs&feature=youtu.be

@beanh66
Copy link

beanh66 commented Mar 22, 2019

@openshift/team-ux-review

@vojtechszocs
Copy link
Contributor Author

Update: initial frontend monorepo support has been added into master-next branch via #1362.

This PR will be updated to utilize the static plugin mechanism once it lands into the codebase.

@ohadlevy
Copy link

@vojtechszocs whats the status of this PR? also a rebase is required. thanks

@vojtechszocs
Copy link
Contributor Author

@vojtechszocs whats the status of this PR? also a rebase is required. thanks

PR that adds initial support for static plugins is ready for review: #1499

Once #1499 is merged, I'll address the remaining extension gaps required for initial KubeVirt UI integration:

  • (essential) add model-based feature flag, i.e. KUBEVIRT flag driven by VirtualMachineModel
  • (nice to have) extend all-projects overview page, i.e. show KubeVirt version
  • (nice to have) extend project-specific overview page, i.e. support listing VM objects

Once above mentioned gaps are closed, I'll rework this PR to utilize the new extension system together with @mareklibra and @rawagner. This will mark a point of transition from working with our fork to working with the Console repo.

@jelkosz Please review above mentioned extension gaps and let me know if there's anything missing.

@jelkosz
Copy link

jelkosz commented Apr 30, 2019

@vojtechszocs I agree with the list just want to mention that those things do not block the development - e.g. this PR can be adapted even if it was always shown. We can not merge like that but we can prepare it.

@lizsurette
Copy link

I wanted to add screenshots of the latest and greatest around the KubeVirt functionality. FYI @beanh66 @matthewcarleton

VM List
VM List

VM - Actions in List
VM List - Actions

Create VM - Basic
Create VM - Basic

Create VM - Networking
Create VM - Networking

Create VM - Storage
Create VM - Storage

VM Details - Overview
VM Details - Overview

VM Details - Consoles
VM Details - Consoles

VM Details - Network Interfaces
VM Details - Network Interfaces

VM Details - Disks
VM Details - Disks

VM in Resources List
VMs in Resources List

VM Side Panel - Resources List
VM Side Panel Resources List

@vojtechszocs
Copy link
Contributor Author

@lizsurette thank you for sharing those screenshots!

@spadgett spadgett changed the base branch from master-next to master May 13, 2019 22:52
@openshift-ci-robot
Copy link
Contributor

@vojtechszocs: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/console-e2e link /test console-e2e
ci/prow/e2e-aws 0be1d81 link /test e2e-aws
ci/prow/e2e-aws-console 0be1d81 link /test e2e-aws-console
ci/prow/e2e-aws-console-olm 0be1d81 link /test e2e-aws-console-olm
ci/prow/images 0be1d81 link /test images
ci/prow/backend 0be1d81 link /test backend
ci/prow/frontend 0be1d81 link /test frontend

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@beanh66
Copy link

beanh66 commented May 15, 2019

@lizsurette These look great, thanks for updating the screenshots! The only big thing that jumps out as being inconsistent with the rest of the console is the VM details overview page. Remaining tabs seem consistent with the rest of the console, but the Overview tab typically uses a 1 or 2 column format. I know we have discussed this on the design side, but curious if there are any plans to revisit this page?

We are also in the process of converting to PF4 tables so we should be using PF4 tables for the VM summary view as well to match other resources for 4.2. With that said, we do not currently have a wizard in the console, so wondering if we introduce the wizard back in, should we use the PF4 version here?

FYI @alimobrem

@ncameronbritt
Copy link

@lizsurette @beanh66 The styling of the tables on the Create VM - Networking and Create VM - Storage don't look to me like the rest of the console or like PF.

@andybraren
Copy link
Contributor

The only big thing that jumps out as being inconsistent with the rest of the console is the VM details overview page... the Overview tab typically uses a 1 or 2 column format. I know we have discussed this on the design side, but curious if there are any plans to revisit this page?

@beanh66 Looking at Marek's recent import video it seems that the columns reflow to a two-column layout on smaller screens, but staying consistent with other pages for now makes sense.

we do not currently have a wizard in the console, so wondering if we introduce the wizard back in, should we use the PF4 version here?

I'd be in favor of PF4's (better) wizard, but the form inputs within it would still be PF3, right? Should we wait until we start converting form inputs to PF4 as well?

The styling of the tables on the Create VM - Networking and Create VM - Storage don't look to me like the rest of the console or like PF.

@ncameronbritt Agreed, I believe the plan is to convert these to PF4 tables which offer the functionality we need, but until then these tables are a bit custom.

@matthewcarleton
Copy link
Contributor

matthewcarleton commented May 15, 2019

I'd be in favor of PF4's (better) wizard, but the form inputs within it would still be PF3, right? Should we wait until we start converting form inputs to PF4 as well?

@andybraren It might be a while before Forms are ready in PF4. They have the basic work done but I believe there is still work to be completed. We should reach out to the PF side to align. If the time line is pretty far out we could update the wizard (since it's a separate effort anyway) and then do the forms afterwards. That would also get us the updated PF4 table for the storage/network tabs 🤞

@lizsurette
Copy link

I think based on the additional UXD review comments we should:

  1. Update the current VM Details now to follow the 2 column layout to be consistent with other OpenShift detail pages.
  2. Log a follow-up issue to update the Wizard to use PF4. It's not ready yet on the PatternFly side so can't be done now. This will also fix the concern around the table styling on the Network and Storage config steps.

What do you think @beanh66 @alimobrem @jelkosz ?

@matthewcarleton
Copy link
Contributor

  1. Log a follow-up issue to update the Wizard to use PF4. It's not ready yet on the PatternFly side so can't be done now. This will also fix the concern around the table styling on the Network and Storage config steps.

@lizsurette just to clarify the wizard should be ready to go just not forms (entirely). forms might be in a good enough place to move forward I think we could investigate that a bit further.

https://www.patternfly.org/v4/documentation/react/components/wizard/

@spadgett
Copy link
Member

I'm assuming this should be closed in favor of the static plugin PRs which are beginning to come in. @vojtechszocs let me know if I'm wrong

/close

@openshift-ci-robot
Copy link
Contributor

@spadgett: Closed this PR.

In response to this:

I'm assuming this should be closed in favor of the static plugin PRs which are beginning to come in. @vojtechszocs let me know if I'm wrong

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.