Giter Site home page Giter Site logo

cluster-api-provider-kind's Introduction

Infrastructure Engineer / SCM / SRE

  • Building and Kicking infrastructures since 2007
  • In love with automation and self-healing systems

OS OS Editor HomeManager PGP PGP

GitOps Certified - Fundamentals GitOps Certified - Scale

Python Go Nix git github Terraform pulumi Kubernetes AWS GCP Azure

cluster-api-provider-kind's People

Contributors

mbovo avatar

Stargazers

 avatar

Watchers

 avatar  avatar

cluster-api-provider-kind's Issues

Reconcile logic: create/delete cluster

Implement a reconcile logic able to create/delete KinD clusters from local host using kind binary

This will highlight potential problems when sync with CAPI Cluster resource and its status

Bump api versions to v1beta1

Current clusterctl version is compatible only with v1beta1 providers:

Using configuration File="/Users/manuel.bovo/.cluster-api/clusterctl.yaml"
Fetching providers
Fetching File="core-components.yaml" Provider="cluster-api" Type="CoreProvider" Version="v1.2.4"
Fetching File="bootstrap-components.yaml" Provider="kubeadm" Type="BootstrapProvider" Version="v1.2.4"
Fetching File="control-plane-components.yaml" Provider="kubeadm" Type="ControlPlaneProvider" Version="v1.2.4"
Fetching File="infrastructure-components.yaml" Provider="kind" Type="InfrastructureProvider" Version="v0.1.0"
Fetching File="metadata.yaml" Provider="cluster-api" Type="CoreProvider" Version="v1.2.4"
Fetching File="metadata.yaml" Provider="kubeadm" Type="BootstrapProvider" Version="v1.2.4"
Fetching File="metadata.yaml" Provider="kubeadm" Type="ControlPlaneProvider" Version="v1.2.4"
Fetching File="metadata.yaml" Provider="kind" Type="InfrastructureProvider" Version="v0.1.0"
Error: current version of clusterctl is only compatible with v1beta1 providers, detected v1alpha1 for provider infrastructure-kind```

Current clusterctl version:

clusterctl version
clusterctl version: &version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.4", GitCommit:"8b5cd363e11b023c2b67a1937a2af680ead9e35c", GitTreeState:"clean", BuildDate:"2022-10-17T13:42:12Z", GoVersion:"go1.18.7", Compiler:"gc", Platform:"darwin/amd64"}


Solution: bump KindCluster api version

Register all CustomResources to Scheme

1.6668594812303958e+09	INFO	controller-runtime.metrics	Metrics server is starting to listen	{"addr": ":8080"}
1.6668594812309802e+09	INFO	setup	starting manager
1.666859481231113e+09	INFO	Starting server	{"kind": "health probe", "addr": "[::]:8081"}
1.6668594812311199e+09	INFO	Starting server	{"path": "/metrics", "kind": "metrics", "addr": "[::]:8080"}
1.666859481231178e+09	INFO	Starting EventSource	{"controller": "kindcluster", "controllerGroup": "infrastructure.cluster.x-k8s.io", "controllerKind": "KindCluster", "source": "kind source: *v1beta1.KindCluster"}
1.666859481231207e+09	INFO	Starting EventSource	{"controller": "kindcluster", "controllerGroup": "infrastructure.cluster.x-k8s.io", "controllerKind": "KindCluster", "source": "kind source: *v1beta1.Cluster"}
1.6668594812312121e+09	INFO	Starting Controller	{"controller": "kindcluster", "controllerGroup": "infrastructure.cluster.x-k8s.io", "controllerKind": "KindCluster"}
1.666859481231225e+09	ERROR	controller-runtime.source	kind must be registered to the Scheme	{"error": "no kind is registered for the type v1beta1.Cluster in scheme \"pkg/runtime/scheme.go:100\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
	/Users/manuel.bovo/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/source/source.go:142
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
	/Users/manuel.bovo/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.poll
	/Users/manuel.bovo/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:582
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
	/Users/manuel.bovo/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
	/Users/manuel.bovo/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/source/source.go:132
^C1.666859485340291e+09	INFO	Stopping and waiting for non leader election runnables

Use KinD as Lib

Currently we are using exec and the kind binary to create/delete clusters.
This is pretty ugly, inefficient and make us to depend to an pre-installed kind binary on the controller container image.

Using kind library will avoid all of this

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.