From b16086f2fcc7374c2cc5ba6fea0d3a6c61980cf4 Mon Sep 17 00:00:00 2001 From: Ondra Machacek Date: Wed, 12 Aug 2020 07:24:59 +0200 Subject: [PATCH] Release v0.2.0 Signed-off-by: Ondra Machacek --- Makefile | 2 +- README.md | 4 +- .../vm-import-operator/v0.2.0/namespace.yaml | 5 + .../vm-import-operator/v0.2.0/operator.yaml | 201 ++++++++++++++++++ ...-operator.0.2.0.clusterserviceversion.yaml | 187 ++++++++++++++++ .../v0.2.0/vmimportconfig_cr.yaml | 7 + version/description | 60 ++---- version/version.go | 2 +- 8 files changed, 426 insertions(+), 42 deletions(-) create mode 100644 manifests/vm-import-operator/v0.2.0/namespace.yaml create mode 100644 manifests/vm-import-operator/v0.2.0/operator.yaml create mode 100644 manifests/vm-import-operator/v0.2.0/vm-import-operator.0.2.0.clusterserviceversion.yaml create mode 100644 manifests/vm-import-operator/v0.2.0/vmimportconfig_cr.yaml diff --git a/Makefile b/Makefile index 51088f234..b99daf401 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: fmt check # Always keep the last released version here -VERSION_REPLACES ?= v0.0.4 +VERSION_REPLACES ?= v0.2.0 VERSION ?= v0.0.1 export VERSION := $(VERSION) diff --git a/README.md b/README.md index 3e85a6d2c..e9359d68c 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ TARGET_NAMESPACE=YOUR_DESIRED_NAMESPACE make gen-manifests Deploy vm-import-operator resources: ```bash -kubectl apply -f https://github.com/kubevirt/vm-import-operator/releases/download/v0.0.4/operator.yaml -kubectl apply -f https://github.com/kubevirt/vm-import-operator/releases/download/v0.0.4/vmimportconfig_cr.yaml +kubectl apply -f https://github.com/kubevirt/vm-import-operator/releases/download/v0.2.0/operator.yaml +kubectl apply -f https://github.com/kubevirt/vm-import-operator/releases/download/v0.2.0/vmimportconfig_cr.yaml ``` # Import virtual machine from oVirt diff --git a/manifests/vm-import-operator/v0.2.0/namespace.yaml b/manifests/vm-import-operator/v0.2.0/namespace.yaml new file mode 100644 index 000000000..fd9fad633 --- /dev/null +++ b/manifests/vm-import-operator/v0.2.0/namespace.yaml @@ -0,0 +1,5 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: kubevirt-hyperconverged diff --git a/manifests/vm-import-operator/v0.2.0/operator.yaml b/manifests/vm-import-operator/v0.2.0/operator.yaml new file mode 100644 index 000000000..b66da9be4 --- /dev/null +++ b/manifests/vm-import-operator/v0.2.0/operator.yaml @@ -0,0 +1,201 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: + operator.v2v.kubevirt.io: "" + name: vmimportconfigs.v2v.kubevirt.io +spec: + group: v2v.kubevirt.io + names: + categories: + - all + kind: VMImportConfig + listKind: VMImportConfigList + plural: vmimportconfigs + singular: vmimportconfig + scope: Cluster + versions: + - name: v1beta1 + served: true + storage: true + subresources: + status: {} + schema: + openAPIV3Schema: + description: VMImportConfig is the Schema for the vmimportconfigs API + properties: + apiVersion: + description: APIVersion defines the versioned schema of this representation + of an object + type: string + kind: + description: Kind is a string value representing the REST resource this + object represents + type: string + metadata: + type: object + spec: + description: VMImportConfigSpec defines the desired state of VMImportConfig + properties: + imagePullPolicy: + description: "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images" + enum: + - Always + - IfNotPresent + - Never + type: string + type: object + status: + description: VMImportConfigStatus defines the observed state of VMImportConfig + properties: + conditions: + description: A list of current conditions of the VMImportConfig resource + items: + properties: + lastHeartbeatTime: + description: Last time the state of the condition was checked + format: date-time + type: string + lastTransitionTime: + description: Last time the state of the condition changed + format: date-time + type: string + message: + description: Message related to the last condition change + type: string + reason: + description: Reason the last condition changed + type: string + status: + description: Current status of the condition, True, False, Unknown + type: string + type: object + type: array + observedVersion: + description: The observed version of the VMImportConfig resource + type: string + operatorVersion: + description: The version of the VMImportConfig resource as defined by + the operator + type: string + targetVersion: + description: The desired version of the VMImportConfig resource + type: string + type: object + type: object +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: vm-import-operator + namespace: kubevirt-hyperconverged + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: vm-import-operator +rules: +- apiGroups: + - "" + resources: + - pods + - events + - configmaps + - secrets + - serviceaccounts + - services + verbs: + - '*' +- apiGroups: + - apps + resources: + - deployments + - deployments/finalizers + verbs: + - '*' +- apiGroups: + - v2v.kubevirt.io + resources: + - vmimportconfigs + - vmimportconfigs/finalizers + - vmimportconfigs/status + verbs: + - '*' +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - '*' +- apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings + - clusterroles + verbs: + - '*' +- apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - '*' +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: vm-import-operator +roleRef: + kind: ClusterRole + name: vm-import-operator + apiGroup: rbac.authorization.k8s.io +subjects: +- kind: ServiceAccount + name: vm-import-operator + namespace: kubevirt-hyperconverged + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: vm-import-operator + namespace: kubevirt-hyperconverged +spec: + replicas: 1 + selector: + matchLabels: + name: vm-import-operator + template: + metadata: + labels: + name: vm-import-operator + spec: + serviceAccountName: vm-import-operator + containers: + - name: vm-import-operator + # Replace this with the built image name + image: quay.io/omachace/vm-import-operator:latest + command: + - vm-import-operator + imagePullPolicy: Always + env: + - name: WATCH_NAMESPACE + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: OPERATOR_NAME + value: "vm-import-operator" + - name: DEPLOY_CLUSTER_RESOURCES + value: "true" + - name: OPERATOR_VERSION + value: latest + - name: CONTROLLER_IMAGE + value: quay.io/omachace/vm-import-controller:latest + - name: PULL_POLICY + value: Always + - name: MONITORING_NAMESPACE + value: openshift-monitoring diff --git a/manifests/vm-import-operator/v0.2.0/vm-import-operator.0.2.0.clusterserviceversion.yaml b/manifests/vm-import-operator/v0.2.0/vm-import-operator.0.2.0.clusterserviceversion.yaml new file mode 100644 index 000000000..0b97139b2 --- /dev/null +++ b/manifests/vm-import-operator/v0.2.0/vm-import-operator.0.2.0.clusterserviceversion.yaml @@ -0,0 +1,187 @@ +--- +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: |2- + + [ + { + "apiVersion":"v2v.kubevirt.io/v1beta1", + "kind":"VMImportConfig", + "metadata": { + "name":"vm-import-operator-config" + }, + "spec": { + "imagePullPolicy":"IfNotPresent" + } + } + ] + capabilities: Virtual Machine Import + categories: Import,Virtualization, RHV + name: vm-import-operator.0.2.0 + namespace: kubevirt-hyperconverged +spec: + apiservicedefinitions: {} + customresourcedefinitions: + owned: + - description: Represents a virtual machine import config + displayName: Virtual Machine import config + kind: VMImportConfig + name: vmimportconfigs.v2v.kubevirt.io + specDescriptors: + - description: The ImageRegistry to use for vm import. + displayName: ImageRegistry + path: imageRegistry + x-descriptors: + - urn:alm:descriptor:text + - description: The ImageTag to use for vm import. + displayName: ImageTag + path: imageTag + x-descriptors: + - urn:alm:descriptor:text + - description: The ImagePullPolicy to use for vm import. + displayName: ImagePullPolicy + path: imagePullPolicy + x-descriptors: + - urn:alm:descriptor:io.kubernetes:imagePullPolicy + statusDescriptors: + - description: The deployment phase. + displayName: Phase + path: phase + x-descriptors: + - urn:alm:descriptor:io.kubernetes.phase + - description: Explanation for the current status of the vm import deployment. + displayName: Conditions + path: conditions + x-descriptors: + - urn:alm:descriptor:io.kubernetes.conditions + - description: The observed version of the vm import deployment. + displayName: Observed vm import Version + path: observedVersion + x-descriptors: + - urn:alm:descriptor:text + - description: The targeted version of the vm import deployment. + displayName: Target vm import Version + path: targetVersion + x-descriptors: + - urn:alm:descriptor:text + - description: The version of the vm import Operator + displayName: Vm import Operator Version + path: operatorVersion + x-descriptors: + - urn:alm:descriptor:text + version: v1beta1 + description: VM import operator provides ability to import virtual machines from other infrastructure like oVirt/RHV + displayName: VM import operator + install: + spec: + clusterPermissions: + - rules: + - apiGroups: + - "" + resources: + - pods + - events + - configmaps + - secrets + - serviceaccounts + verbs: + - '*' + - apiGroups: + - apps + resources: + - deployments + - deployments/finalizers + verbs: + - '*' + - apiGroups: + - v2v.kubevirt.io + resources: + - vmimportconfigs + - vmimportconfigs/finalizers + - vmimportconfigs/status + verbs: + - '*' + - apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - '*' + - apiGroups: + - rbac.authorization.k8s.io + resources: + - clusterrolebindings + - clusterroles + verbs: + - '*' + serviceAccountName: vm-import-operator + deployments: + - name: vm-import-operator + spec: + replicas: 1 + selector: + matchLabels: + name: vm-import-operator + operator.v2v.kubevirt.io: "" + strategy: {} + template: + metadata: + labels: + name: vm-import-operator + operator.v2v.kubevirt.io: "" + spec: + containers: + - env: + - name: DEPLOY_CLUSTER_RESOURCES + value: "true" + - name: OPERATOR_VERSION + value: latest + - name: CONTROLLER_IMAGE + value: quay.io/omachace/vm-import-controller:latest + - name: PULL_POLICY + value: Always + - name: WATCH_NAMESPACE + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + image: quay.io/omachace/vm-import-operator:latest + imagePullPolicy: Always + name: vm-import-operator + resources: {} + securityContext: + runAsNonRoot: true + serviceAccountName: vm-import-operator + strategy: deployment + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: true + type: AllNamespaces + keywords: + - Import + - Virtualization + - oVirt + - RHV + labels: + operated-by: vm-import-operator + links: + - name: VM import operator + url: https://github.com/kubevirt/vm-import-operator/blob/master/README.md + - name: Source Code + url: https://github.com/kubevirt/vm-import-operator + maintainers: + - email: kubevirt-dev@googlegroups.com + name: KubeVirt project + maturity: alpha + provider: + name: KubeVirt project + replaces: 0.2.0 + selector: + matchLabels: + operated-by: vm-import-operator + version: 0.2.0 diff --git a/manifests/vm-import-operator/v0.2.0/vmimportconfig_cr.yaml b/manifests/vm-import-operator/v0.2.0/vmimportconfig_cr.yaml new file mode 100644 index 000000000..317f7fd65 --- /dev/null +++ b/manifests/vm-import-operator/v0.2.0/vmimportconfig_cr.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: v2v.kubevirt.io/v1beta1 +kind: VMImportConfig +metadata: + name: vm-import-operator-config +spec: + imagePullPolicy: IfNotPresent diff --git a/version/description b/version/description index c825ebbf7..f787ed5e8 100644 --- a/version/description +++ b/version/description @@ -1,42 +1,26 @@ -v0.0.4 +v0.2.0 -Features: -* CNV-5368: Failing import when template is not found and proper feature gate is not enabled -* Propagate env variables to vm-import-controller -* Check disk status before import -* Refactor importDisks method -* Remove non-cluster roles and rolebindings from cleanup logic - -Tests: -* Allow user to specify storage classes for tests Fixes #318 -* Using kubevirt install namespace passed in the test run arguments. Fixes #317 -* Add nfs storage to automation -* Pinning kubevirtci version -* Parallel import of two VMs functional test -* Re-enabled assertion checking MAC address of the VM instance -* Sequential import of two VMs functional tests -* VM import CR removal after successful import - e2e test -* Functional test for source VM that wouldn't go down -* Running VM import functional test -* Updated fakeovirt API dependency -* Functional tests for failed resource mapping validation -* Negative import test cases -* Increased BeRunning matcher timeout and added meaningful information to the failure message +Release v0.2.0 -Bugs: -* Do not requeue new request if provider init failed -* Allowing for VMs to have Windows-specific UTC-compatible timezonesFixes https://bugzilla.redhat.com/show_bug.cgi\?id\=1852446 -* Recover from oVirt client panic -* Block import with more than one source network mapped to a pod network -* Set PVC accessMode based on source VM -* Network resource mapping type validation hardening -* Using pod network type when type is missing in the mapping. Fixed #301 -* Make sure DVs od VM import are correct -* DedicatedCPUPlacement should be set to true for exact pinning. Fixed #269 +Features: +* Allow to import vms using i440fx bios +* Use controller config to configure custom os mapping +* Add pending condition +* Enable SROIV +* Introducing Controller Config +* Add Valid condition warning when default storage class is about to be used +* Extract common parts from the KubeVirt config support +* Bump API to version v1beta1 +* Move to v1 apiextension API +* Using direct server API client to get data before updating slices in status +* Add support for block volumes +* API-level validation for spec.targetVmName - max length: 63 +* Failing import when there are any problems related to DV creation +* Shortening target VM name to 63 characters +* Add reason of timeout error to tests +* Add metric kubevirt_vmimport +* Add Vmware Client +* Restore source vm status when import cancelled Docs: -* Update documentation -* New various functional test cases definitions -* New negative test cases descriptions -* Update examples -* Align namespace in examples +* Update documentation to include VMware examples diff --git a/version/version.go b/version/version.go index 6102f68d5..12c71aa7a 100644 --- a/version/version.go +++ b/version/version.go @@ -2,5 +2,5 @@ package version var ( // Version represents the version of the operator - Version = "v0.0.4" + Version = "v0.2.0" )