Skip to content
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

kubevirt: create default VM YAML dynamically (create from YAML option) #4613

Conversation

atiratree
Copy link
Member

  • do not link to common templates when they get missing

continuation of a discussion in #4469

@yaacov @irosenzw

cc @mareklibra @jelkosz

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 3, 2020
@atiratree
Copy link
Member Author

atiratree commented Mar 3, 2020

The whole YAML gets generated from the available common templates or defaults to the hardcoded one when they get missing

aa

@@ -43,7 +43,7 @@ import { getVMTemplateNamespacedName } from '../../../selectors/vm-template/sele

const getId = (field: string) => `vm-flavor-modal-${field}`;

const getFlavors = (template: TemplateKind) => {
const getAvailableFlavors = (template: TemplateKind) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

piggybacking this here
@yaacov is this name better?

Copy link
Member

Choose a reason for hiding this comment

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

👍 as long as it's different than the global one

workload.template.kubevirt.io/server: 'true'
vm.kubevirt.io/template: fedora-server-tiny-v0.7.0
Copy link
Member Author

Choose a reason for hiding this comment

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

removed the pointers to the common templates as this yaml should get used only when the common templates get missing

labels:
template.kubevirt.io/type: vm
os.template.kubevirt.io/fedora31: 'true'
flavor.template.kubevirt.io/tiny: 'true'
flavor.template.kubevirt.io/Custom: 'true'
Copy link
Member Author

Choose a reason for hiding this comment

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

that is why we have to use the Custom flavor

os.template.kubevirt.io/fedora31: 'true'
vm.kubevirt.io/template.revision: '1'
Copy link
Member Author

Choose a reason for hiding this comment

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

same here: this file is generated from the code above, but removed the common templates labels and changed flavor to Custom

- do not link to common templates when they get missing
@atiratree atiratree force-pushed the kubevirt.createVMYamlDynamicly branch from 3fc1ac0 to 990d865 Compare March 3, 2020 16:42
@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. component/kubevirt Related to kubevirt-plugin labels Mar 3, 2020
@atiratree
Copy link
Member Author

/retest

1 similar comment
@atiratree
Copy link
Member Author

/retest

@yaacov
Copy link
Member

yaacov commented Mar 4, 2020

/lgtm
/test analyze
/test e2e-gcp-console

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 4, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: suomiy, yaacov

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

@openshift-merge-robot openshift-merge-robot merged commit 8aad14d into openshift:master Mar 4, 2020
@spadgett spadgett added this to the v4.5 milestone Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/kubevirt Related to kubevirt-plugin lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants