aks

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package aks implements AKS provider for Kubeformation. It can generate Azure Resource Manager templates in JSON format. Spec is the input struct.

Azure Deployment Manager templates are written in JSON formatted files, typically a resource definition file and a parameters file. Kubeformation converts Spec into azuredeploy.json and azuredeploy.parameters.json files. There could be more files depending on the presence of volumes/disks. These files are defined as Go templates in template.go and are rendered with Spec as the context.

Index

Constants

View Source
const (
	// Default version of Kubernetes to use
	DefaultK8SVersion = "1.8.1"

	// Default Azure VM size
	DefaultVMSize = "Standard_D2_v2"

	// Default OS type, available options are Linux and Windows
	DefaultOSType = "Linux"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NodePool

type NodePool struct {
	// Name of the node pool
	Name string

	// Number of nodes in this pool
	Count int64

	// Size (type) of the VMs
	VMSize string

	// Type of OS to use
	OSType string
}

NodePool defines a collection of nodes (VMs) with similar properties that can be used by a Kubernetes cluster to schedule workloads.

type Spec

type Spec struct {
	// Name of the cluster
	Name string

	// Kubernetes version for the cluster
	K8SVersion string

	// Node pools to be created
	NodePools []NodePool

	// Persistent disks to be created
	Volumes []Volume
}

Spec defines the context required to render ARM template.

func NewDefaultSpec

func NewDefaultSpec() *Spec

NewDefaultSpec returns a spec object which is barely enough to render a valid ARM template.

func (*Spec) GetType

func (s *Spec) GetType() provider.ProviderType

GetType returns the type of this provider.

func (*Spec) MarshalFiles

func (s *Spec) MarshalFiles() (map[string][]byte, error)

MarshalFiles returns the rendered ARM template as a map which indicates filename as keys and file content as value. FIXME: test does not capture the template errors.

type Volume

type Volume struct {
	// Name of the disk
	Name string

	// Size of the disk in GB
	SizeGB int
}

Volume defines a Azure Data Disk that can persist data.

Jump to

Keyboard shortcuts

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