Code Monkey home page Code Monkey logo

cluster-api-bootstrap-provider-talos's Introduction

cluster-api-bootstrap-provider-talos

Intro

The Cluster API Bootstrap Provider Talos (CABPT) is a project by Talos Systems that provides a Cluster API(CAPI) bootstrap provider for use in deploying Talos-based Kubernetes nodes across any environment. Given some basic info, this provider will generate bootstrap configurations for a given machine and reconcile the necessary custom resources for CAPI to pick up the generated data.

Corequisites

There are a few corequisites and assumptions that go into using this project:

Building and Installing

This project can be built simply by running make release from the root directory. Doing so will create a file called _out/bootstrap-components.yaml. If you wish, you can tweak settings by editing the release yaml. This file can then be installed into your management cluster with kubectl apply -f _out/bootstrap-components.yaml.

Note that CABPT should be deployed as part of a set of controllers for Cluster API. You will need at least the upstream CAPI components and an infrastructure provider for v1alpha2 CAPI capabilities.

Usage

CAPM supports a single API type, a TalosConfig. You can create YAML definitions of a TalosConfig and kubectl apply them as part of a larger CAPI cluster deployment. Below is a bare-minimum example.

A basic config:

apiVersion: bootstrap.cluster.x-k8s.io/v1alpha2
kind: TalosConfig
metadata:
  name: talos-0
  labels:
    cluster.x-k8s.io/cluster-name: talos
spec:
  generateType: init

Note the generateType mentioned above. This is a required value in the spec for a TalosConfig. For a no-frills bootstrap config, you can simply specify init, controlplane, or worker depending on what type of Talos node this is. When creating a TalosConfig this way, you can then retrieve the talosconfig file that allows for osctl interaction with your nodes by doing something like kubectl get talosconfig -o yaml talos-0 -o jsonpath='{.status.talosConfig}' after creation.

If you wish to do something more complex, we allow for the ability to supply an entire Talos config file to the resource. This can be done by setting the generateType to none and specifying a data field. This config file can be generated with osctl config generate and the edited to supply the various options you may desire. This full config is blindly copied from the data section of the spec and presented under .status.bootstrapData so that the upstream CAPI controllers can see it and make use.

An example of a more complex config:

apiVersion: bootstrap.cluster.x-k8s.io/v1alpha2
kind: TalosConfig
metadata:
  name: talos-0
  labels:
    cluster.x-k8s.io/cluster-name: talos
spec:
  generateType: none
  data: |
    version: v1alpha1
    machine:
      type: init
      token: xxxxxx
    ...
    ...
    ...

Note that specifying the full config above removes the ability for our bootstrap provider to generate a talosconfig for use. As such, you should keep track of the talosconfig that's generated when running osctl config generate.

cluster-api-bootstrap-provider-talos's People

Contributors

rsmitty avatar andrewrynhard avatar

Watchers

James Cloos 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.