Skip to content

gofed/cluster-api-provider-kubemark

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes cluster-api-provider-kubemark Project

This repository hosts an implementation of a provider for Kubemark for the cluster-api project.

Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the community page.

You can reach the maintainers of this project at:

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.

How to build the images in the RH infrastructure

The Dockerfiles use as builder in the FROM instruction which is not currently supported by the RH's docker fork (see kubernetes-sigs/kubebuilder#268). One needs to run the imagebuilder command instead of the docker build.

Note: this info is RH only, it needs to be backported every time the README.md is synced with the upstream one.

How to deploy and test the machine controller with minikube

  1. Install kvm

    Depending on your virtualization manager you can choose a different driver. In order to install kvm, you can run (as described in the drivers documentation):

    $ sudo yum install libvirt-daemon-kvm qemu-kvm libvirt-daemon-config-network
    $ systemctl start libvirtd
    $ sudo usermod -a -G libvirt $(whoami)
    $ newgrp libvirt

    To install to kvm2 driver:

    curl -Lo docker-machine-driver-kvm2 https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 \
    && chmod +x docker-machine-driver-kvm2 \
    && sudo cp docker-machine-driver-kvm2 /usr/local/bin/ \
    && rm docker-machine-driver-kvm2
  2. Deploying the cluster

    To install minikube v0.30.0, you can run:

    $ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.30.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
    

    To deploy the cluster:

    # minikube start --vm-driver kvm2 --kubernetes-version v1.11.3 --v 5
    
  3. Deploying the cluster-api stack manifests

    $ cd config/default && kustomize build | kubectl apply --validate=false -f -

Provider config

Currently the kubemark actuator allows to configure the following test scenarios:

  • have a node report Unready status (e.g. for 5s), then Ready (e.g. for the next 40s) and again (periodically):

    apiVersion: kubemarkproviderconfig.k8s.io/v1alpha1
    kind: KubemarkMachineProviderConfig
    unhealthyDuration: 5s
    healthyDuration: 40s
    turnUnhealthyPeriodically: true
  • have a node report Unready status (e.g. 40s after kubelet startup) indefinitely:

    apiVersion: kubemarkproviderconfig.k8s.io/v1alpha1
    kind: KubemarkMachineProviderConfig
    unhealthyDuration: 40s
    turnUnhealthyAfter: true

Kubemark

The provided kubemark (through gofed/kubemark-machine-controllers:d4f6edb) is slightly updated version of the kubemark. The list of PRs that allow kubemark to force kubelet to have node go Unready and/or back.

Upstream PRs:

How to build the kubemark image

  1. Clone k8s.io/kubernetes repo under $GOPATH/src/k8s.io/kubernetes
  2. Checkout to required version (e.g. $ git checkout v1.11.3)
  3. Apply the PRs (and rebase if needed)
  4. Run make WHAT="cmd/kubemark"
  5. $ cp _output/bin/kubemark cluster/images/kubemark/
  6. cd cluster/images/kubemark/
  7. Build docker image: make build REGISTRY=... IMAGE_TAG=...
  8. Push the docker image to registry: docker push $REGISTRY/

About

Cluster API implementation for Kubemark

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 90.6%
  • Makefile 5.0%
  • Shell 3.0%
  • Dockerfile 1.4%