Documentation
¶
Index ¶
- type KindClusterConfig
- type KindCreator
- func (c KindCreator) Create(spec KubernetesClusterSpec, unattendedMode bool)
- func (c KindCreator) Delete(name string, unattendedMode bool)
- func (c KindCreator) Exists(clustername string) bool
- func (c KindCreator) GetContext(kindClusterName string) string
- func (c KindCreator) Running(clustername string) bool
- type KubernetesClusterSpec
- type KubernetesCreator
- type MinikubeCreator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KindClusterConfig ¶
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
Click to show internal directories.
Click to hide internal directories.