creator

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KindClusterConfig

type KindClusterConfig struct {
	Kind       string              `yaml:"kind"`
	ApiVersion string              `yaml:"apiVersion"`
	Nodes      []map[string]string `yaml:"nodes"`
}

type KindCreator

type KindCreator struct {
	LocalWorkDir string
}

func (KindCreator) Create

func (c KindCreator) Create(spec KubernetesClusterSpec, unattendedMode bool)

func (KindCreator) Delete

func (c KindCreator) Delete(name string, unattendedMode bool)

func (KindCreator) Exists

func (c KindCreator) Exists(clustername string) bool

func (KindCreator) GetContext

func (c KindCreator) GetContext(kindClusterName string) string

Returns the context name for the given Kind cluster.

func (KindCreator) Running

func (c KindCreator) Running(clustername string) bool

type KubernetesClusterSpec

type KubernetesClusterSpec struct {
	Name                 string
	NrOfNodes            int
	NodeMemory           string // e.g. '8gb' memory per node
	InfrastructureRegion string
}

func (KubernetesClusterSpec) String

func (s KubernetesClusterSpec) String() string

type KubernetesCreator

type KubernetesCreator interface {

	/*
		Creates a Kubernetes cluster
	*/
	Create(spec KubernetesClusterSpec, unattendedMode bool)

	/*
		Checks whether a Kubernetes cluster exists.
		Existence means that a Kubernetes cluster resource is available.
		It does verify whether the cluster is running.
	*/
	Exists(clustername string) bool

	/*
		Checks whether the Kubernetes cluster is running by checking whether
		the Kubernetes cluster API is available.
		Does not verfiy whether the cluster in healthy.
	*/
	Running(clustername string) bool
	Delete(clustername string, unattendedMode bool)

	/*
		Returns the context for a given clustername.
		This name may vary among implementations, e.g.
		a8s-demo vs. kind-a8s-demo.
	*/
	GetContext(clustername string) string
}

A simple interface to manage Kubernetes clusters. Implementations of this interface will allow the creation of Kubernetes clusters using different automation backends.

Examples: - Minikube - Kind - Eks

Milestone 1: Create and Delete. No modification. No day 2 lifecycle management.

type MinikubeCreator

type MinikubeCreator struct {
}

func (MinikubeCreator) Create

func (c MinikubeCreator) Create(spec KubernetesClusterSpec, unattended bool)

func (MinikubeCreator) Delete

func (c MinikubeCreator) Delete(name string, unattended bool)

Deletes the given demo Kubernetes cluster.

func (MinikubeCreator) Exists

func (c MinikubeCreator) Exists(name string) bool

func (MinikubeCreator) GetContext

func (c MinikubeCreator) GetContext(name string) string

func (MinikubeCreator) Running

func (c MinikubeCreator) Running(name string) bool

Jump to

Keyboard shortcuts

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