Giter Club home page Giter Club logo

cluster-api-provider-kubevirt's Introduction

OpenShift cluster-api-provider-kubevirt

This repository hosts an implementation of a provider for KubeVirt for the OpenShift machine-api.

This provider runs as a machine-controller deployed by the machine-api-operator

Build the code

  1. If needed run make generate to re-generate auto generated files

  2. If needed, run make vendor to sync all imports in go.mod file and in vendor directory

  3. To build the project, run make build

Create and deploy image

TODO

Test locally built KubeVirt actuator

  1. Prepare The Openshift Cluster

    Two options:

    1. Use Openshift cluster
      In order to be able remove machine-controller container from machine-api-controllers deployment, need to remove machine-api-operator and openshift-cluster-version pods from the cluster, by decresing their replicacount in the deployments to zero:

      oc scale --replicas 0 -n openshift-cluster-version deployments/cluster-version-operator\
      oc scale --replicas 0 -n openshift-machine-api deployments/machine-api-operator\
    2. Use CRC cluster

      Create CRC cluster, using the following instructions:
      https://code-ready.github.io/crc/#introducing-codeready-containers_gsg\

      In the CRC, several operators have been disabled to lower the resource usage, machine-api-operator and openshift-cluster-version are among those operator, therefore, in order to deploy machine-api-controllers in the cluster, run machine-api-operator locally on your machine, using the instructions under:
      https://github.com/openshift/machine-api-operator#dev

  2. Tear down machine-controller

    Deployed machine API plane (machine-api-controllers deployment) is (among other controllers) running machine-controller.
    In order to run locally built one, simply edit machine-api-controllers deployment and remove machine-controller container from it.

  3. Deploy secret with the infra-cluster kubeconfig

    KubeVirt actuator assumes existence of a secret created from kubeconfig file.
    If needed, generate the secret using the following command:

    oc -n openshift-machine-api create secret generic infracluster-kubeconfig-config --from-file=kubeconfig=$KUBECONFIG
  4. Create PVC template

    KubeVirt actuator assumes existence of a pvc template.
    If needed, generate it using the following command:

    oc create -f examples/pvc-from-url-rhcos.yaml
  5. Build and run KubeVirt actuator outside of the cluster

    $ make build
    $ ./bin/machine-controller-manager --kubeconfig $KUBECONFIG --logtostderr -v 5 -alsologtostderr

cluster-api-provider-kubevirt's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.