Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Commit

Permalink
Update kubevirt013 (#556) (#576)
Browse files Browse the repository at this point in the history
* Update kubevirt-ansible to use kubevirt-0.13

Signed-off-by: Kedar Bidarkar <[email protected]>

* Run `make deps-update` for kubevirt-0.13.

As cdi used by kubevirt-0.13 is cdi-1.4.1+ and not cdi-1.5.0,
removed the cdi entry from the glide.yaml file, so that we
pull the cdi version from git commit from what the kubevirt-0.13
is using currently.

Signed-off-by: Kedar Bidarkar <[email protected]>

* Update the apiVersion  to v1alpha3

Signed-off-by: Kedar Bidarkar <[email protected]>

* update the flags to reflect container prefix

Signed-off-by: Kedar Bidarkar <[email protected]>

* Removed volumeName from disks for kubevirt-0.13.0

Signed-off-by: Kedar Bidarkar <[email protected]>

* Fix secret and configmap tests for changes related to volumeName

Signed-off-by: Kedar Bidarkar <[email protected]>

* Fixed the kubevirt-cr and kubevirt-operator template files

Dropped namespace creation in kubevirt-operator template
and updated the apiversion.

Signed-off-by: Kedar Bidarkar <[email protected]>
(cherry picked from commit db35688)
  • Loading branch information
Ryan Hallisey authored Jan 18, 2019
1 parent f5aa033 commit a02cc44
Show file tree
Hide file tree
Showing 1,257 changed files with 174,210 additions and 23,821 deletions.
5 changes: 1 addition & 4 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ import:
- package: github.com/onsi/gomega
version: dcabb60a477c2b6f456df65037cb6708210fbb02
- package: kubevirt.io/kubevirt
version: v0.12.0-alpha.2
version: v0.13.0
repo: https://github.com/kubevirt/kubevirt.git
- package: kubevirt.io/qe-tools
version: v0.1.2
repo: https://github.com/kubevirt/qe-tools.git
- package: kubevirt.io/containerized-data-importer
repo: https://github.com/kubevirt/containerized-data-importer.git
version: v1.4.0
4 changes: 2 additions & 2 deletions hack/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ set -e
source hack/common.sh

prefix=${DOCKER_PREFIX:-kubevirt}
tag=${DOCKER_TAG:-v0.12.0-alpha.2}
tag=${DOCKER_TAG:-v0.13.0}
kubeconfig=${KUBECONFIG:-~/.kube/config}
[ -z "$OC_PATH" ] && OC_PATH=$(command -v oc)
[ -z "$KUBECTL_PATH" ] && KUBECTL_PATH=$(which kubectl)
[ -z "$VIRTCTL_PATH" ] && VIRTCTL_PATH=$(which virtctl)

${TESTS_OUT_DIR}/tests.test -kubeconfig=$kubeconfig -tag=$tag -prefix=$prefix -oc-path=${OC_PATH} -kubectl-path=${KUBECTL_PATH} -virtctl-path=${VIRTCTL_PATH} ${FUNC_TEST_ARGS}
${TESTS_OUT_DIR}/tests.test -kubeconfig=$kubeconfig -container-tag=$tag -container-prefix=$prefix -oc-path=${OC_PATH} -kubectl-path=${KUBECTL_PATH} -virtctl-path=${VIRTCTL_PATH} ${FUNC_TEST_ARGS}
4 changes: 2 additions & 2 deletions roles/kubevirt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Deploy KubeVirt resources onto a cluster.
|registry_url | docker.io | |Container image registry.|
| storage_role | storage-none | <ul><li>storage-none</li><li>storage-demo</li><li>storage-glusterfs</li></ul> | Storage role to install with KubeVirt.|
| network_role | network-multus | <ul><li>network-none</li><li>network-multus</li></ul> | Network role to install with KubeVirt.|
| version |0.12.0-alpha.2|<ul><li>0.12.0-alpha.2</li><li>0.9.6</li><li>0.8.0</li><li>0.7.0</li><li>0.6.0</li><li>0.5.0</li><li>0.4.1</li><li>0.4.0</li><li>0.3.0</li><li>0.2.0</li><li>0.1.0</li></ul>|KubeVirt release version.|
| version |0.13.0|<ul><li>0.13.0</li><li>0.9.6</li><li>0.8.0</li><li>0.7.0</li><li>0.6.0</li><li>0.5.0</li><li>0.4.1</li><li>0.4.0</li><li>0.3.0</li><li>0.2.0</li><li>0.1.0</li></ul>|KubeVirt release version.|
|default_vm_templates|<ul><li>vm-template-fedora</li><li>vm-template-windows2012r2</li><li>vm-template-rhel7></ul>|| Default vm templates to deploy with KubeVirt.|
|offline_template_dir| /opt/apb/kubevirt-templates || Offline VM template location specifed in the APB Dockerfile.|

### Usage

```
ansible-playbook -i inventory -e version=0.12.0-alpha.2 -e apb_action=provision playbooks/kubevirt.yml
ansible-playbook -i inventory -e version=0.13.0 -e apb_action=provision playbooks/kubevirt.yml
```
2 changes: 1 addition & 1 deletion roles/kubevirt/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ platform: "openshift"

apb_action: "provision"
kubevirt_template_dir: "{{ role_path }}/templates"
version: 0.12.0-alpha.2
version: 0.13.0
docker_tag: "v{{ version }}"
image_pull_policy: IfNotPresent

Expand Down
4 changes: 2 additions & 2 deletions roles/kubevirt/tasks/deprovision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
dest: "/tmp/kubevirt-cr.yaml"
when: kubevirt_cr.stat.exists == False

- name: Delete apiservices v1alpha2.subresources.kubevirt.io
command: "{{ cluster_command }} -n {{ namespace }} delete apiservices v1alpha2.subresources.kubevirt.io --ignore-not-found=true"
- name: Delete apiservices v1alpha3.subresources.kubevirt.io
command: "{{ cluster_command }} -n {{ namespace }} delete apiservices v1alpha3.subresources.kubevirt.io --ignore-not-found=true"

- name: Ask the Operator to cleanup KubeVirt
command: "{{ cluster_command }} delete -f /tmp/kubevirt-cr.yaml --ignore-not-found=true"
Expand Down
2 changes: 1 addition & 1 deletion roles/kubevirt/templates/kubevirt-cr.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: kubevirt.io/v1alpha2
apiVersion: kubevirt.io/v1alpha3
kind: KubeVirt
metadata:
name: kubevirt
Expand Down
2 changes: 1 addition & 1 deletion roles/kubevirt/templates/kubevirt-operator.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
- kvs
singular: kubevirt
scope: Namespaced
version: v1alpha2
version: v1alpha3

---
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
2 changes: 1 addition & 1 deletion roles/network-multus/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
registry_url: "docker.io"
registry_namespace: "kubevirt"
network_namespace: "kube-system"
docker_tag: "v0.12.0-alpha.2"
docker_tag: "v0.13.0"

multus_provisioner_name: "kube-multus-amd64"
multus_provisioner_repo: "docker.io/nfvpe/multus"
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (
pvcName = "golden-pvc"
pvcName1 = "golden-pvc1"
vmName = "test-vm"
vmAPIVersion = "kubevirt.io/v1alpha2"
vmAPIVersion = "kubevirt.io/v1alpha3"
rawPVCFilePath = "tests/manifests/golden-pvc.yml"
rawVMFilePath = "tests/manifests/test-vm.yml"
)
Expand Down
2 changes: 1 addition & 1 deletion tests/high_performance_vm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var _ = Describe("High performance vm test", func() {
overcommitGuestOverheadStr = "Overcommit Guest Overhead: true"
memoryOvercommit = "true"
headless = "false"
vmAPIVersion = "kubevirt.io/v1alpha2"
vmAPIVersion = "kubevirt.io/v1alpha3"
)

flag.Parse()
Expand Down
7 changes: 3 additions & 4 deletions tests/manifests/test-vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ objects:
memory: 64M
devices:
disks:
- name: mydisk
volumeName: pvcvolume
- name: mypvcdisk
disk:
bus: virtio
volumes:
- name: pvcvolume
- name: mypvcdisk
persistentVolumeClaim:
claimName: ${PVC_NAME}
parameters:
- name: VM_APIVERSION
- name: VM_NAME
- name: PVC_NAME
- name: PVC_NAME
3 changes: 1 addition & 2 deletions tests/manifests/virt-testing-vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ objects:
- disk:
bus: virtio
name: containerdisk
volumeName: registryvolume
volumes:
- name: registryvolume
- name: containerdisk
containerDisk:
image: ${{IMAGE_NAME}}
parameters:
Expand Down
8 changes: 3 additions & 5 deletions tests/manifests/vm-cirros.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: kubevirt.io/v1alpha2
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachine
metadata:
creationTimestamp: null
Expand All @@ -19,25 +19,23 @@ spec:
- disk:
bus: virtio
name: containerdisk
volumeName: registryvolume
- disk:
bus: virtio
name: cloudinitdisk
volumeName: cloudinitvolume
machine:
type: ""
resources:
requests:
memory: 64M
terminationGracePeriodSeconds: 0
volumes:
- name: registryvolume
- name: containerdisk
containerDisk:
image: kubevirt/cirros-container-disk-demo:latest
- cloudInitNoCloud:
userData: |
#!/bin/sh
echo 'printed from cloud-init userdata'
name: cloudinitvolume
name: cloudinitdisk
status: {}
14 changes: 6 additions & 8 deletions tests/manifests/vm_with_sidecar_hook.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: kubevirt.io/v1alpha2
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachineInstance
metadata:
annotations:
hooks.kubevirt.io/hookSidecars: '[{"image": "kubevirt/example-hook-sidecar:v0.12.0-alpha.2"}]'
hooks.kubevirt.io/hookSidecars: '[{"image": "kubevirt/example-hook-sidecar:v0.13.0"}]'
smbios.vm.kubevirt.io/baseBoardManufacturer: "Radical Edward"
creationTimestamp: null
labels:
Expand All @@ -15,27 +15,25 @@ spec:
- disk:
bus: virtio
name: containerdisk
volumeName: registryvolume
- disk:
bus: virtio
name: cloudinitdisk
volumeName: cloudinitvolume
machine:
type: ""
resources:
requests:
memory: 1024M
terminationGracePeriodSeconds: 0
volumes:
- name: registryvolume
- name: containerdisk
containerDisk:
image: kubevirt/fedora-cloud-container-disk-demo:latest
- cloudInitNoCloud:
userData: |-
#cloud-config
password: fedora
chpasswd: { expire: False }
bootcmd:
bootcmd:
- "sudo dnf install dmidecode -y"
name: cloudinitvolume
status: {}
name: cloudinitdisk
status: {}
5 changes: 2 additions & 3 deletions tests/manifests/vmi-ephemeral.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: kubevirt.io/v1alpha2
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachineInstance
metadata:
creationTimestamp: null
Expand All @@ -12,15 +12,14 @@ spec:
- disk:
bus: virtio
name: containerdisk
volumeName: registryvolume
machine:
type: ""
resources:
requests:
memory: 64M
terminationGracePeriodSeconds: 0
volumes:
- name: registryvolume
- name: containerdisk
containerDisk:
image: kubevirt/cirros-container-disk-demo:latest
status: {}
5 changes: 2 additions & 3 deletions tests/manifests/vmi-replicaset-cirros.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: kubevirt.io/v1alpha2
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachineInstanceReplicaSet
metadata:
creationTimestamp: null
Expand All @@ -20,15 +20,14 @@ spec:
- disk:
bus: virtio
name: containerdisk
volumeName: registryvolume
machine:
type: ""
resources:
requests:
memory: 64M
terminationGracePeriodSeconds: 0
volumes:
- name: registryvolume
- name: containerdisk
containerDisk:
image: kubevirt/cirros-container-disk-demo:latest
status: {}
6 changes: 3 additions & 3 deletions tests/secrets_and_cfgmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ var _ = Describe("Config", func() {

BeforeEach(func() {
configMapName = "configmap-" + uuid.NewRandom().String()
configMapPath = config.GetConfigMapSourcePath(configMapName + "-vol")
configMapPath = config.GetConfigMapSourcePath(configMapName + "-disk")
secretName = "secret-" + uuid.NewRandom().String()
secretPath = config.GetSecretSourcePath(secretName + "-vol")
secretPath = config.GetSecretSourcePath(secretName + "-disk")

config_data := map[string]string{
"config1": "value1",
Expand Down Expand Up @@ -150,7 +150,7 @@ var _ = Describe("Config", func() {

BeforeEach(func() {
secretName = "secret-" + uuid.NewRandom().String()
secretPath = config.GetSecretSourcePath(secretName + "-vol")
secretPath = config.GetSecretSourcePath(secretName + "-disk")

data := map[string]string{
"ssh-privatekey": string(privateKeyBytes),
Expand Down
2 changes: 1 addition & 1 deletion vars/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ List of top level variables.
| cluster| openshift|<ul><li>openshift</li><li>kubernetes</li></ul> |Cluster type to deploy KubeVirt on.|
| namespace|kube-system | |Namespace to create resources.|
| kubevirt_openshift_version | 3.10| <ul><li>3.10</li></ul>|OpenShift cluster version.|
| version |0.12.0-alpha.2|<ul><li>0.12.0-alpha.2</li><li>0.9.6</li><li>0.8.0</li><li>0.7.0</li><li>0.6.0</li><li>0.5.0</li><li>0.4.1</li><li>0.4.0</li><li>0.3.0</li><li>0.2.0</li><li>0.1.0</li></ul>|KubeVirt release version.|
| version |0.13.0|<ul><li>0.13.0</li><li>0.9.6</li><li>0.8.0</li><li>0.7.0</li><li>0.6.0</li><li>0.5.0</li><li>0.4.1</li><li>0.4.0</li><li>0.3.0</li><li>0.2.0</li><li>0.1.0</li></ul>|KubeVirt release version.|
| storage_role | storage-none | <ul><li>storage-none</li><li>storage-demo</li><li>storage-glusterfs</li></ul> | Storage role to install with KubeVirt.|
2 changes: 1 addition & 1 deletion vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ openshift_ansible_dir: "openshift-ansible/"
openshift_playbook_path: "{{ openshift_ansible_dir }}/{{ 'playbooks/byo/config.yml' if kubevirt_openshift_version == '3.7' else 'playbooks/deploy_cluster.yml' }}"

### KubeVirt ###
version: 0.12.0
version: 0.13.0
image_pull_policy: IfNotPresent
deploy_demo: true

Expand Down
1 change: 1 addition & 0 deletions vendor/github.com/go-openapi/jsonpointer/.drone.sec

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions vendor/github.com/go-openapi/jsonpointer/.drone.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 0 additions & 26 deletions vendor/github.com/go-openapi/jsonpointer/.editorconfig

This file was deleted.

13 changes: 13 additions & 0 deletions vendor/github.com/go-openapi/jsonpointer/.pullapprove.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 0 additions & 15 deletions vendor/github.com/go-openapi/jsonpointer/.travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion vendor/github.com/go-openapi/jsonpointer/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a02cc44

Please sign in to comment.