cluster-api-provider-ovirt

module
v0.1.1-0...-abb91c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: Apache-2.0

README

cluster-api-provider-ovirt

https://github.com/oVirt/cluster-api-provider-ovirt

Implementation of the oVirt provider for the [cluster-api project] version v1beta
using openshift/cluster-api-provider api, which implements the machine actuator.

Development

Fast development cycle is to build the binarties, manager and machine-controller-manager
and run those against a running cluster kubeconfig.

Build

The following make targets are provided:

# build the binary
make build  

# build the image
make images
Code Generation

On any changes in the specification, run

make generate

to automatically generate the new CustomResourceDefinitions for oVirt.

Testing

Run all tests together via

make test
Unit Testing

Unit tests are marked with the build tag

//go:build unit

and can be run via

make test-unit
Functional Testing

Functional (or integration) tests for the cluster-api-provider-ovirt are based on [envtest] instead of a real cluser. For more information, refer to The Cluster API Book on integration tests.

The necessary tooling can be fetched and installed via

sh ./hack/envtest-tools.sh && fetch_tools && setup_env

Functional (or integration) tests are marked with the build tag

//go:build functional

and can be run via

make test-functional
Testing on OpenShift cluster

In contrast to local unit testing and functional testing, building and deploying the changed cluster-api-provider-ovirt to a running OpenShift cluster helps manually verifying the expected behavior of the component end to end.

For detailed instructions on how to exchange the predefined provider see ./docs/custom-capo.md.

Run the components locally

$ export KUBECONFIG=path/to/kubecofig

$  bin/manager &

$  bin/machine-controller-manager --namespace openshift-machine-api --metrics-addr=:8888 &

Directories

Path Synopsis
cmd
pkg
apis
Package apis contains Kubernetes API groups.
Package apis contains Kubernetes API groups.
apis/ovirtprovider/v1beta1
+k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/rgolangh/cluster-api/cluster-api-provider-ovirt/pkg/apis/ovirtprovider +k8s:openapi-gen=true +k8s:defaulter-gen=TypeMeta +groupName=ovirtproviderconfig.machine.openshift.io
+k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/rgolangh/cluster-api/cluster-api-provider-ovirt/pkg/apis/ovirtprovider +k8s:openapi-gen=true +k8s:defaulter-gen=TypeMeta +groupName=ovirtproviderconfig.machine.openshift.io

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL