Skip to content

Commit

Permalink
docs: fill the kubebuilder template
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Duarte Barroso <[email protected]>
  • Loading branch information
maiqueb committed Jun 6, 2024
1 parent dd60e5c commit 18594fa
Showing 1 changed file with 27 additions and 29 deletions.
56 changes: 27 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
# kubevirt-ipam-claims
// TODO(user): Add simple overview of use/purpose
This repo provide a KubeVirt extension to create (and manage the lifecycle of)
`IPAMClaim`s on behalf of KubeVirt virtual machines.

## Description
// TODO(user): An in-depth paragraph about your project and overview of use
This project provides a Kubernetes controller and mutating webhook that will
monitor KubeVirt virtual machines.

When it sees a KubeVirt VM being created, it will create an IPAMClaim for the
VM interfaces attached to a network that features the `persistent ips` feature.

It will also mutate the launcher pod where the VM will run to request a
persistent IP from the CNI plugin.

It implements the
[multi-network de-facto standard v1.3](https://github.com/k8snetworkplumbingwg/multi-net-spec/tree/master/v1.3)
IPAM extensions, explicitly the IPAMClaim CRD, and the `ipam-claim-reference`
network selection element attribute, defined in sections 8.2, and 4.1.2.1.11
respectively.

The [OVN-Kubernetes CNI](https://github.com/ovn-org/ovn-kubernetes) is a CNI
that implements this IPAM multi-network standard.

## Getting Started

Expand All @@ -16,7 +33,7 @@
**Build and push your image to the location specified by `IMG`:**

```sh
make docker-build docker-push IMG=<some-registry>/kubevirt-ipam-claims:tag
make docker-build docker-push IMG=<some-registry>/kubevirt-ipam-claims:<tag>
```

**NOTE:** This image ought to be published in the personal registry you specified.
Expand All @@ -32,34 +49,12 @@ make install
**Deploy the Manager to the cluster with the image specified by `IMG`:**

```sh
make deploy IMG=<some-registry>/kubevirt-ipam-claims:tag
make deploy IMG=<some-registry>/kubevirt-ipam-claims:<tag>
```

> **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin
privileges or be logged in as admin.

**Create instances of your solution**
You can apply the samples (examples) from the config/sample:

```sh
kubectl apply -k config/samples/
```

>**NOTE**: Ensure that the samples has default values to test it out.
### To Uninstall
**Delete the instances (CRs) from the cluster:**

```sh
kubectl delete -k config/samples/
```

**Delete the APIs(CRDs) from the cluster:**

```sh
make uninstall
```

**UnDeploy the controller from the cluster:**

```sh
Expand All @@ -73,7 +68,7 @@ Following are the steps to build the installer and distribute this project to us
1. Build the installer for the image built and published in the registry:

```sh
make build-installer IMG=<some-registry>/kubevirt-ipam-claims:tag
make build-installer IMG=<some-registry>/kubevirt-ipam-claims:<tag>
```

NOTE: The makefile target mentioned above generates an 'install.yaml'
Expand All @@ -86,11 +81,14 @@ its dependencies.
Users can just run kubectl apply -f <URL for YAML BUNDLE> to install the project, i.e.:

```sh
kubectl apply -f https://raw.githubusercontent.com/<org>/kubevirt-ipam-claims/<tag or branch>/dist/install.yaml
kubectl apply -f https://raw.githubusercontent.com/maiqueb/kubevirt-ipam-claims/main/dist/install.yaml
```

## Contributing
// TODO(user): Add detailed information on how you would like others to contribute to this project
Currently, there's not much to be said ... Just ensure if you're updating code
to provide unit-tests.

This section will be improved later on.

**NOTE:** Run `make help` for more information on all potential `make` targets

Expand Down

0 comments on commit 18594fa

Please sign in to comment.