template

package
v8.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 8 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 go embed.

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
	CGroupsVersion              string
	DataDisks                   []capz.DataDisk
	EnableAcceleratedNetworking bool
	KubernetesVersion           string
	NodepoolName                string
	OSImage                     OSImage
	Scaling                     Scaling
	SpotInstanceConfig          SpotInstanceConfig
	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
}

type SpotInstanceConfig

type SpotInstanceConfig struct {
	Enabled  bool
	MaxPrice string
}

Jump to

Keyboard shortcuts

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