cluster-api-provider-kubemark

module
v0.0.0-...-c897598 Latest Latest
Warning

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

Go to latest
Published: May 24, 2019 License: Apache-2.0

README

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 https://github.com/kubernetes-sigs/kubebuilder/issues/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/

Directories

Path Synopsis
cmd
pkg
apis/kubemarkproviderconfig/v1beta1
Package v1beta1 contains API Schema definitions for the kubemarkproviderconfig v1beta1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/openshift/cluster-api-provider-kubemark/pkg/apis/kubemarkproviderconfig +k8s:defaulter-gen=TypeMeta +groupName=kubemarkproviderconfig.k8s.io
Package v1beta1 contains API Schema definitions for the kubemarkproviderconfig v1beta1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/openshift/cluster-api-provider-kubemark/pkg/apis/kubemarkproviderconfig +k8s:defaulter-gen=TypeMeta +groupName=kubemarkproviderconfig.k8s.io
test
e2e

Jump to

Keyboard shortcuts

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