v20170701

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package v20170701 stores api model for version "2017-07-01"

Index

Constants

View Source
const (
	// MinAgentCount are the minimum number of agents
	MinAgentCount = 1
	// MaxAgentCount are the maximum number of agents
	MaxAgentCount = 100
	// MinPort specifies the minimum tcp port to open
	MinPort = 1
	// MaxPort specifies the maximum tcp port to open
	MaxPort = 65535
	// MinDiskSizeGB specifies the minimum attached disk size
	MinDiskSizeGB = 1
	// MaxDiskSizeGB specifies the maximum attached disk size
	MaxDiskSizeGB = 1023
)

validation values

View Source
const (
	// StorageAccount means that the nodes use raw storage accounts for their os and attached volumes
	StorageAccount = "StorageAccount"
	// ManagedDisks means that the nodes use managed disks for their os and attached volumes
	ManagedDisks = "ManagedDisks"
)

storage profiles

View Source
const (
	// APIVersion is the version of this API
	APIVersion = "2017-07-01"
)

Variables

This section is empty.

Functions

func GetVNETSubnetIDComponents

func GetVNETSubnetIDComponents(vnetSubnetID string) (string, string, string, string, error)

GetVNETSubnetIDComponents extract subscription, resourcegroup, vnetname, subnetname from the vnetSubnetID

Types

type AgentPoolProfile

type AgentPoolProfile struct {
	Name           string `json:"name"`
	Count          int    `json:"count"`
	VMSize         string `json:"vmSize"`
	OSDiskSizeGB   int    `json:"osDiskSizeGB,omitempty"`
	DNSPrefix      string `json:"dnsPrefix"`
	FQDN           string `json:"fqdn"`
	Ports          []int  `json:"ports,omitempty"`
	StorageProfile string `json:"storageProfile"`
	VnetSubnetID   string `json:"vnetSubnetID,omitempty"`
	// OSType is the operating system type for agents
	// Set as nullable to support backward compat because
	// this property was added later.
	// If the value is null or not set, it defaulted to Linux.
	OSType OSType `json:"osType,omitempty"`
	// contains filtered or unexported fields
}

AgentPoolProfile represents configuration of VMs running agent daemons that register with the master and offer resources to host applications in containers.

func (*AgentPoolProfile) GetSubnet

func (a *AgentPoolProfile) GetSubnet() string

GetSubnet returns the read-only subnet for the agent pool

func (*AgentPoolProfile) IsCustomVNET

func (a *AgentPoolProfile) IsCustomVNET() bool

IsCustomVNET returns true if the customer brought their own VNET

func (*AgentPoolProfile) IsLinux

func (a *AgentPoolProfile) IsLinux() bool

IsLinux returns true if the agent pool is linux

func (*AgentPoolProfile) IsManagedDisks

func (a *AgentPoolProfile) IsManagedDisks() bool

IsManagedDisks returns true if the customer specified managed disks

func (*AgentPoolProfile) IsStorageAccount

func (a *AgentPoolProfile) IsStorageAccount() bool

IsStorageAccount returns true if the customer specified storage account

func (*AgentPoolProfile) IsWindows

func (a *AgentPoolProfile) IsWindows() bool

IsWindows returns true if the agent pool is windows

func (*AgentPoolProfile) SetSubnet

func (a *AgentPoolProfile) SetSubnet(subnet string)

SetSubnet sets the read-only subnet for the agent pool

func (*AgentPoolProfile) Validate

func (a *AgentPoolProfile) Validate(orchestratorType OrchestratorType) error

Validate implements APIObject

type ContainerService

type ContainerService struct {
	ID       string                `json:"id,omitempty"`
	Location string                `json:"location,omitempty"`
	Name     string                `json:"name,omitempty"`
	Plan     *ResourcePurchasePlan `json:"plan,omitempty"`
	Tags     map[string]string     `json:"tags,omitempty"`
	Type     string                `json:"type,omitempty"`

	Properties *Properties `json:"properties"`
}

ContainerService complies with the ARM model of resource definition in a JSON template.

type CustomProfile

type CustomProfile struct {
	Orchestrator string `json:"orchestrator,omitempty"`
}

CustomProfile specifies custom properties that are used for cluster instantiation. Should not be used by most users.

type LinuxProfile

type LinuxProfile struct {
	AdminUsername string `json:"adminUsername"`

	SSH struct {
		PublicKeys []struct {
			KeyData string `json:"keyData"`
		} `json:"publicKeys"`
	} `json:"ssh"`
}

LinuxProfile represents the Linux configuration passed to the cluster

func (*LinuxProfile) Validate

func (l *LinuxProfile) Validate() error

Validate implements APIObject

type MasterProfile

type MasterProfile struct {
	Count                    int    `json:"count"`
	DNSPrefix                string `json:"dnsPrefix"`
	VMSize                   string `json:"vmSize"`
	OSDiskSizeGB             int    `json:"osDiskSizeGB,omitempty"`
	VnetSubnetID             string `json:"vnetSubnetID,omitempty"`
	FirstConsecutiveStaticIP string `json:"firstConsecutiveStaticIP,omitempty"`
	StorageProfile           string `json:"storageProfile,omitempty"`

	// Master LB public endpoint/FQDN with port
	// The format will be FQDN:2376
	// Not used during PUT, returned as part of GET
	FQDN string `json:"fqdn,omitempty"`
	// contains filtered or unexported fields
}

MasterProfile represents the definition of master cluster

func (*MasterProfile) GetSubnet

func (m *MasterProfile) GetSubnet() string

GetSubnet returns the read-only subnet for the master

func (*MasterProfile) IsCustomVNET

func (m *MasterProfile) IsCustomVNET() bool

IsCustomVNET returns true if the customer brought their own VNET

func (*MasterProfile) IsManagedDisks

func (m *MasterProfile) IsManagedDisks() bool

IsManagedDisks returns true if the master specified managed disks

func (*MasterProfile) IsStorageAccount

func (m *MasterProfile) IsStorageAccount() bool

IsStorageAccount returns true if the master specified storage account

func (*MasterProfile) SetSubnet

func (m *MasterProfile) SetSubnet(subnet string)

SetSubnet sets the read-only subnet for the master

func (*MasterProfile) Validate

func (m *MasterProfile) Validate() error

Validate implements APIObject

type OSType

type OSType string

OSType represents OS types of agents

const (
	Windows OSType = "Windows"
	Linux   OSType = "Linux"
)

type OrchestratorProfile

type OrchestratorProfile struct {
	OrchestratorType    OrchestratorType    `json:"orchestratorType"`
	OrchestratorVersion OrchestratorVersion `json:"orchestratorVersion"`
}

OrchestratorProfile contains Orchestrator properties

func (*OrchestratorProfile) IsSwarmMode

func (o *OrchestratorProfile) IsSwarmMode() bool

IsSwarmMode returns true if this template is for Docker CE orchestrator

func (*OrchestratorProfile) Validate

func (o *OrchestratorProfile) Validate() error

Validate implements APIObject

type OrchestratorType

type OrchestratorType string

OrchestratorType defines orchestrators supported by ACS

const (
	// DCOS is the string constant for DCOS orchestrator type and defaults to DCOS187
	DCOS OrchestratorType = "DCOS"
	// Swarm is the string constant for the Swarm orchestrator type
	Swarm OrchestratorType = "Swarm"
	// Kubernetes is the string constant for the Kubernetes orchestrator type
	Kubernetes OrchestratorType = "Kubernetes"
	// DockerCE is the string constant for the Docker CE orchestrator type
	DockerCE OrchestratorType = "DockerCE"
)

the orchestrators supported by 2017-07-01

func (*OrchestratorType) UnmarshalText

func (o *OrchestratorType) UnmarshalText(text []byte) error

UnmarshalText decodes OrchestratorType text, do a case insensitive comparison with the defined OrchestratorType constant and set to it if they equal

type OrchestratorVersion

type OrchestratorVersion string

OrchestratorVersion defines the version for orchestratorType

const (
	// DCOS190 is the string constant for DCOS 1.9.0
	DCOS190 OrchestratorVersion = "1.9.0"
	// DCOS188 is the string constant for DCOS 1.8.8
	DCOS188 OrchestratorVersion = "1.8.8"
	// DCOS187 is the string constant for DCOS 1.8.7
	DCOS187 OrchestratorVersion = "1.8.7"
	// DCOS184 is the string constant for DCOS 1.8.4
	DCOS184 OrchestratorVersion = "1.8.4"
	// DCOS173 is the string constant for DCOS 1.7.3
	DCOS173 OrchestratorVersion = "1.7.3"
	// DCOSLatest is the string constant for latest DCOS version
	DCOSLatest OrchestratorVersion = DCOS190
)
const (
	// Kubernetes153 is the string constant for Kubernetes 1.5.3
	Kubernetes153 OrchestratorVersion = "1.5.3"
	// Kubernetes157 is the string constant for Kubernetes 1.5.3
	Kubernetes157 OrchestratorVersion = "1.5.7"
	// Kubernetes160 is the string constant for Kubernetes 1.6.0
	Kubernetes160 OrchestratorVersion = "1.6.0"
	// Kubernetes162 is the string constant for Kubernetes 1.6.2
	Kubernetes162 OrchestratorVersion = "1.6.2"
	// Kubernetes166 is the string constant for Kubernetes 1.6.6
	Kubernetes166 OrchestratorVersion = "1.6.6"
	// KubernetesLatest is the string constant for latest Kubernetes version
	KubernetesLatest OrchestratorVersion = Kubernetes166
)

type Properties

type Properties struct {
	ProvisioningState       ProvisioningState        `json:"provisioningState,omitempty"`
	OrchestratorProfile     *OrchestratorProfile     `json:"orchestratorProfile,omitempty"`
	MasterProfile           *MasterProfile           `json:"masterProfile,omitempty"`
	AgentPoolProfiles       []*AgentPoolProfile      `json:"agentPoolProfiles,omitempty"`
	LinuxProfile            *LinuxProfile            `json:"linuxProfile,omitempty"`
	WindowsProfile          *WindowsProfile          `json:"windowsProfile,omitempty"`
	ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
	CustomProfile           *CustomProfile           `json:"customProfile,omitempty"`
}

Properties represents the ACS cluster definition

func (*Properties) HasWindows

func (a *Properties) HasWindows() bool

HasWindows returns true if the cluster contains windows

func (*Properties) Validate

func (a *Properties) Validate() error

Validate implements APIObject

type ProvisioningState

type ProvisioningState string

ProvisioningState represents the current state of container service resource.

const (
	// Creating means ContainerService resource is being created.
	Creating ProvisioningState = "Creating"
	// Updating means an existing ContainerService resource is being updated
	Updating ProvisioningState = "Updating"
	// Failed means resource is in failed state
	Failed ProvisioningState = "Failed"
	// Succeeded means resource created succeeded during last create/update
	Succeeded ProvisioningState = "Succeeded"
	// Deleting means resource is in the process of being deleted
	Deleting ProvisioningState = "Deleting"
	// Migrating means resource is being migrated from one subscription or
	// resource group to another
	Migrating ProvisioningState = "Migrating"
)

type ResourcePurchasePlan

type ResourcePurchasePlan struct {
	Name          string `json:"name,omitempty"`
	Product       string `json:"product,omitempty"`
	PromotionCode string `json:"promotionCode,omitempty"`
	Publisher     string `json:"publisher,omitempty"`
}

ResourcePurchasePlan defines resource plan as required by ARM for billing purposes.

type ServicePrincipalProfile

type ServicePrincipalProfile struct {
	ClientID string `json:"clientId,omitempty"`
	Secret   string `json:"secret,omitempty"`
}

ServicePrincipalProfile contains the client and secret used by the cluster for Azure Resource CRUD The 'Secret' parameter could be either a plain text, or referenced to a secret in a keyvault. In the latter case, the format of the parameter's value should be "/subscriptions/<SUB_ID>/resourceGroups/<RG_NAME>/providers/Microsoft.KeyVault/vaults/<KV_NAME>/secrets/<NAME>[/<VERSION>]" where:

<SUB_ID> is the subscription ID of the keyvault
<RG_NAME> is the resource group of the keyvault
<KV_NAME> is the name of the keyvault
<NAME> is the name of the secret.
<VERSION> (optional) is the version of the secret (default: the latest version)

type WindowsProfile

type WindowsProfile struct {
	AdminUsername string `json:"adminUsername,omitempty"`
	AdminPassword string `json:"adminPassword,omitempty"`
}

WindowsProfile represents the Windows configuration passed to the cluster

Jump to

Keyboard shortcuts

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