Giter Club home page Giter Club logo

capi-yaml-gen's Introduction

capi-yaml

Developer tool to generate yaml for Cluster-API and necessary provider resources.

Read more about this here

Usage Examples

Docker Infrastructure and Kubeadm Bootstrap Providerrs

  • InfraProvider: Docker
  • BootstrapProvider: Kubeadm
  • KubernetesVersion: v1.14.2
  • ControlPlaneMachineCount: 3
  • WorkerMachineCountt: 1
$ go run main.go generate --controlplane-count 3
# yaml written to stdout

AWS Infrastructure and Kubeadm Bootstrap Providers

  • InfraProvider: AWS
  • BootstrapProvider: Kubeadm
  • KubernetesVersion: v1.14.2
  • ControlPlaneMachineCount: 3
  • WorkerMachineCountt: 1
$ go run main.go generate --control-plane-count 3 --infrastructure-provider aws
# yaml written to stdout

MachineDeployments

By default workers will be managed by a MachineDeployment. If you do not want this behavior set the --generate-machined-deployment flag to false like this:

go run main.go generate --generate-machine-deployment=false

Customizations

Some providers require fields custom to each user. We provider some default values that can be overridden by setting appropriate environment variables. For instance, if you do not have any environment variables set and you select the aws provider, you will be greeted with a message that looks something like this:

Consider setting these default values and rerunning.
If you do not want to interpolate the values, rerun with the --allow-empty-env-vars flag.

export REGION=us-west-2
export SSH_KEY_NAME=default
export CONTROL_PLANE_INSTANCE_TYPE=t2.medium

You can customize the environment variables for your use case. If you're just looking for some YAML to modify by hand and don't want to supply any values you can use the --allow-empty-env-vars flag to skip verification. This will interpolate all environment variables you have set and ignore ones you do not have set.

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.