config

package
v0.0.0-...-2e1daa9 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAKSCluster

func CreateAKSCluster(config *AzureConfig) error

CreateAKSCluster creates the AKS cluster

func DeleteAKSCluster

func DeleteAKSCluster(config *AzureConfig) error

DeleteAKSCluster deletes the AKS cluster

func GetVolumeMountPoints

func GetVolumeMountPoints(volumeMount string) (string, string)

GetVolumeMountPoints extracts the source and destination of a volume mount

func HelpAKSCluster

func HelpAKSCluster() error

HelpAKSCluster returns the help.txt for the AKS cluster

func ReadYAMLFile

func ReadYAMLFile(filePath string, cfg *AzureConfig) error

ReadYAMLFile reads YAML-formatted configuration file and de-serializes it to a given object

func ReadYAMLtoJSON

func ReadYAMLtoJSON(filePath string) (string, error)

ReadYAMLtoJSON reads YAML-formatted configuration file and de-serializes it to a given object

func ValidateConfigFile

func ValidateConfigFile(config *AzureConfig) error

ValidateConfigFile validates Azure configuration file for the Ephemeral Cluster

Types

type AzureConfig

type AzureConfig struct {
	// +optional
	Kind string `json:"kind" validate:"required"`

	// +optional
	APIVersion string `json:"apiVersion" validate:"required"`

	// Configuration parameters for metadata
	Metadata *Metadata `json:"metadata"`

	// Configuration parameters for metadata
	Credentials *Credentials `json:"credentials" validate:"required"`

	// Configuration parameters for spec
	Spec *Spec `json:"spec"`
}

AzureConfig holds configurations for bootstrap steps

type Cluster

type Cluster struct {
	// Kubernetes version to deploy
	K8SVersion string `json:"k8sVersion,omitempty"`

	// Azure VM size to use for the cluster
	VMSize string `json:"vmSize,omitempty"`

	// Number of nodes to deploy for the cluster
	Replicas uint8 `json:"replicas,omitempty" validate:"gte=1,lte=100"`

	// Kubeconfig filename to save
	Kubeconfig string `json:"kubeconfig,omitempty"`
}

Cluster struct provides data for the k8s cluster to deploy

type Credentials

type Credentials struct {
	Tenant string `json:"tenant" validate:"required"`
	Client string `json:"client" validate:"required"`
	Secret string `json:"secret" validate:"required"`
}

Credentials structu provides the credentials to authenticate with Azure Cloud

type Metadata

type Metadata struct {
	Name   string   `json:"name" validate:"required"`
	Labels []string `json:"labels,omitempty"`
}

Metadata structure provides the cluster name to assign and labels to the k8s cluster

type Spec

type Spec struct {
	Region        string  `json:"region,omitempty"`
	ResourceGroup string  `json:"resourceGroup,omitempty"`
	Cluster       Cluster `json:"cluster"`
}

Spec structure contains the info for the ck8s luster to deploy

Jump to

Keyboard shortcuts

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