v20180331

package
v0.43.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package v20180331 stores the API model for version "2018-03-31."

Index

Constants

View Source
const (
	// MinAgentCount are the minimum number of agents
	MinAgentCount = 1
	// MaxAgentCount are the maximum number of agents
	MaxAgentCount = 100
	// MinDiskSizeGB specifies the minimum attached disk size
	MinDiskSizeGB = 1
	// MaxDiskSizeGB specifies the maximum attached disk size
	MaxDiskSizeGB = 1023
)

validation values

View Source
const (
	// APIVersion is the version of this API
	APIVersion = "2018-03-31"
)
View Source
const (
	// KubernetesMinMaxPods is the minimum valid value for MaxPods, necessary for running kube-system pods
	KubernetesMinMaxPods = 5
)
View Source
const (
	// ManagedDisks means that the nodes use managed disks for their os and attached volumes
	ManagedDisks = "ManagedDisks"
)

storage profiles

Variables

View Source
var ErrorAADClientAppIDNotSet = errors.New("ClientAppID in AADProfile cannot be empty string")

ErrorAADClientAppIDNotSet error

View Source
var ErrorAADServerAppIDNotSet = errors.New("ServerAppID in AADProfile cannot be empty string")

ErrorAADServerAppIDNotSet error

View Source
var ErrorAADServerAppSecretNotSet = errors.New("ServerAppSecret in AADProfile cannot be empty string")

ErrorAADServerAppSecretNotSet error

View Source
var ErrorAADTenantIDNotSet = errors.New("TenantID in AADProfile cannot be empty string")

ErrorAADTenantIDNotSet error

View Source
var ErrorAtLeastAgentPoolNoSubnet = errors.New("At least one agent pool does not have subnet defined")

ErrorAtLeastAgentPoolNoSubnet error

View Source
var ErrorDNSServiceIPAlreadyUsed = errors.New("DNSServiceIP can not be the first IP address in ServiceCidr")

ErrorDNSServiceIPAlreadyUsed error

View Source
var ErrorDNSServiceIPNotInServiceCidr = errors.New("DNSServiceIP is not within ServiceCidr")

ErrorDNSServiceIPNotInServiceCidr error

View Source
var ErrorInvalidDNSServiceIP = errors.New("DNSServiceIP is not a valid IP address")

ErrorInvalidDNSServiceIP error

View Source
var ErrorInvalidDockerBridgeCidr = errors.New("DockerBridgeCidr is not a valid IP address")

ErrorInvalidDockerBridgeCidr error

View Source
var ErrorInvalidMaxPods = errors.New("Max pods per node needs to be at least 5")

ErrorInvalidMaxPods error

View Source
var ErrorInvalidNetworkPlugin = errors.New("Network plugin should be either Azure or Kubenet")

ErrorInvalidNetworkPlugin error

View Source
var ErrorInvalidNetworkProfile = errors.New("ServiceCidr, DNSServiceIP, DockerBridgeCidr should all be empty or neither should be empty")

ErrorInvalidNetworkProfile error

View Source
var ErrorInvalidServiceCidr = errors.New("ServiceCidr is not a valid CIDR")

ErrorInvalidServiceCidr error

View Source
var ErrorParsingSubnetID = errors.New("Failed to parse VnetSubnetID")

ErrorParsingSubnetID error

View Source
var ErrorPodCidrNotSetableInAzureCNI = errors.New("PodCidr should not be set when network plugin is set to Azure")

ErrorPodCidrNotSetableInAzureCNI error

View Source
var ErrorRBACNotEnabledForAAD = errors.New("RBAC must be enabled for AAD to be enabled")

ErrorRBACNotEnabledForAAD error

View Source
var ErrorResourceGroupNotMatch = errors.New("ResourceGroup for subnet does not match with other subnet")

ErrorResourceGroupNotMatch error

View Source
var ErrorServiceCidrTooLarge = errors.New("ServiceCidr is too large")

ErrorServiceCidrTooLarge error

View Source
var ErrorSubscriptionNotMatch = errors.New("Subscription for subnet does not match with other subnet")

ErrorSubscriptionNotMatch error

View Source
var ErrorVnetNotMatch = errors.New("Vnet for subnet does not match with other subnet")

ErrorVnetNotMatch error

Functions

This section is empty.

Types

type AADProfile

type AADProfile struct {
	// The client AAD application ID.
	ClientAppID string `json:"clientAppID,omitempty"`
	// The server AAD application ID.
	ServerAppID string `json:"serverAppID,omitempty"`
	// The server AAD application secret
	ServerAppSecret string `json:"serverAppSecret,omitempty" conform:"redact"`
	// The AAD tenant ID to use for authentication.
	// If not specified, will use the tenant of the deployment subscription.
	// Optional
	TenantID string `json:"tenantID,omitempty"`
}

AADProfile specifies attributes for AAD integration

func (*AADProfile) Validate

func (a *AADProfile) Validate(rbacEnabled *bool) error

Validate implements APIObject

type AccessProfile

type AccessProfile struct {
	KubeConfig string `json:"kubeConfig"`
}

AccessProfile represents role name and kubeconfig

type AddonProfile

type AddonProfile struct {
	Enabled bool              `json:"enabled"`
	Config  map[string]string `json:"config"`
}

AddonProfile represents an addon for managed cluster

type AgentPoolProfile

type AgentPoolProfile struct {
	Name           string `json:"name" validate:"required"`
	Count          int    `json:"count" validate:"required,min=1,max=100"`
	VMSize         string `json:"vmSize" validate:"required"`
	OSDiskSizeGB   int    `json:"osDiskSizeGB,omitempty" validate:"min=0,max=1023"`
	StorageProfile string `json:"storageProfile" validate:"eq=ManagedDisks|len=0"`
	VnetSubnetID   string `json:"vnetSubnetID,omitempty"`
	MaxPods        *int   `json:"maxPods,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) 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) UnmarshalJSON

func (a *AgentPoolProfile) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal json using the default behavior And do fields manipulation, such as populating default value

func (*AgentPoolProfile) Validate

func (a *AgentPoolProfile) Validate() error

Validate implements APIObject

type LinuxProfile

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

	SSH struct {
		PublicKeys []PublicKey `json:"publicKeys" validate:"required,len=1"`
	} `json:"ssh" validate:"required"`
}

LinuxProfile represents the Linux configuration passed to the cluster

func (*LinuxProfile) Validate

func (l *LinuxProfile) Validate() error

Validate implements APIObject

type ManagedCluster

type ManagedCluster struct {
	ID       string                `json:"id,omitempty"`
	Location string                `json:"location,omitempty" validate:"required"`
	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"`
}

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

func (*ManagedCluster) Merge

func (mc *ManagedCluster) Merge(emc *ManagedCluster) error

Merge existing ManagedCluster attribute into mc

type ManagedClusterAccessProfile

type ManagedClusterAccessProfile struct {
	ID       string `json:"id,omitempty"`
	Location string `json:"location,omitempty" validate:"required"`
	Name     string `json:"name,omitempty"`
	Type     string `json:"type,omitempty"`

	Properties *AccessProfile `json:"properties"`
}

ManagedClusterAccessProfile represents the access profile definition for managed cluster The Id captures the Role Name e.g. clusterAdmin, clusterUser

type NetworkPlugin

type NetworkPlugin string

NetworkPlugin represnets types of network plugin

const (
	// Azure represents Azure CNI network plugin
	Azure NetworkPlugin = "azure"
	// Kubenet represents Kubenet network plugin
	Kubenet NetworkPlugin = "kubenet"
)

type NetworkPolicy

type NetworkPolicy string

NetworkPolicy represnets types of network policy

const (
	// NetworkPolicyCalico represents Calico network policy
	NetworkPolicyCalico NetworkPolicy = "calico"
)

type NetworkProfile

type NetworkProfile struct {
	NetworkPlugin    NetworkPlugin `json:"networkPlugin,omitempty"`
	NetworkPolicy    NetworkPolicy `json:"networkPolicy,omitempty"`
	PodCidr          string        `json:"podCidr,omitempty"`
	ServiceCidr      string        `json:"serviceCidr,omitempty"`
	DNSServiceIP     string        `json:"dnsServiceIP,omitempty"`
	DockerBridgeCidr string        `json:"dockerBridgeCidr,omitempty"`
}

NetworkProfile represents network related definitions

type OSType

type OSType string

OSType represents OS types of agents

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

type PoolUpgradeProfile

type PoolUpgradeProfile struct {
	KubernetesVersion string   `json:"kubernetesVersion"`
	Name              string   `json:"name,omitempty"`
	OSType            string   `json:"osType,omitempty"`
	Upgrades          []string `json:"upgrades,omitempty"`
}

PoolUpgradeProfile contains pool properties:

  • kubernetes version
  • pool name (for agent pool)
  • OS type of the VMs in the pool
  • list of applicable upgrades

type Properties

type Properties struct {
	ProvisioningState       ProvisioningState        `json:"provisioningState,omitempty"`
	KubernetesVersion       string                   `json:"kubernetesVersion"`
	DNSPrefix               string                   `json:"dnsPrefix,omitempty"`
	FQDN                    string                   `json:"fqdn,omitempty"`
	AgentPoolProfiles       []*AgentPoolProfile      `json:"agentPoolProfiles,omitempty" validate:"dive,required"`
	LinuxProfile            *LinuxProfile            `json:"linuxProfile,omitempty"`
	WindowsProfile          *WindowsProfile          `json:"windowsProfile,omitempty"`
	ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
	AccessProfiles          map[string]AccessProfile `json:"accessProfiles,omitempty"`
	AddonProfiles           map[string]AddonProfile  `json:"addonProfiles,omitempty"`
	NodeResourceGroup       string                   `json:"nodeResourceGroup,omitempty"`
	EnableRBAC              *bool                    `json:"enableRBAC,omitempty"`
	NetworkProfile          *NetworkProfile          `json:"networkProfile,omitempty"`
	AADProfile              *AADProfile              `json:"aadProfile,omitempty"`
}

Properties represents the AKS 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"
	// Upgrading means an existing resource is being upgraded
	Upgrading ProvisioningState = "Upgrading"
)

type PublicKey

type PublicKey struct {
	KeyData string `json:"keyData"`
}

PublicKey represents an SSH key for LinuxProfile

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" validate:"required"`
	Secret   string `json:"secret,omitempty" conform:"redact"`
}

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 UpgradeProfile

type UpgradeProfile struct {
	ID         string                   `json:"id,omitempty"`
	Name       string                   `json:"name,omitempty"`
	Type       string                   `json:"type,omitempty"`
	Properties UpgradeProfileProperties `json:"properties"`
}

UpgradeProfile contains controlPlane and agent pools upgrade profiles

type UpgradeProfileProperties

type UpgradeProfileProperties struct {
	ControlPlaneProfile *PoolUpgradeProfile   `json:"controlPlaneProfile"`
	AgentPoolProfiles   []*PoolUpgradeProfile `json:"agentPoolProfiles"`
}

UpgradeProfileProperties contains properties of UpgradeProfile

type WindowsProfile

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

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