engine

package
v0.38.3 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseInput

func ParseInput(path string) (*api.VlabsARMContainerService, error)

ParseInput takes a template path and will parse that into a api.VlabsARMContainerService

func ParseOutput

func ParseOutput(path string) (*api.ContainerService, error)

ParseOutput takes the generated api model and will parse that into a api.ContainerService

Types

type Config

type Config struct {
	ClientID              string `envconfig:"CLIENT_ID"`
	ClientSecret          string `envconfig:"CLIENT_SECRET"`
	ClientObjectID        string `envconfig:"CLIENT_OBJECTID"`
	MasterDNSPrefix       string `envconfig:"DNS_PREFIX"`
	AgentDNSPrefix        string `envconfig:"DNS_PREFIX"`
	PublicSSHKey          string `envconfig:"PUBLIC_SSH_KEY"`
	WindowsAdminPasssword string `envconfig:"WINDOWS_ADMIN_PASSWORD"`
	OrchestratorRelease   string `envconfig:"ORCHESTRATOR_RELEASE"`
	OrchestratorVersion   string `envconfig:"ORCHESTRATOR_VERSION"`
	OutputDirectory       string `envconfig:"OUTPUT_DIR" default:"_output"`
	CreateVNET            bool   `envconfig:"CREATE_VNET" default:"false"`
	EnableKMSEncryption   bool   `envconfig:"ENABLE_KMS_ENCRYPTION" default:"false"`
	Distro                string `envconfig:"DISTRO"`
	SubscriptionID        string `envconfig:"SUBSCRIPTION_ID"`
	TenantID              string `envconfig:"TENANT_ID"`
	ImageName             string `envconfig:"IMAGE_NAME"`
	ImageResourceGroup    string `envconfig:"IMAGE_RESOURCE_GROUP"`

	ClusterDefinitionPath     string // The original template we want to use to build the cluster from.
	ClusterDefinitionTemplate string // This is the template after we splice in the environment variables
	GeneratedDefinitionPath   string // Holds the contents of running aks-engine generate
	OutputPath                string // This is the root output path
	DefinitionName            string // Unique cluster name
	GeneratedTemplatePath     string // azuredeploy.json path
	GeneratedParametersPath   string // azuredeploy.parameters.json path
}

Config represents the configuration values of a template stored as env vars

func ParseConfig

func ParseConfig(cwd, clusterDefinition, name string) (*Config, error)

ParseConfig will return a new engine config struct taking values from env vars

type Engine

type Engine struct {
	Config             *Config
	ClusterDefinition  *api.VlabsARMContainerService // Holds the parsed ClusterDefinition
	ExpandedDefinition *api.ContainerService         // Holds the expanded ClusterDefinition
}

Engine holds necessary information to interact with aks-engine cli

func Build

func Build(cfg *config.Config, masterSubnetID string, agentSubnetIDs []string, isVMSS bool) (*Engine, error)

Build takes a template path and will inject values based on provided environment variables it will then serialize the structs back into json and save it to outputPath

func (*Engine) AnyAgentIsLinux added in v0.37.0

func (e *Engine) AnyAgentIsLinux() bool

AnyAgentIsLinux will return true if there is at least 1 linux agent pool

func (*Engine) Deploy

func (e *Engine) Deploy(location string) error

Deploy will run aks-engine deploy on a given cluster definition

func (*Engine) Generate

func (e *Engine) Generate() error

Generate will run aks-engine generate on a given cluster definition

func (*Engine) GetWindowsTestImages

func (e *Engine) GetWindowsTestImages() (*WindowsTestImages, error)

GetWindowsTestImages will return the right list of container images for the Windows version used

func (*Engine) HasAddon

func (e *Engine) HasAddon(name string) (bool, api.KubernetesAddon)

HasAddon will return true if an addon is enabled

func (*Engine) HasNetworkPolicy

func (e *Engine) HasNetworkPolicy(name string) bool

HasNetworkPolicy will return true if the specified network policy is enabled

func (*Engine) HasWindowsAgents

func (e *Engine) HasWindowsAgents() bool

HasWindowsAgents will return true is there is at least 1 windows agent pool

func (*Engine) NodeCount

func (e *Engine) NodeCount() int

NodeCount returns the number of nodes that should be provisioned for a given cluster definition

func (*Engine) Write

func (e *Engine) Write() error

Write will write the cluster definition to disk

type WindowsTestImages

type WindowsTestImages struct {
	IIS        string
	ServerCore string
}

WindowsTestImages holds the Windows container image names used in this test pass

Jump to

Keyboard shortcuts

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