kr8init

package
v0.0.2-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateClusterJsonnet

func GenerateClusterJsonnet(cSpec types.Kr8ClusterSpec, dstDir string) error

Generate a cluster.jsonnet file based on the provided Kr8ClusterSpec and store it in the specified directory.

func GenerateComponentJsonnet

func GenerateComponentJsonnet(componentOptions Kr8InitOptions, dstDir string) error

Generate default component kr8_spec values and store in params.jsonnet. Based on the type:

jsonnet: create a component.jsonnet file and reference it from the params.jsonnet file

yml: leave a note in the params.jsonnet file about where and how the yml files can be referenced

chart: generate a simple taskfile that handles vendoring the chart data

func GenerateLib

func GenerateLib(fetch bool, dstDir string) error

func GenerateReadme

func GenerateReadme(dstDir string, cmdOptions Kr8InitOptions, clusterSpec types.Kr8ClusterSpec) error

Types

type Kr8InitOptions

type Kr8InitOptions struct {
	// URL to fetch the skeleton directory from
	InitUrl string
	// Name of the cluster to initialize
	ClusterName string
	// Name of the component to initialize
	ComponentName string
	// Type of component to initialize (e.g. jsonnet, yml, chart, compose)
	ComponentType string
	// Whether to run in interactive mode or not
	Interactive bool
	// Whether to fetch remote resources or not
	Fetch bool
}

Kr8InitOptions defines the options used by the init subcommands.

Jump to

Keyboard shortcuts

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