Skip to content

[Deprecated] As this capability has been built into clusterctl. This a tool to generate yaml files for Cluster-API and necessary providers.

License

Notifications You must be signed in to change notification settings

ashish-amarnath/capi-yaml-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

[Deprecated] As this capability has been built into clusterctl. This a tool to generate yaml files for Cluster-API and necessary providers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages