diff --git a/Makefile b/Makefile index ddcb92b1e..884b2b628 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: fmt check # Always keep the last released version here -VERSION_REPLACES ?= v0.0.2 +VERSION_REPLACES ?= v0.0.3 VERSION ?= v0.0.1 export VERSION := $(VERSION) diff --git a/README.md b/README.md index a7bc46e20..d9c35b315 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.2/operator.yaml -kubectl apply -f https://github.com/kubevirt/vm-import-operator/releases/download/v0.0.2/vmimportconfig_cr.yaml +kubectl apply -f https://github.com/kubevirt/vm-import-operator/releases/download/v0.0.3/operator.yaml +kubectl apply -f https://github.com/kubevirt/vm-import-operator/releases/download/v0.0.3/vmimportconfig_cr.yaml ``` # Import virtual machine from oVirt diff --git a/manifests/vm-import-operator/v0.0.3/namespace.yaml b/manifests/vm-import-operator/v0.0.3/namespace.yaml new file mode 100644 index 000000000..fd9fad633 --- /dev/null +++ b/manifests/vm-import-operator/v0.0.3/namespace.yaml @@ -0,0 +1,5 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: kubevirt-hyperconverged diff --git a/manifests/vm-import-operator/v0.0.3/operator.yaml b/manifests/vm-import-operator/v0.0.3/operator.yaml new file mode 100644 index 000000000..f8b9aaac6 --- /dev/null +++ b/manifests/vm-import-operator/v0.0.3/operator.yaml @@ -0,0 +1,195 @@ +--- +apiVersion: apiextensions.k8s.io/v1beta1 +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 + subresources: + status: {} + validation: + 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: + 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 + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true + +--- +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 + 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: + - '*' +--- +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/kubevirt/vm-import-operator:v0.0.3 + 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: OS_CONFIGMAP_NAME + - name: OS_CONFIGMAP_NAMESPACE + - name: DEPLOY_CLUSTER_RESOURCES + value: "true" + - name: OPERATOR_VERSION + value: v0.0.3 + - name: CONTROLLER_IMAGE + value: quay.io/kubevirt/vm-import-controller:v0.0.3 + - name: PULL_POLICY + value: Always diff --git a/manifests/vm-import-operator/v0.0.3/vm-import-operator.0.0.3.clusterserviceversion.yaml b/manifests/vm-import-operator/v0.0.3/vm-import-operator.0.0.3.clusterserviceversion.yaml new file mode 100644 index 000000000..51a7be5a5 --- /dev/null +++ b/manifests/vm-import-operator/v0.0.3/vm-import-operator.0.0.3.clusterserviceversion.yaml @@ -0,0 +1,188 @@ +--- +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: |2- + + [ + { + "apiVersion":"v2v.kubevirt.io/v1alpha1", + "kind":"VMImportConfig", + "metadata": { + "name":"vm-import-operator-config" + }, + "spec": { + "imagePullPolicy":"IfNotPresent" + } + } + ] + capabilities: Virtual Machine Import + categories: Import,Virtualization, RHV + name: vm-import-operator.0.0.3 + 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: v1alpha1 + 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: v0.0.3 + - name: CONTROLLER_IMAGE + value: quay.io/kubevirt/vm-import-controller:v0.0.3 + - name: PULL_POLICY + value: Always + - name: WATCH_NAMESPACE + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + image: quay.io/kubevirt/vm-import-operator:v0.0.3 + 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.0.2 + selector: + matchLabels: + operated-by: vm-import-operator + version: 0.0.3 diff --git a/manifests/vm-import-operator/v0.0.3/vmimportconfig_cr.yaml b/manifests/vm-import-operator/v0.0.3/vmimportconfig_cr.yaml new file mode 100644 index 000000000..6732ede89 --- /dev/null +++ b/manifests/vm-import-operator/v0.0.3/vmimportconfig_cr.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: v2v.kubevirt.io/v1alpha1 +kind: VMImportConfig +metadata: + name: vm-import-operator-config +spec: + imagePullPolicy: IfNotPresent \ No newline at end of file diff --git a/version/description b/version/description index c7e58a9a8..44bbf1c8b 100644 --- a/version/description +++ b/version/description @@ -1,55 +1,33 @@ -v0.0.2 - -* Added vm-import-operator to manage the lifecycle of - vm-import-controller deployment using VmImportConfig CR. -* CRDs and controller resources are generated by code +v0.0.3 Features: -* hco: install controller -* Allow user to override OS Map -* Generate CRDs for CSV-Generator -* hco: add vmimport config cr -* Add events emitting -* Add CSV Generator -* Adding tablet input device when VNC is enabled -* Use vNIC Profile as source network mappings for oVirt -* Generating clients in build Fixes #156 -* Update vm import progress reflect dv import +* Propagate label for tracking created resources +* Set unique data-volume name +* Added information about resource mapping resolution and defaults for storage +* Reduce restrictions on target in mappings +* Add vm description +* Update network mapping value for ovirt +* Taking into account eventual consistency for dependencies removal +* Update owned CRD in CSV +* Watch for failures of the disk import -Bugs: -* Set correct ns when creating serviceMonitor -* Remove duplicated policy rule -* Add missing permissions -* Update watched types by vm-import-controller -* Update RBAC for vm-import-operator -* Add missing env-variables to operator -* Adding k8s.cni.cncf.io/network-attachment-definitions privileges. Fixes #205 -* 'latest' is not a semver and cannot be used with csv-generator -* Adding owner reference to temporary secret and config map. Fixes #176 -* Fixing possible panic while accessing placement policy -* Add template namespace label to the created VM -* Removed superfluous config and providers +Tests: +* CPU pinning functional test +* Install kubevirt templates for ocp tests +* Add debugging to fail test provision infra +* 'migratable' placement policy affinity and LiveMigration feature gate enabled e2e test +* Simple positive e2e tests. BIOS Type mapping fix +* Refactored VM validation tests to use more general template files +* Functional tests for invalid image +* Timezone validation e2e tests and fix +* Bump default k8s version to 1.18 +* Defined new VM configuration-related e2e test cases +* Using dynamic stubbing in all the functional tests +* Moved functional tests dedicated to oVirt VM provider to a separate directory +* VM Storage validation functional tests +* Networking tests - Refactored to use stubbing - Added multus+pod networks VM test - Added multus+multus networks VM test +* Functional tests for VM validation Docs: -* Added docs/developers.md -* Add verbs for building operator and controller -* Add steps for using user OS Map -* Functional testing documentation - -Tests: -* operator: add unit tests -* Functional test for VM with multus network -* Silent the wget output -* Don't use sudo in test scripts -* Use upstream golang in tests -* Functional tests for VM with more than one disk -* Install golang during up.sh -* Extend test for os-map-provider -* Resource mapping tests -* Added NIC failed validation e2e tests -* Use master of kubevirtci repo for tests -* Added functional test for import cancellation. Fixes #176 -* Install fakeovirt and imageio during test -* Use kubevirtci project for tests -* Networked VM e2e tests -* Basic e2e tests framework package has been based on CDI's test framework +* Add contribution guidelines +* Add CODE_OF_CONDUCT diff --git a/version/version.go b/version/version.go index 9875a09e4..81c2145b9 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.2" + Version = "v0.0.3" )