util

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Replacements = []Replacement{
		{
			Kind:      "KubeadmControlPlane",
			Name:      "${CLUSTER_NAME}",
			Value:     env.ControlPlaneMachineCountVar,
			FieldPath: []string{"spec", "replicas"},
		},
		{
			Kind:      "MachineDeployment",
			Name:      "${CLUSTER_NAME}-md-0",
			Value:     env.WorkerMachineCountVar,
			FieldPath: []string{"spec", "replicas"},
		},
		{
			Kind:      "MachineDeployment",
			Name:      "${CLUSTER_NAME}-md-0",
			Value:     map[string]interface{}{},
			FieldPath: []string{"spec", "selector", "matchLabels"},
		},
		{
			Kind:      "ICSMachineTemplate",
			Name:      "${CLUSTER_NAME}-control-plane",
			Value:     env.DefaultDiskGiB,
			FieldPath: []string{"spec", "template", "spec", "diskGiB"},
		},
		{
			Kind:      "ICSMachineTemplate",
			Name:      "${CLUSTER_NAME}-control-plane",
			Value:     env.DefaultMemoryMiB,
			FieldPath: []string{"spec", "template", "spec", "memoryMiB"},
		},
		{
			Kind:      "ICSMachineTemplate",
			Name:      "${CLUSTER_NAME}-control-plane",
			Value:     env.DefaultNumCPUs,
			FieldPath: []string{"spec", "template", "spec", "numCPUs"},
		},
		{
			Kind:      "ICSMachineTemplate",
			Name:      "${CLUSTER_NAME}-md-0",
			Value:     env.DefaultDiskGiB,
			FieldPath: []string{"spec", "template", "spec", "diskGiB"},
		},
		{
			Kind:      "ICSMachineTemplate",
			Name:      "${CLUSTER_NAME}-md-0",
			Value:     env.DefaultMemoryMiB,
			FieldPath: []string{"spec", "template", "spec", "memoryMiB"},
		},
		{
			Kind:      "ICSMachineTemplate",
			Name:      "${CLUSTER_NAME}-md-0",
			Value:     env.DefaultNumCPUs,
			FieldPath: []string{"spec", "template", "spec", "numCPUs"},
		},
	}
)

Functions

func GenerateObjectYAML

func GenerateObjectYAML(obj runtime.Object, replacements []Replacement) string

func PrintObjects

func PrintObjects(objs []runtime.Object)

func TypeToKind

func TypeToKind(i interface{}) string

Types

type Replacement

type Replacement struct {
	Kind      string
	Name      string
	Value     interface{}
	FieldPath []string
}

Jump to

Keyboard shortcuts

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