template

package
v5.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff(currentDeployment azureresource.DeploymentExtended, desiredDeployment azureresource.Deployment) ([]string, error)

func GetARMTemplate

func GetARMTemplate() (map[string]interface{}, error)

GetARMTemplate returns the ARM template reading a json file locally using pkger.

func IsWrongTypeError

func IsWrongTypeError(err error) bool

IsWrongTypeError asserts wrongTypeError.

func NewDeployment

func NewDeployment(templateParams Parameters) (azureresource.Deployment, error)

Types

type OSImage

type OSImage struct {
	Publisher string
	Offer     string
	SKU       string
	Version   string
}

type Parameters

type Parameters struct {
	AzureOperatorVersion        string
	ClusterID                   string
	DataDisks                   []v1alpha3.DataDisk
	EnableAcceleratedNetworking bool
	KubernetesVersion           string
	NodepoolName                string
	OSImage                     OSImage
	Scaling                     Scaling
	StorageAccountType          string
	SubnetName                  string
	VMCustomData                string
	VMSize                      string
	VnetName                    string
	Zones                       []string
}

func NewFromDeployment

func NewFromDeployment(deployment azureresource.Deployment) (Parameters, error)

func NewFromExtendedDeployment

func NewFromExtendedDeployment(deployment azureresource.DeploymentExtended) (Parameters, error)

func (Parameters) ToDeployParams

func (p Parameters) ToDeployParams() map[string]interface{}

ToDeployParams prepares the parameters to the format that ARM API understand. We also try to use the same types that the ARM API will return, that's why we convert to float64 or interface{} types.

type Scaling

type Scaling struct {
	MinReplicas     int32
	MaxReplicas     int32
	CurrentReplicas int32
}

Jump to

Keyboard shortcuts

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