api

package
v0.79.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 29 Imported by: 124

Documentation

Overview

Package api stores an unversioned API.

Index

Examples

Constants

View Source
const (
	// DefaultAzureStackDeployTelemetryPID tracking ID for Deployment
	DefaultAzureStackDeployTelemetryPID = "pid-1bda96ec-adf4-4eea-bb9a-8462de5475c0"
	// DefaultAzureStackScaleTelemetryPID tracking ID for Scale
	DefaultAzureStackScaleTelemetryPID = "pid-bbbafa53-d6a7-4022-84a2-86fcbaec7030"
	// DefaultAzureStackUpgradeTelemetryPID tracking ID for Upgrade
	DefaultAzureStackUpgradeTelemetryPID = "pid-0d9b5198-7cd7-4252-a890-5658eaf874be"
)
View Source
const (
	// KubernetesWindowsDockerVersion is the default version for docker on Windows nodes in kubernetes
	KubernetesWindowsDockerVersion = "20.10.9"
	// KubernetesDefaultWindowsSku is the default SKU for Windows VMs in kubernetes
	KubernetesDefaultWindowsSku = "Datacenter-Core-1809-with-Containers-smalldisk"
	// KubernetesDefaultWindowsRuntimeHandler is the default containerd handler for windows pods
	KubernetesDefaultWindowsRuntimeHandler = "process"
)
View Source
const (
	// MinAgentCount are the minimum number of agents per agent pool
	MinAgentCount = 1
	// MaxAgentCount are the maximum number of agents per agent pool
	MaxAgentCount = 1000
	// MinPort specifies the minimum tcp port to open
	MinPort = 1
	// MaxPort specifies the maximum tcp port to open
	MaxPort = 65535
	// MaxDisks specifies the maximum attached disks to add to the cluster
	MaxDisks = 4
)

validation values

View Source
const (
	// AvailabilitySet means that the vms are in an availability set
	AvailabilitySet = "AvailabilitySet"
	// DefaultOrchestratorName specifies the 3 character orchestrator code of the cluster template and affects resource naming.
	DefaultOrchestratorName = "k8s"
	// DefaultFirstConsecutiveKubernetesStaticIP specifies the static IP address on Kubernetes master 0
	DefaultFirstConsecutiveKubernetesStaticIP = "10.240.255.5"
	// DefaultFirstConsecutiveKubernetesStaticIPVMSS specifies the static IP address on Kubernetes master 0 of VMSS
	DefaultFirstConsecutiveKubernetesStaticIPVMSS = "10.240.0.4"
	//DefaultCNICIDR specifies the default value for
	DefaultCNICIDR = "168.63.129.16/32"
	// DefaultKubernetesFirstConsecutiveStaticIPOffset specifies the IP address offset of master 0
	// when VNET integration is enabled.
	DefaultKubernetesFirstConsecutiveStaticIPOffset = 5
	// DefaultKubernetesFirstConsecutiveStaticIPOffsetVMSS specifies the IP address offset of master 0 in VMSS
	// when VNET integration is enabled.
	DefaultKubernetesFirstConsecutiveStaticIPOffsetVMSS = 4
	// DefaultSubnetNameResourceSegmentIndex specifies the default subnet name resource segment index.
	DefaultSubnetNameResourceSegmentIndex = 10
	// DefaultVnetResourceGroupSegmentIndex specifies the default virtual network resource segment index.
	DefaultVnetResourceGroupSegmentIndex = 4
	// DefaultVnetNameResourceSegmentIndex specifies the default virtual network name segment index.
	DefaultVnetNameResourceSegmentIndex = 8
	// VirtualMachineScaleSets means that the vms are in a virtual machine scaleset
	VirtualMachineScaleSets = "VirtualMachineScaleSets"
	// ScaleSetPriorityRegular is the default ScaleSet Priority
	ScaleSetPriorityRegular = "Regular"
	// ScaleSetPriorityLow means the ScaleSet will use Low-priority VMs
	ScaleSetPriorityLow = "Low"
	// ScaleSetPrioritySpot means the ScaleSet will use Spot VMs
	ScaleSetPrioritySpot = "Spot"
	// ScaleSetEvictionPolicyDelete is the default Eviction Policy for Low-priority VM ScaleSets
	ScaleSetEvictionPolicyDelete = "Delete"
	// ScaleSetEvictionPolicyDeallocate means a Low-priority VM ScaleSet will deallocate, rather than delete, VMs.
	ScaleSetEvictionPolicyDeallocate = "Deallocate"
)

Availability profiles

View Source
const (
	Docker         = "docker"
	KataContainers = "kata-containers" // Deprecated
	Containerd     = "containerd"
)

Supported container runtimes

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"
	// Ephemeral means that the node's os disk is ephemeral. This is not compatible with attached volumes.
	Ephemeral = "Ephemeral"
)

storage profiles

View Source
const (
	// DefaultTillerAddonEnabled determines the aks-engine provided default for enabling tiller addon
	DefaultTillerAddonEnabled = false
	// DefaultAADPodIdentityAddonEnabled determines the aks-engine provided default for enabling aad-pod-identity addon
	DefaultAADPodIdentityAddonEnabled = false
	// DefaultAzurePolicyAddonEnabled determines the aks-engine provided default for enabling azure policy addon
	DefaultAzurePolicyAddonEnabled = false
	// DefaultNodeProblemDetectorAddonEnabled determines the aks-engine provided default for enabling the node problem detector addon
	DefaultNodeProblemDetectorAddonEnabled = false
	// DefaultACIConnectorAddonEnabled // Deprecated
	DefaultACIConnectorAddonEnabled = false // Deprecated
	// DefaultAppGwIngressAddonEnabled determines the aks-engine provided default for enabling appgw ingress addon
	DefaultAppGwIngressAddonEnabled = false
	// DefaultAzureDiskCSIDriverAddonEnabled determines the aks-engine provided default for enabling Azure Disk CSI Driver
	DefaultAzureDiskCSIDriverAddonEnabled = true
	// DefaultAzureFileCSIDriverAddonEnabled determines the aks-engine provided default for enabling Azure File CSI Driver
	DefaultAzureFileCSIDriverAddonEnabled = true
	// DefaultClusterAutoscalerAddonEnabled determines the aks-engine provided default for enabling cluster autoscaler addon
	DefaultClusterAutoscalerAddonEnabled = false
	// DefaultBlobfuseFlexVolumeAddonEnabled determines the aks-engine provided default for enabling blobfuse flexvolume addon
	DefaultBlobfuseFlexVolumeAddonEnabled = false
	// DefaultSMBFlexVolumeAddonEnabled determines the aks-engine provided default for enabling smb flexvolume addon
	DefaultSMBFlexVolumeAddonEnabled = false
	// DefaultKeyVaultFlexVolumeAddonEnabled determines the aks-engine provided default for enabling key vault flexvolume addon
	DefaultKeyVaultFlexVolumeAddonEnabled = false
	// DefaultDashboardAddonEnabled // Deprecated
	DefaultDashboardAddonEnabled = false // Deprecated
	// DefaultReschedulerAddonEnabled // Deprecated
	DefaultReschedulerAddonEnabled = false // Deprecated
	// DefaultAzureCNIMonitoringAddonEnabled determines the aks-engine provided default for enabling azurecni-network monitoring addon
	DefaultAzureCNIMonitoringAddonEnabled = true
	// DefaultKubeDNSAddonEnabled determines the aks-engine provided default for enabling coredns addon
	DefaultKubeDNSAddonEnabled = false
	// DefaultCoreDNSAddonEnabled determines the aks-engine provided default for enabling coredns addon
	DefaultCoreDNSAddonEnabled = true
	// DefaultKubeProxyAddonEnabled determines the aks-engine provided default for enabling kube-proxy addon
	DefaultKubeProxyAddonEnabled = true
	// DefaultSecretStoreCSIDriverAddonEnabled determines the aks-engine provided default for enabling secrets-store-csi-driver addon
	DefaultSecretStoreCSIDriverAddonEnabled = false
	// DefaultRBACEnabled determines the aks-engine provided default for enabling kubernetes RBAC
	DefaultRBACEnabled = true
	// DefaultUseInstanceMetadata determines the aks-engine provided default for enabling Azure cloudprovider instance metadata service
	DefaultUseInstanceMetadata = true
	// BasicLoadBalancerSku is the string const for Azure Basic Load Balancer
	BasicLoadBalancerSku = "Basic"
	// StandardLoadBalancerSku is the string const for Azure Standard Load Balancer
	StandardLoadBalancerSku = "Standard"
	// DefaultExcludeMasterFromStandardLB determines the aks-engine provided default for excluding master nodes from standard load balancer.
	DefaultExcludeMasterFromStandardLB = true
	// DefaultSecureKubeletEnabled determines the aks-engine provided default for securing kubelet communications
	DefaultSecureKubeletEnabled = true
	// DefaultMetricsServerAddonEnabled determines the aks-engine provided default for enabling kubernetes metrics-server addon
	DefaultMetricsServerAddonEnabled = true
	// DefaultNVIDIADevicePluginAddonEnabled determines the aks-engine provided default for enabling NVIDIA Device Plugin
	DefaultNVIDIADevicePluginAddonEnabled = false
	// DefaultContainerMonitoringAddonEnabled determines the aks-engine provided default for enabling kubernetes container monitoring addon
	DefaultContainerMonitoringAddonEnabled = false
	// DefaultIPMasqAgentAddonEnabled enables the ip-masq-agent addon
	DefaultIPMasqAgentAddonEnabled = true
	// DefaultArcAddonEnabled determines the aks-engine provided default for enabling arc addon
	DefaultAzureArcOnboardingAddonEnabled = false
	// DefaultPrivateClusterEnabled determines the aks-engine provided default for enabling kubernetes Private Cluster
	DefaultPrivateClusterEnabled = false
	// DefaultPrivateClusterHostsConfigAgentEnabled enables the hosts config agent for private cluster
	DefaultPrivateClusterHostsConfigAgentEnabled = false
	// NetworkPolicyAzure is the string expression for Azure CNI network policy manager
	NetworkPolicyAzure = "azure"
	// NetworkPolicyNone is the string expression for the deprecated NetworkPolicy usage pattern "none"
	NetworkPolicyNone = "none"
	// NetworkPluginKubenet is the string expression for the kubenet NetworkPlugin config
	NetworkPluginKubenet = "kubenet"
	// NetworkPluginAzure is the string expression for Azure CNI plugin.
	NetworkPluginAzure = "azure"
	// NetworkModeTransparent is the string expression for transparent network mode config option
	NetworkModeTransparent = "transparent"
	// DefaultSinglePlacementGroup determines the aks-engine provided default for supporting large VMSS
	// (true = single placement group 0-100 VMs, false = multiple placement group 0-1000 VMs)
	DefaultSinglePlacementGroup = true
	// ARMNetworkNamespace is the ARM-specific namespace for ARM's network providers.
	ARMNetworkNamespace = "Microsoft.Networks"
	// ARMVirtualNetworksResourceType is the ARM resource type for virtual network resources of ARM.
	ARMVirtualNetworksResourceType = "virtualNetworks"
	// DefaultAcceleratedNetworkingWindowsEnabled determines the aks-engine provided default for enabling accelerated networking on Windows nodes
	DefaultAcceleratedNetworkingWindowsEnabled = false
	// DefaultAcceleratedNetworking determines the aks-engine provided default for enabling accelerated networking on Linux nodes
	DefaultAcceleratedNetworking = true
	// DefaultVMSSOverProvisioningEnabled determines the aks-engine provided default for enabling VMSS Overprovisioning
	DefaultVMSSOverProvisioningEnabled = false
	// DefaultAuditDEnabled determines the aks-engine provided default for enabling auditd
	DefaultAuditDEnabled = false
	// DefaultUseCosmos determines if the cluster will use cosmos as etcd storage
	DefaultUseCosmos = false

	// DefaultMaximumLoadBalancerRuleCount determines the default value of maximum allowed loadBalancer rule count according to
	// https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits#load-balancer.
	DefaultMaximumLoadBalancerRuleCount = 250
	// DefaultEnableAutomaticUpdates determines the aks-engine provided default for enabling automatic updates
	DefaultEnableAutomaticUpdates = false
	// DefaultPreserveNodesProperties determines the aks-engine provided default for preserving nodes properties
	DefaultPreserveNodesProperties = true
	// DefaultEnableVMSSNodePublicIP determines the aks-engine provided default for enable VMSS node public IP
	DefaultEnableVMSSNodePublicIP = false
	// DefaultOutboundRuleIdleTimeoutInMinutes determines the aks-engine provided default for IdleTimeoutInMinutes of the OutboundRule of the agent loadbalancer
	// This value is set greater than the default Linux idle timeout (15.4 min): https://pracucci.com/linux-tcp-rto-min-max-and-tcp-retries2.html
	DefaultOutboundRuleIdleTimeoutInMinutes = 30
	// AddonModeEnsureExists
	AddonModeEnsureExists = "EnsureExists"
	// AddonModeReconcile
	AddonModeReconcile = "Reconcile"
	// VMSSVMType is the string const for the vmss VM Type
	VMSSVMType = "vmss"
	// StandardVMType is the string const for the standard VM Type
	StandardVMType = "standard"
	// DefaultRunUnattendedUpgradesOnBootstrap sets the default configuration for running a blocking unattended-upgrade on Linux VMs as part of CSE
	DefaultRunUnattendedUpgradesOnBootstrap = true
	// DefaultEnableUnattendedUpgrades sets the default configuration for running unattended-upgrade on a regular schedule in the background
	DefaultEnableUnattendedUpgrades = true
	// DefaultEnableUnattendedUpgradesAzureStack sets the default configuration for running unattended-upgrade on a regular schedule in the background for Azure Stack Hub
	DefaultEnableUnattendedUpgradesAzureStack = true
	// DefaultEth0MTU is the default MTU configuration for eth0 Linux interfaces
	DefaultEth0MTU = 1500
)
View Source
const (
	APIVersionAuthorizationUser   = "2018-09-01-preview"
	APIVersionAuthorizationSystem = "2018-09-01-preview"
	APIVersionCompute             = "2019-07-01"
	APIVersionDeployments         = "2018-06-01"
	APIVersionKeyVault            = "2019-09-01"
	APIVersionManagedIdentity     = "2018-11-30"
	APIVersionNetwork             = "2018-08-01"
	APIVersionStorage             = "2018-07-01"
)

Azure API Versions

View Source
const (
	// DefaultUseInstanceMetadata set to false as Azure Stack today doesn't support instance metadata service
	DefaultAzureStackUseInstanceMetadata = false
	// DefaultAzureStackAcceleratedNetworking set to false as Azure Stack today doesn't support accelerated networking
	DefaultAzureStackAcceleratedNetworking = false
	// DefaultAzureStackAvailabilityProfile set to AvailabilitySet as VMSS clusters are not suppored on Azure Stack
	DefaultAzureStackAvailabilityProfile = AvailabilitySet
	// DefaultAzureStackFaultDomainCount set to 3 as Azure Stack today has minimum 4 node deployment
	DefaultAzureStackFaultDomainCount = 3
	// MaxAzureStackManagedDiskSize is the size in GB of the etcd disk volumes when total nodes count is greater than 10
	MaxAzureStackManagedDiskSize = "1023"
	// AzureStackSuffix is appended to kubernetes version on Azure Stack instances
	AzureStackSuffix = "-azs"
	// DefaultAzureStackLoadBalancerSku determines the aks-engine provided default for enabling Azure cloudprovider load balancer SKU on Azure Stack
	DefaultAzureStackLoadBalancerSku = BasicLoadBalancerSku
)

AzureStackCloud Specific Defaults

View Source
const (
	CloudProviderBackoffModeV2 = "v2"
	// DefaultKubernetesCloudProviderBackoffRetries is 6, takes effect if DefaultKubernetesCloudProviderBackoff is true
	DefaultKubernetesCloudProviderBackoffRetries = 6
	// DefaultKubernetesCloudProviderBackoffJitter is 1, takes effect if DefaultKubernetesCloudProviderBackoff is true
	DefaultKubernetesCloudProviderBackoffJitter = 1.0
	// DefaultKubernetesCloudProviderBackoffDuration is 5, takes effect if DefaultKubernetesCloudProviderBackoff is true
	DefaultKubernetesCloudProviderBackoffDuration = 5
	// DefaultKubernetesCloudProviderBackoffExponent is 1.5, takes effect if DefaultKubernetesCloudProviderBackoff is true
	DefaultKubernetesCloudProviderBackoffExponent = 1.5
	// DefaultKubernetesCloudProviderRateLimitQPS is 3, takes effect if DefaultKubernetesCloudProviderRateLimit is true
	DefaultKubernetesCloudProviderRateLimitQPS = 3.0
	// DefaultKubernetesCloudProviderRateLimitQPSWrite is 1, takes effect if DefaultKubernetesCloudProviderRateLimit is true
	DefaultKubernetesCloudProviderRateLimitQPSWrite = 1.0
	// DefaultKubernetesCloudProviderRateLimitBucket is 10, takes effect if DefaultKubernetesCloudProviderRateLimit is true
	DefaultKubernetesCloudProviderRateLimitBucket = 10
	// DefaultKubernetesCloudProviderRateLimitBucketWrite is 10, takes effect if DefaultKubernetesCloudProviderRateLimit is true
	DefaultKubernetesCloudProviderRateLimitBucketWrite = DefaultKubernetesCloudProviderRateLimitBucket
)
View Source
const (
	DefaultAzureStackKubernetesCloudProviderBackoffRetries       = 1
	DefaultAzureStackKubernetesCloudProviderBackoffJitter        = 1.0
	DefaultAzureStackKubernetesCloudProviderBackoffDuration      = 30
	DefaultAzureStackKubernetesCloudProviderBackoffExponent      = 1.5
	DefaultAzureStackKubernetesCloudProviderRateLimitQPS         = 100.0
	DefaultAzureStackKubernetesCloudProviderRateLimitQPSWrite    = 25.0
	DefaultAzureStackKubernetesCloudProviderRateLimitBucket      = 150
	DefaultAzureStackKubernetesCloudProviderRateLimitBucketWrite = 30
	DefaultAzureStackKubernetesNodeStatusUpdateFrequency         = "1m"
	DefaultAzureStackKubernetesCtrlMgrRouteReconciliationPeriod  = "1m"
	DefaultAzureStackKubernetesCtrlMgrNodeMonitorGracePeriod     = "5m"
	DefaultAzureStackKubernetesCtrlMgrPodEvictionTimeout         = "5m"
)

Azure Stack configures all clusters as if they were large clusters.

View Source
const (
	// AzureCniPluginVerLinux specifies version of Azure CNI plugin, which has been mirrored from
	// https://github.com/Azure/azure-container-networking/releases/download/${AZURE_PLUGIN_VER}/azure-vnet-cni-linux-amd64-${AZURE_PLUGIN_VER}.tgz
	// to https://kubernetesartifacts.azureedge.net/azure-cni
	AzureCniPluginVerLinux = "v1.4.39.1"
	// AzureCniPluginVerWindows specifies version of Azure CNI plugin, which has been mirrored from
	// https://github.com/Azure/azure-container-networking/releases/download/${AZURE_PLUGIN_VER}/azure-vnet-cni-windows-amd64-${AZURE_PLUGIN_VER}.zip
	// to https://kubernetesartifacts.azureedge.net/azure-cni
	AzureCniPluginVerWindows = "v1.4.16"
	// CNIPluginVer specifies the version of CNI implementation
	// https://github.com/containernetworking/plugins
	CNIPluginVer = "v0.9.1"
	// WindowsPauseImageVersion specifies version of Windows pause image
	WindowsPauseImageVersion = "3.4.1"
	// DefaultAlwaysPullWindowsPauseImage is the default windowsProfile.AlwaysPullWindowsPauseImage value
	DefaultAlwaysPullWindowsPauseImage = false
)
View Source
const (
	// DefaultKubernetesMasterSubnet specifies the default subnet for masters and agents.
	// Except when master VMSS is used, this specifies the default subnet for masters.
	DefaultKubernetesMasterSubnet = "10.240.0.0/16"
	// DefaultKubernetesMasterSubnetIPv6 specifies the default IPv6 subnet for masters and agents.
	// Except when master VMSS is used, this specifies the default subnet for masters.
	DefaultKubernetesMasterSubnetIPv6 = "2001:1234:5678:9abc::/64"
	// DefaultAgentSubnetTemplate specifies a default agent subnet
	DefaultAgentSubnetTemplate = "10.%d.0.0/16"
	// DefaultKubernetesSubnet specifies the default subnet used for all masters, agents and pods
	// when VNET integration is enabled.
	DefaultKubernetesSubnet = "10.240.0.0/12"
	// DefaultVNETCIDR is the default CIDR block for the VNET
	DefaultVNETCIDR = "10.0.0.0/8"
	// DefaultVNETCIDRIPv6 is the default IPv6 CIDR block for the VNET
	DefaultVNETCIDRIPv6 = "2001:1234:5678:9a00::/56"
	// DefaultKubernetesMaxPods is the maximum number of pods to run on a node.
	DefaultKubernetesMaxPods = 110
	// DefaultKubernetesMaxPodsVNETIntegrated is the maximum number of pods to run on a node when VNET integration is enabled.
	DefaultKubernetesMaxPodsVNETIntegrated = 30
	// DefaultKubernetesClusterDomain is the dns suffix used in the cluster (used as a SAN in the PKI generation)
	DefaultKubernetesClusterDomain = "cluster.local"
	// DefaultInternalLbStaticIPOffset specifies the offset of the internal LoadBalancer's IP
	// address relative to the first consecutive Kubernetes static IP
	DefaultInternalLbStaticIPOffset = 10
	// NetworkPolicyCalico is the string expression for calico network policy config option
	NetworkPolicyCalico = "calico"
	// NetworkPolicyCilium is the string expression for cilium network policy config option
	NetworkPolicyCilium = "cilium"
	// NetworkPluginCilium is the string expression for cilium network plugin config option
	NetworkPluginCilium = NetworkPolicyCilium
	// NetworkPluginFlannel is the string expression for flannel network policy config option
	NetworkPluginFlannel = "flannel"
	// NetworkPluginAntrea is the string expression for antrea network plugin config option
	NetworkPluginAntrea = "antrea"
	// NetworkPolicyAntrea is the string expression for antrea network policy config option
	NetworkPolicyAntrea = NetworkPluginAntrea
	// DefaultNetworkPlugin defines the network plugin to use by default
	DefaultNetworkPlugin = NetworkPluginKubenet
	// DefaultNetworkPolicy defines the network policy implementation to use by default
	DefaultNetworkPolicy = ""
	// DefaultNetworkPluginWindows defines the network plugin implementation to use by default for clusters with Windows agent pools
	DefaultNetworkPluginWindows = NetworkPluginKubenet
	// DefaultNetworkPolicyWindows defines the network policy implementation to use by default for clusters with Windows agent pools
	DefaultNetworkPolicyWindows = ""
	// DefaultContainerRuntime is docker
	DefaultContainerRuntime = Docker
	// DefaultKubernetesNodeStatusUpdateFrequency is 10s, see --node-status-update-frequency at https://kubernetes.io/docs/admin/kubelet/
	DefaultKubernetesNodeStatusUpdateFrequency = "10s"
	// DefaultKubernetesHardEvictionThreshold is memory.available<100Mi,nodefs.available<10%,nodefs.inodesFree<5%, see --eviction-hard at https://kubernetes.io/docs/admin/kubelet/
	DefaultKubernetesHardEvictionThreshold = "memory.available<750Mi,nodefs.available<10%,nodefs.inodesFree<5%"
	// DefaultKubernetesCtrlMgrNodeMonitorGracePeriod is 40s, see --node-monitor-grace-period at https://kubernetes.io/docs/admin/kube-controller-manager/
	DefaultKubernetesCtrlMgrNodeMonitorGracePeriod = "40s"
	// DefaultKubernetesCtrlMgrPodEvictionTimeout is 5m0s, see --pod-eviction-timeout at https://kubernetes.io/docs/admin/kube-controller-manager/
	DefaultKubernetesCtrlMgrPodEvictionTimeout = "5m0s"
	// DefaultKubernetesCtrlMgrRouteReconciliationPeriod is 10s, see --route-reconciliation-period at https://kubernetes.io/docs/admin/kube-controller-manager/
	DefaultKubernetesCtrlMgrRouteReconciliationPeriod = "10s"
	// DefaultKubernetesCtrlMgrTerminatedPodGcThreshold is set to 5000, see --terminated-pod-gc-threshold at https://kubernetes.io/docs/admin/kube-controller-manager/ and https://github.com/kubernetes/kubernetes/issues/22680
	DefaultKubernetesCtrlMgrTerminatedPodGcThreshold = "5000"
	// DefaultKubernetesCtrlMgrUseSvcAccountCreds is "true", see --use-service-account-credentials at https://kubernetes.io/docs/admin/kube-controller-manager/
	DefaultKubernetesCtrlMgrUseSvcAccountCreds = "false"
	// DefaultKubernetesCloudProviderRateLimit is false to disable cloudprovider rate limiting implementation for API calls
	DefaultKubernetesCloudProviderRateLimit = true
	// DefaultTillerMaxHistory limits the maximum number of revisions saved per release. Use 0 for no limit.
	DefaultTillerMaxHistory = 0
	//DefaultKubernetesGCHighThreshold specifies the value for  for the image-gc-high-threshold kubelet flag
	DefaultKubernetesGCHighThreshold = 85
	//DefaultKubernetesGCLowThreshold specifies the value for the image-gc-low-threshold kubelet flag
	DefaultKubernetesGCLowThreshold = 80
	// DefaultEtcdVersion specifies the default etcd version to install
	DefaultEtcdVersion = "3.3.25"
	// DefaultEtcdDiskSize specifies the default size for Kubernetes master etcd disk volumes in GB
	DefaultEtcdDiskSize = "256"
	// DefaultEtcdDiskSizeGT3Nodes = size for Kubernetes master etcd disk volumes in GB if > 3 nodes
	DefaultEtcdDiskSizeGT3Nodes = "512"
	// DefaultEtcdDiskSizeGT10Nodes = size for Kubernetes master etcd disk volumes in GB if > 10 nodes
	DefaultEtcdDiskSizeGT10Nodes = "1024"
	// DefaultEtcdDiskSizeGT20Nodes = size for Kubernetes master etcd disk volumes in GB if > 20 nodes
	DefaultEtcdDiskSizeGT20Nodes = "2048"
	// DefaultEtcdStorageLimitGB specifies the default size for etcd data storage limit
	DefaultEtcdStorageLimitGB = 2
	// DefaultMasterEtcdClientPort is the default etcd client port for Kubernetes master nodes
	DefaultMasterEtcdClientPort = 2379
	// DefaultKubeletEventQPS is 0, see --event-qps at https://kubernetes.io/docs/reference/generated/kubelet/
	DefaultKubeletEventQPS = "0"
	// DefaultKubeletCadvisorPort is 0, see --cadvisor-port at https://kubernetes.io/docs/reference/generated/kubelet/
	DefaultKubeletCadvisorPort = "0"
	// DefaultKubeletHealthzPort is the default /healthz port for the kubelet runtime
	DefaultKubeletHealthzPort = "10248"
	// DefaultJumpboxDiskSize specifies the default size for private cluster jumpbox OS disk in GB
	DefaultJumpboxDiskSize = 30
	// DefaultJumpboxUsername specifies the default admin username for the private cluster jumpbox
	DefaultJumpboxUsername = "azureuser"
	// DefaultKubeletPodMaxPIDs specifies the default max pid authorized by pods
	DefaultKubeletPodMaxPIDs = -1
	// DefaultKubernetesAgentSubnetVMSS specifies the default subnet for agents when master is VMSS
	DefaultKubernetesAgentSubnetVMSS = "10.248.0.0/13"
	// DefaultKubernetesClusterSubnet specifies the default subnet for pods.
	DefaultKubernetesClusterSubnet = "10.244.0.0/16"
	// DefaultKubernetesClusterSubnetIPv6 specifies the IPv6 default subnet for pods.
	DefaultKubernetesClusterSubnetIPv6 = "fc00::/48"
	// DefaultKubernetesServiceCIDR specifies the IP subnet that kubernetes will create Service IPs within.
	DefaultKubernetesServiceCIDR = "10.0.0.0/16"
	// DefaultKubernetesDNSServiceIP specifies the IP address that kube-dns listens on by default. must by in the default Service CIDR range.
	DefaultKubernetesDNSServiceIP = "10.0.0.10"
	// DefaultKubernetesServiceCIDRIPv6 specifies the IPv6 subnet that kubernetes will create Service IPs within.
	DefaultKubernetesServiceCIDRIPv6 = "fd00::/108"
	// DefaultKubernetesDNSServiceIPv6 specifies the IPv6 address that kube-dns listens on by default. must by in the default Service CIDR range.
	DefaultKubernetesDNSServiceIPv6 = "fd00::10"
	// DefaultMobyVersion specifies the default Azure build version of Moby to install.
	DefaultMobyVersion = "20.10.14"
	// DefaultContainerdVersion specifies the default containerd version to install.
	DefaultContainerdVersion = "1.5.13"
	// DefaultDockerBridgeSubnet specifies the default subnet for the docker bridge network for masters and agents.
	DefaultDockerBridgeSubnet = "172.17.0.1/16"
	// DefaultKubernetesMaxPodsKubenet is the maximum number of pods to run on a node for Kubenet.
	DefaultKubernetesMaxPodsKubenet = "110"
	// DefaultKubernetesMaxPodsAzureCNI is the maximum number of pods to run on a node for Azure CNI.
	DefaultKubernetesMaxPodsAzureCNI = "30"
	// DefaultKubernetesAPIServerEnableProfiling is the config that enables profiling via web interface host:port/debug/pprof/
	DefaultKubernetesAPIServerEnableProfiling = "false"
	// DefaultKubernetesAPIServerVerbosity is the default verbosity setting for the apiserver
	DefaultKubernetesAPIServerVerbosity = "2"
	// DefaultKubernetesCtrMgrEnableProfiling is the config that enables profiling via web interface host:port/debug/pprof/
	DefaultKubernetesCtrMgrEnableProfiling = "false"
	// DefaultKubernetesSchedulerEnableProfiling is the config that enables profiling via web interface host:port/debug/pprof/
	DefaultKubernetesSchedulerEnableProfiling = "false"
	// DefaultNonMasqueradeCIDR is the default --non-masquerade-cidr value for kubelet
	DefaultNonMasqueradeCIDR = "0.0.0.0/0"
	// DefaultKubeProxyMode is the default KubeProxyMode value
	DefaultKubeProxyMode KubeProxyMode = KubeProxyModeIPTables
	// DefaultWindowsSSHEnabled is the default windowsProfile.sshEnabled value
	DefaultWindowsSSHEnabled = true
	// DefaultWindowsContainerdURL is the URL for the default containerd package on Windows
	DefaultWindowsContainerdURL = "" /* 130-byte string literal not displayed */
)
View Source
const (
	DefaultWindowsCsiProxyVersion                   = "v0.2.2"
	DefaultWindowsProvisioningScriptsPackageVersion = "v0.0.16"
)

WindowsProfile defaults TODO: Move other values defined in WindowsProfiles (like DefaultWindowsSSHEnabled) here.

View Source
const (
	// AzurePublicCloud is a const string reference identifier for public cloud
	AzurePublicCloud = "AzurePublicCloud"
	// AzureChinaCloud is a const string reference identifier for china cloud
	AzureChinaCloud = "AzureChinaCloud"
	// AzureGermanCloud is a const string reference identifier for german cloud
	AzureGermanCloud = "AzureGermanCloud"
	// AzureUSGovernmentCloud is a const string reference identifier for us government cloud
	AzureUSGovernmentCloud = "AzureUSGovernmentCloud"
	// AzureStackCloud is a const string reference identifier for Azure Stack cloud
	AzureStackCloud = "AzureStackCloud"
)
View Source
const (
	// AzureADIdentitySystem is a const string reference identifier for Azure AD identity System
	AzureADIdentitySystem = "azure_ad"
	// ADFSIdentitySystem is a const string reference identifier for ADFS identity System
	ADFSIdentitySystem = "adfs"
)
View Source
const (
	// AzureCustomCloudDependenciesLocationPublic indicates to get dependencies from in AzurePublic cloud
	AzureCustomCloudDependenciesLocationPublic = "public"
	// AzureCustomCloudDependenciesLocationChina indicates to get dependencies from AzureChina cloud
	AzureCustomCloudDependenciesLocationChina = "china"
	// AzureCustomCloudDependenciesLocationGerman indicates to get dependencies from AzureGerman cloud
	AzureCustomCloudDependenciesLocationGerman = "german"
	// AzureCustomCloudDependenciesLocationUSGovernment indicates to get dependencies from AzureUSGovernment cloud
	AzureCustomCloudDependenciesLocationUSGovernment = "usgovernment"
)
View Source
const (
	// ClientSecretAuthMethod indicates to use client seret for authentication
	ClientSecretAuthMethod = "client_secret"
	// ClientCertificateAuthMethod indicates to use client certificate for authentication
	ClientCertificateAuthMethod = "client_certificate"
)
View Source
const (
	KubeRBACProxyImageReference               string = "gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0"
	ScheduledMaintenanceManagerImageReference string = "quay.io/awesomenix/drainsafe-manager:latest"
)
View Source
const (
	// WindowsLicenseTypeServer specifies that the image or disk that is being used was licensed server on-premises.
	WindowsLicenseTypeServer string = "Windows_Server"
	// WindowsLicenseTypeNone specifies that the image or disk that is being used was not licensed on-premises.
	WindowsLicenseTypeNone string = "None"
)
View Source
const (
	//DefaultExtensionsRootURL  Root URL for extensions
	DefaultExtensionsRootURL = "https://raw.githubusercontent.com/Azure/aks-engine/master/"
)
View Source
const (
	DefaultMicrosoftAptRepositoryURL = "https://packages.microsoft.com"
)
View Source
const (
	// Kubernetes is the string constant for the Kubernetes orchestrator type
	Kubernetes string = "Kubernetes"
)

the orchestrators supported by vlabs

View Source
const TLSStrongCipherSuitesAPIServer = "" /* 375-byte string literal not displayed */

TLSStrongCipherSuitesAPIServer is a kube-bench-recommended allowed cipher suites for apiserver

View Source
const TLSStrongCipherSuitesKubelet = "" /* 295-byte string literal not displayed */

TLSStrongCipherSuitesKubelet is a kube-bench-recommended allowed cipher suites for kubelet

View Source
const (
	// VHDDiskSizeAKS maps to the OSDiskSizeGB for AKS VHD image
	VHDDiskSizeAKS = 30
)

Variables

View Source
var (
	// DefaultKubernetesSpecConfig is the default Docker image source of Kubernetes
	DefaultKubernetesSpecConfig = KubernetesSpecConfig{
		KubernetesImageBase:                  "registry.k8s.io/",
		TillerImageBase:                      "mcr.microsoft.com/",
		NVIDIAImageBase:                      "mcr.microsoft.com/",
		CalicoImageBase:                      "mcr.microsoft.com/oss/calico/",
		AzureCNIImageBase:                    "mcr.microsoft.com/containernetworking/",
		MCRKubernetesImageBase:               "mcr.microsoft.com/",
		EtcdDownloadURLBase:                  "mcr.microsoft.com/oss/etcd-io/",
		KubeBinariesSASURLBase:               "https://kubernetesartifacts.azureedge.net/kubernetes/",
		WindowsTelemetryGUID:                 "fb801154-36b9-41bc-89c2-f4d4f05472b0",
		CNIPluginsDownloadURL:                "https://kubernetesartifacts.azureedge.net/cni-plugins/" + CNIPluginVer + "/binaries/cni-plugins-linux-amd64-" + CNIPluginVer + ".tgz",
		VnetCNILinuxPluginsDownloadURL:       "https://kubernetesartifacts.azureedge.net/azure-cni/" + AzureCniPluginVerLinux + "/binaries/azure-vnet-cni-linux-amd64-" + AzureCniPluginVerLinux + ".tgz",
		VnetCNIWindowsPluginsDownloadURL:     "https://kubernetesartifacts.azureedge.net/azure-cni/" + AzureCniPluginVerWindows + "/binaries/azure-vnet-cni-singletenancy-windows-amd64-" + AzureCniPluginVerWindows + ".zip",
		ContainerdDownloadURLBase:            "https://storage.googleapis.com/cri-containerd-release/",
		CSIProxyDownloadURL:                  "https://kubernetesartifacts.azureedge.net/csi-proxy/" + DefaultWindowsCsiProxyVersion + "/binaries/csi-proxy-" + DefaultWindowsCsiProxyVersion + ".tar.gz",
		WindowsProvisioningScriptsPackageURL: "https://kubernetesartifacts.azureedge.net/aks-engine/windows/provisioning/signedscripts-" + DefaultWindowsProvisioningScriptsPackageVersion + ".zip",
		WindowsPauseImageURL:                 "mcr.microsoft.com/oss/kubernetes/pause:" + WindowsPauseImageVersion,
		AlwaysPullWindowsPauseImage:          DefaultAlwaysPullWindowsPauseImage,
	}

	//Ubuntu1604OSImageConfig is the default Linux distribution.
	Ubuntu1604OSImageConfig = AzureOSImageConfig{
		ImageOffer:     "UbuntuServer",
		ImageSku:       "16.04-LTS",
		ImagePublisher: "Canonical",
		ImageVersion:   "latest",
	}

	//Ubuntu1804OSImageConfig is the Ubunutu 18.04-LTS Linux distribution.
	Ubuntu1804OSImageConfig = AzureOSImageConfig{
		ImageOffer:     "UbuntuServer",
		ImageSku:       "18.04-LTS",
		ImagePublisher: "Canonical",
		ImageVersion:   "latest",
	}

	//Ubuntu1804Gen2OSImageConfig is Gen2 flavor the Ubunutu 18.04-LTS Linux distribution.
	Ubuntu1804Gen2OSImageConfig = AzureOSImageConfig{
		ImageOffer:     "UbuntuServer",
		ImageSku:       "18_04-lts-gen2",
		ImagePublisher: "Canonical",
		ImageVersion:   "latest",
	}

	//Ubuntu2004OSImageConfig is the Ubunutu 18.04-LTS Linux distribution.
	Ubuntu2004OSImageConfig = AzureOSImageConfig{
		ImageOffer:     "0001-com-ubuntu-server-focal",
		ImageSku:       "20_04-lts",
		ImagePublisher: "Canonical",
		ImageVersion:   "latest",
	}

	//Ubuntu2004Gen2OSImageConfig is Gen2 flavor the Ubunutu 20.04-LTS Linux distribution.
	Ubuntu2004Gen2OSImageConfig = AzureOSImageConfig{
		ImageOffer:     "0001-com-ubuntu-server-focal",
		ImageSku:       "20_04-lts-gen2",
		ImagePublisher: "Canonical",
		ImageVersion:   "latest",
	}

	//FlatcarImageConfig is the Flatcar Linux distribution.
	FlatcarImageConfig = AzureOSImageConfig{
		ImageOffer:     "flatcar-container-linux-free",
		ImageSku:       "stable",
		ImagePublisher: "kinvolk",
		ImageVersion:   "latest",
	}

	// AKSUbuntu1604OSImageConfig is the AKS image based on Ubuntu 16.04-LTS.
	// Ubuntu 16.04-LTS has reached EOL as of April 2021, the below image reference should never be updated
	// Eventually this VHD reference will be deprecated altogether
	AKSUbuntu1604OSImageConfig = AzureOSImageConfig{
		ImageOffer:     "aks",
		ImageSku:       "aks-engine-ubuntu-1604-202007",
		ImagePublisher: "microsoft-aks",
		ImageVersion:   "2021.04.13",
	}

	// AKSUbuntu1804OSImageConfig is the AKS image based on Ubuntu 18.04-LTS.
	AKSUbuntu1804OSImageConfig = AzureOSImageConfig{
		ImageOffer:     "aks",
		ImageSku:       "aks-engine-ubuntu-1804-202112",
		ImagePublisher: "microsoft-aks",
		ImageVersion:   "2023.08.25",
	}

	// AKSUbuntu2004OSImageConfig is the AKS Engine image based on Ubuntu 20.04-LTS.
	AKSUbuntu2004OSImageConfig = AzureOSImageConfig{
		ImageOffer:     "aks",
		ImageSku:       "aks-engine-ubuntu-2004-202301",
		ImagePublisher: "microsoft-aks",
		ImageVersion:   "2023.08.25",
	}

	// AKSWindowsServer2019OSImageConfig is the aks-engine image based on Windows Server 2019
	AKSWindowsServer2019OSImageConfig = AzureOSImageConfig{
		ImageOffer:     "aks-windows",
		ImageSku:       "2019-datacenter-core-smalldisk-2304",
		ImagePublisher: "microsoft-aks",
		ImageVersion:   "17763.4252.230414",
	}

	// AKSWindowsServer2019ContainerDOSImageConfig is the aks-engine image based on Windows Server 2019
	// configured with containerd
	AKSWindowsServer2019ContainerDOSImageConfig = AzureOSImageConfig{
		ImageOffer:     "aks-windows",
		ImageSku:       "2019-datacenter-core-ctrd-2308",
		ImagePublisher: "microsoft-aks",
		ImageVersion:   "17763.4252.230828",
	}

	// WindowsServer2019OSImageConfig is the 'vanilla' Windows Server 2019 image
	WindowsServer2019OSImageConfig = AzureOSImageConfig{
		ImageOffer:     "WindowsServer",
		ImageSku:       "2019-Datacenter-Core-with-Containers-smalldisk",
		ImagePublisher: "MicrosoftWindowsServer",
		ImageVersion:   "17763.4252.230404",
	}

	// ACC1604OSImageConfig is the ACC image based on Ubuntu 16.04.
	ACC1604OSImageConfig = AzureOSImageConfig{
		ImageOffer:     "confidential-compute-preview",
		ImageSku:       "16.04-LTS",
		ImagePublisher: "Canonical",
		ImageVersion:   "latest",
	}

	//AzureCloudSpec is the default configurations for global azure.
	AzureCloudSpec = AzureEnvironmentSpecConfig{
		CloudName: AzurePublicCloud,

		KubernetesSpecConfig: DefaultKubernetesSpecConfig,

		EndpointConfig: AzureEndpointConfig{
			ResourceManagerVMDNSSuffix: "cloudapp.azure.com",
		},

		OSImageConfig: map[Distro]AzureOSImageConfig{
			Ubuntu:            Ubuntu1604OSImageConfig,
			Ubuntu1804:        Ubuntu1804OSImageConfig,
			Ubuntu1804Gen2:    Ubuntu1804Gen2OSImageConfig,
			Ubuntu2004:        Ubuntu2004OSImageConfig,
			Ubuntu2004Gen2:    Ubuntu2004Gen2OSImageConfig,
			Flatcar:           FlatcarImageConfig,
			AKSUbuntu1604:     AKSUbuntu1604OSImageConfig,
			AKS1604Deprecated: AKSUbuntu1604OSImageConfig,
			AKSUbuntu1804:     AKSUbuntu1804OSImageConfig,
			AKS1804Deprecated: AKSUbuntu1804OSImageConfig,
			AKSUbuntu2004:     AKSUbuntu2004OSImageConfig,
			ACC1604:           ACC1604OSImageConfig,
		},
	}

	//AzureGermanCloudSpec is the German cloud config.
	AzureGermanCloudSpec = AzureEnvironmentSpecConfig{
		CloudName:            AzureGermanCloud,
		KubernetesSpecConfig: DefaultKubernetesSpecConfig,
		EndpointConfig: AzureEndpointConfig{
			ResourceManagerVMDNSSuffix: "cloudapp.microsoftazure.de",
		},
		OSImageConfig: map[Distro]AzureOSImageConfig{
			Ubuntu:            Ubuntu1604OSImageConfig,
			Ubuntu1804:        Ubuntu1804OSImageConfig,
			Ubuntu1804Gen2:    Ubuntu1804Gen2OSImageConfig,
			Ubuntu2004:        Ubuntu2004OSImageConfig,
			Ubuntu2004Gen2:    Ubuntu2004Gen2OSImageConfig,
			Flatcar:           FlatcarImageConfig,
			AKSUbuntu1604:     Ubuntu1604OSImageConfig,
			AKS1604Deprecated: Ubuntu1604OSImageConfig,
			AKSUbuntu1804:     Ubuntu1604OSImageConfig,
			AKS1804Deprecated: Ubuntu1604OSImageConfig,
		},
	}

	//AzureUSGovernmentCloudSpec is the US government config.
	AzureUSGovernmentCloudSpec = AzureEnvironmentSpecConfig{
		CloudName:            AzureUSGovernmentCloud,
		KubernetesSpecConfig: DefaultKubernetesSpecConfig,
		EndpointConfig: AzureEndpointConfig{
			ResourceManagerVMDNSSuffix: "cloudapp.usgovcloudapi.net",
		},
		OSImageConfig: map[Distro]AzureOSImageConfig{
			Ubuntu:            Ubuntu1604OSImageConfig,
			Ubuntu1804:        Ubuntu1804OSImageConfig,
			Ubuntu1804Gen2:    Ubuntu1804Gen2OSImageConfig,
			Ubuntu2004:        Ubuntu2004OSImageConfig,
			Ubuntu2004Gen2:    Ubuntu2004Gen2OSImageConfig,
			Flatcar:           FlatcarImageConfig,
			AKSUbuntu1604:     AKSUbuntu1604OSImageConfig,
			AKS1604Deprecated: AKSUbuntu1604OSImageConfig,
			AKSUbuntu1804:     AKSUbuntu1804OSImageConfig,
			AKS1804Deprecated: AKSUbuntu1804OSImageConfig,
			AKSUbuntu2004:     AKSUbuntu2004OSImageConfig,
		},
	}

	//AzureChinaCloudSpec is the configurations for Azure China (Mooncake)
	AzureChinaCloudSpec = AzureEnvironmentSpecConfig{
		CloudName: AzureChinaCloud,

		KubernetesSpecConfig: KubernetesSpecConfig{
			KubernetesImageBase:    "gcr.azk8s.cn/google_containers/",
			TillerImageBase:        "mcr.microsoft.com/",
			NVIDIAImageBase:        "mcr.microsoft.com/",
			AzureCNIImageBase:      "mcr.azk8s.cn/containernetworking/",
			MCRKubernetesImageBase: "mcr.microsoft.com/",
			CalicoImageBase:        "dockerhub.azk8s.cn/calico/",
			EtcdDownloadURLBase:    "mcr.microsoft.com/oss/etcd-io/",

			KubeBinariesSASURLBase:               DefaultKubernetesSpecConfig.KubeBinariesSASURLBase,
			WindowsTelemetryGUID:                 DefaultKubernetesSpecConfig.WindowsTelemetryGUID,
			CNIPluginsDownloadURL:                "https://mirror.azk8s.cn/kubernetes/containernetworking-plugins/cni-plugins-linux-amd64-" + CNIPluginVer + ".tgz",
			VnetCNILinuxPluginsDownloadURL:       "https://mirror.azk8s.cn/azure-cni/" + AzureCniPluginVerLinux + "/binaries/azure-vnet-cni-linux-amd64-" + AzureCniPluginVerLinux + ".tgz",
			VnetCNIWindowsPluginsDownloadURL:     "https://mirror.azk8s.cn/azure-cni/" + AzureCniPluginVerWindows + "/binaries/azure-vnet-cni-singletenancy-windows-amd64-" + AzureCniPluginVerWindows + ".zip",
			ContainerdDownloadURLBase:            "https://mirror.azk8s.cn/kubernetes/containerd/",
			CSIProxyDownloadURL:                  "https://mirror.azk8s.cn/csi-proxy/" + DefaultWindowsCsiProxyVersion + "/binaries/csi-proxy-" + DefaultWindowsCsiProxyVersion + ".tar.gz",
			WindowsProvisioningScriptsPackageURL: "https://mirror.azk8s.cn/aks-engine/windows/provisioning/signedscripts-" + DefaultWindowsProvisioningScriptsPackageVersion + ".zip",
			WindowsPauseImageURL:                 "mcr.microsoft.com/oss/kubernetes/pause:" + WindowsPauseImageVersion,
			AlwaysPullWindowsPauseImage:          DefaultAlwaysPullWindowsPauseImage,
		},

		EndpointConfig: AzureEndpointConfig{
			ResourceManagerVMDNSSuffix: "cloudapp.chinacloudapi.cn",
		},
		OSImageConfig: map[Distro]AzureOSImageConfig{
			Ubuntu:            Ubuntu1604OSImageConfig,
			Ubuntu1804:        Ubuntu1804OSImageConfig,
			Ubuntu1804Gen2:    Ubuntu1804Gen2OSImageConfig,
			Ubuntu2004:        Ubuntu2004OSImageConfig,
			Ubuntu2004Gen2:    Ubuntu2004Gen2OSImageConfig,
			Flatcar:           FlatcarImageConfig,
			AKSUbuntu1604:     AKSUbuntu1604OSImageConfig,
			AKS1604Deprecated: AKSUbuntu1604OSImageConfig,
			AKSUbuntu1804:     AKSUbuntu1804OSImageConfig,
			AKS1804Deprecated: AKSUbuntu1804OSImageConfig,
			AKSUbuntu2004:     AKSUbuntu2004OSImageConfig,
		},
	}

	// AzureCloudSpecEnvMap is the environment configuration map for all the Azure cloud environments.
	AzureCloudSpecEnvMap = map[string]AzureEnvironmentSpecConfig{
		AzureChinaCloud:        AzureChinaCloudSpec,
		AzureGermanCloud:       AzureGermanCloudSpec,
		AzureUSGovernmentCloud: AzureUSGovernmentCloudSpec,
		AzurePublicCloud:       AzureCloudSpec,
	}
)

DistroValues is a list of currently supported distros

Functions

func ConvertContainerServiceToVLabs

func ConvertContainerServiceToVLabs(api *ContainerService) *vlabs.ContainerService

ConvertContainerServiceToVLabs converts an unversioned ContainerService to a vlabs ContainerService

func ConvertOrchestratorVersionProfileToVLabs

func ConvertOrchestratorVersionProfileToVLabs(api *OrchestratorVersionProfile) *vlabs.OrchestratorVersionProfile

ConvertOrchestratorVersionProfileToVLabs converts an unversioned OrchestratorVersionProfile to a vlabs OrchestratorVersionProfile

func FormatAzureProdFQDNByLocation

func FormatAzureProdFQDNByLocation(fqdnPrefix string, location string) string

FormatAzureProdFQDNByLocation constructs an Azure prod fqdn

func FormatProdFQDNByLocation added in v0.31.0

func FormatProdFQDNByLocation(fqdnPrefix string, location string, cloudName string) string

FormatProdFQDNByLocation constructs an Azure prod fqdn with custom cloud profile CustomCloudName is name of environment if customCloudProfile is provided, it will be empty string if customCloudProfile is empty. Because customCloudProfile is empty for deployment for AzurePublicCloud, AzureChinaCloud,AzureGermanCloud,AzureUSGovernmentCloud, The customCloudName value will be empty string for those clouds

func GetClusterAutoscalerNodesConfig added in v0.44.0

func GetClusterAutoscalerNodesConfig(addon KubernetesAddon, cs *ContainerService) string

GetClusterAutoscalerNodesConfig returns the cluster-autoscaler runtime configuration flag for a nodepool

func GetComponentsIndexByName added in v0.50.0

func GetComponentsIndexByName(components []KubernetesComponent, name string) int

func GetK8sComponentsByVersionMap added in v0.48.0

func GetK8sComponentsByVersionMap(k *KubernetesConfig) map[string]map[string]string

func GetOrchestratorVersionProfileListVLabs

func GetOrchestratorVersionProfileListVLabs(orchestrator, version string, windows bool, azureEnv string) (*vlabs.OrchestratorVersionProfileList, error)

GetOrchestratorVersionProfileListVLabs returns vlabs OrchestratorVersionProfileList object per (optionally) specified orchestrator and version

func ImagePublisherAndOfferMatch added in v0.60.2

func ImagePublisherAndOfferMatch(wp *WindowsProfile, imageConfig AzureOSImageConfig) bool

ImagePublisherAndOfferMatch returns true if image publisher and offer match for specified WindowsProfile and AzureOSImageConfig objects

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"`
	// The Azure Active Directory Group Object ID that will be assigned the
	// cluster-admin RBAC role.
	// Optional
	AdminGroupID string `json:"adminGroupID,omitempty"`
	// The authenticator to use, either "oidc" or "webhook".
	Authenticator AuthenticatorType `json:"authenticator"`
}

AADProfile specifies attributes for AAD integration

type AddonNodePoolsConfig added in v0.44.0

type AddonNodePoolsConfig struct {
	Name   string            `json:"name,omitempty"`
	Config map[string]string `json:"config,omitempty"`
}

AddonNodePoolsConfig defines configuration for pool-specific cluster-autoscaler configuration

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,omitempty"`
	OSType                              OSType               `json:"osType,omitempty"`
	Ports                               []int                `json:"ports,omitempty"`
	ProvisioningState                   ProvisioningState    `json:"provisioningState,omitempty"`
	AvailabilityProfile                 string               `json:"availabilityProfile"`
	ScaleSetPriority                    string               `json:"scaleSetPriority,omitempty"`
	ScaleSetEvictionPolicy              string               `json:"scaleSetEvictionPolicy,omitempty"`
	SpotMaxPrice                        *float64             `json:"spotMaxPrice,omitempty"`
	StorageProfile                      string               `json:"storageProfile,omitempty"`
	DiskSizesGB                         []int                `json:"diskSizesGB,omitempty"`
	VnetSubnetID                        string               `json:"vnetSubnetID,omitempty"`
	Subnet                              string               `json:"subnet"`
	IPAddressCount                      int                  `json:"ipAddressCount,omitempty"`
	Distro                              Distro               `json:"distro,omitempty"`
	Role                                AgentPoolProfileRole `json:"role,omitempty"`
	AcceleratedNetworkingEnabled        *bool                `json:"acceleratedNetworkingEnabled,omitempty"`
	AcceleratedNetworkingEnabledWindows *bool                `json:"acceleratedNetworkingEnabledWindows,omitempty"`
	VMSSOverProvisioningEnabled         *bool                `json:"vmssOverProvisioningEnabled,omitempty"`
	FQDN                                string               `json:"fqdn,omitempty"`
	CustomNodeLabels                    map[string]string    `json:"customNodeLabels,omitempty"`
	PreprovisionExtension               *Extension           `json:"preProvisionExtension"`
	Extensions                          []Extension          `json:"extensions"`
	KubernetesConfig                    *KubernetesConfig    `json:"kubernetesConfig,omitempty"`
	OrchestratorVersion                 string               `json:"orchestratorVersion"`
	ImageRef                            *ImageReference      `json:"imageReference,omitempty"`
	MaxCount                            *int                 `json:"maxCount,omitempty"`
	MinCount                            *int                 `json:"minCount,omitempty"`
	EnableAutoScaling                   *bool                `json:"enableAutoScaling,omitempty"`
	AvailabilityZones                   []string             `json:"availabilityZones,omitempty"`
	PlatformFaultDomainCount            *int                 `json:"platformFaultDomainCount"`
	PlatformUpdateDomainCount           *int                 `json:"platformUpdateDomainCount"`
	SinglePlacementGroup                *bool                `json:"singlePlacementGroup,omitempty"`
	VnetCidrs                           []string             `json:"vnetCidrs,omitempty"`
	PreserveNodesProperties             *bool                `json:"preserveNodesProperties,omitempty"`
	WindowsNameVersion                  string               `json:"windowsNameVersion,omitempty"` // Deprecated
	EnableVMSSNodePublicIP              *bool                `json:"enableVMSSNodePublicIP,omitempty"`
	LoadBalancerBackendAddressPoolIDs   []string             `json:"loadBalancerBackendAddressPoolIDs,omitempty"`
	AuditDEnabled                       *bool                `json:"auditDEnabled,omitempty"`
	CustomVMTags                        map[string]string    `json:"customVMTags,omitempty"`
	DiskEncryptionSetID                 string               `json:"diskEncryptionSetID,omitempty"`
	SysctlDConfig                       map[string]string    `json:"sysctldConfig,omitempty"`
	UltraSSDEnabled                     *bool                `json:"ultraSSDEnabled,omitempty"`
	EncryptionAtHost                    *bool                `json:"encryptionAtHost,omitempty"`
	ProximityPlacementGroupID           string               `json:"proximityPlacementGroupID,omitempty"`
	OSDiskCachingType                   string               `json:"osDiskCachingType,omitempty"`
	DataDiskCachingType                 string               `json:"dataDiskCachingType,omitempty"`
	// VMSSName is a read-only field; its value will be computed during template generation
	VMSSName string `json:"vmssName,omitempty"`
}

AgentPoolProfile represents an agent pool definition

func (*AgentPoolProfile) GetKubernetesLabels added in v0.37.0

func (a *AgentPoolProfile) GetKubernetesLabels(rg string, deprecated bool) string

GetKubernetesLabels returns a k8s API-compliant labels string for nodes in this profile

func (*AgentPoolProfile) HasAvailabilityZones

func (a *AgentPoolProfile) HasAvailabilityZones() bool

HasAvailabilityZones returns true if the agent pool has availability zones

func (*AgentPoolProfile) HasDisks

func (a *AgentPoolProfile) HasDisks() bool

HasDisks returns true if the customer specified disks

func (*AgentPoolProfile) HasImageGallery added in v0.38.0

func (a *AgentPoolProfile) HasImageGallery() bool

HasImageGallery returns true if the customer brought os image from Shared Image Gallery

func (*AgentPoolProfile) HasImageRef added in v0.38.0

func (a *AgentPoolProfile) HasImageRef() bool

HasImageRef returns true if the customer brought os image

func (*AgentPoolProfile) IsAuditDEnabled added in v0.42.0

func (a *AgentPoolProfile) IsAuditDEnabled() bool

IsAuditDEnabled returns true if the master profile is configured for auditd

func (*AgentPoolProfile) IsAvailabilitySets

func (a *AgentPoolProfile) IsAvailabilitySets() bool

IsAvailabilitySets returns true if the customer specified disks

func (*AgentPoolProfile) IsCustomVNET

func (a *AgentPoolProfile) IsCustomVNET() bool

IsCustomVNET returns true if the customer brought their own VNET

func (*AgentPoolProfile) IsEphemeral added in v0.40.0

func (a *AgentPoolProfile) IsEphemeral() bool

IsStorageAccount returns true if the customer specified ephemeral disks

func (*AgentPoolProfile) IsFlatcar added in v0.53.0

func (a *AgentPoolProfile) IsFlatcar() bool

IsFlatcar returns true if the agent specified a Flatcar distro

func (*AgentPoolProfile) IsLinux

func (a *AgentPoolProfile) IsLinux() bool

IsLinux returns true if the agent pool is linux

func (*AgentPoolProfile) IsLowPriorityScaleSet

func (a *AgentPoolProfile) IsLowPriorityScaleSet() bool

IsLowPriorityScaleSet returns true if the VMSS is Low Priority

func (*AgentPoolProfile) IsManagedDisks

func (a *AgentPoolProfile) IsManagedDisks() bool

IsManagedDisks returns true if the customer specified disks

func (*AgentPoolProfile) IsNSeriesSKU

func (a *AgentPoolProfile) IsNSeriesSKU() bool

IsNSeriesSKU returns true if the agent pool contains an N-series (NVIDIA GPU) VM

func (*AgentPoolProfile) IsSpotScaleSet added in v0.46.0

func (a *AgentPoolProfile) IsSpotScaleSet() bool

IsSpotScaleSet returns true if the VMSS is Spot Scale Set

func (*AgentPoolProfile) IsStorageAccount

func (a *AgentPoolProfile) IsStorageAccount() bool

IsStorageAccount returns true if the customer specified storage account

func (*AgentPoolProfile) IsUbuntu added in v0.35.0

func (a *AgentPoolProfile) IsUbuntu() bool

IsUbuntu returns true if the master profile distro is any ubuntu distro

func (*AgentPoolProfile) IsUbuntu1604 added in v0.33.0

func (a *AgentPoolProfile) IsUbuntu1604() bool

IsUbuntu1604 returns true if the agent pool profile distro is based on Ubuntu 16.04

func (*AgentPoolProfile) IsUbuntu1804 added in v0.33.0

func (a *AgentPoolProfile) IsUbuntu1804() bool

IsUbuntu1804 returns true if the agent pool profile distro is based on Ubuntu 18.04

func (*AgentPoolProfile) IsUbuntu2004 added in v0.72.0

func (a *AgentPoolProfile) IsUbuntu2004() bool

IsUbuntu2004 returns true if the agent pool profile distro is based on Ubuntu 20.04

func (*AgentPoolProfile) IsUbuntuNonVHD added in v0.35.0

func (a *AgentPoolProfile) IsUbuntuNonVHD() bool

IsUbuntuNonVHD returns true if the distro uses a base Ubuntu image

func (*AgentPoolProfile) IsVHDDistro added in v0.35.0

func (a *AgentPoolProfile) IsVHDDistro() bool

IsVHDDistro returns true if the distro uses VHD SKUs

func (*AgentPoolProfile) IsVirtualMachineScaleSets

func (a *AgentPoolProfile) IsVirtualMachineScaleSets() bool

IsVirtualMachineScaleSets returns true if the agent pool availability profile is VMSS

func (*AgentPoolProfile) IsWindows

func (a *AgentPoolProfile) IsWindows() bool

IsWindows returns true if the agent pool is windows

func (*AgentPoolProfile) RequiresCloudproviderConfig added in v0.48.0

func (a *AgentPoolProfile) RequiresCloudproviderConfig() bool

RequiresCloudproviderConfig returns true if the azure.json cloudprovider config should be delivered to the nodes in this pool

type AgentPoolProfileRole

type AgentPoolProfileRole string

AgentPoolProfileRole represents an agent role

const (
	// AgentPoolProfileRoleEmpty is the empty role.  Deprecated; only used in
	// aks-engine.
	AgentPoolProfileRoleEmpty AgentPoolProfileRole = ""
	// AgentPoolProfileRoleCompute is the compute role
	AgentPoolProfileRoleCompute AgentPoolProfileRole = "compute"
	// AgentPoolProfileRoleInfra is the infra role
	AgentPoolProfileRoleInfra AgentPoolProfileRole = "infra"
	// AgentPoolProfileRoleMaster is the master role
	AgentPoolProfileRoleMaster AgentPoolProfileRole = "master"
)

type Apiloader

type Apiloader struct {
	Translator *i18n.Translator
}

Apiloader represents the object that loads api model

func (*Apiloader) DeserializeContainerService

func (a *Apiloader) DeserializeContainerService(contents []byte, validate, isUpdate bool, existingContainerService *ContainerService) (*ContainerService, string, error)

DeserializeContainerService loads an AKS Engine Cluster API Model, validates it, and returns the unversioned representation

func (*Apiloader) LoadAgentPoolProfile added in v0.46.0

func (a *Apiloader) LoadAgentPoolProfile(contents []byte) (*AgentPoolProfile, error)

LoadAgentPoolProfile marshalls raw data into a strongly typed AgentPoolProfile return object

func (*Apiloader) LoadAgentpoolProfileFromFile added in v0.46.0

func (a *Apiloader) LoadAgentpoolProfileFromFile(jsonFile string) (*AgentPoolProfile, error)

LoadAgentpoolProfileFromFile loads an an AgentPoolProfile object from a JSON file

func (*Apiloader) LoadCertificateProfile added in v0.60.0

func (a *Apiloader) LoadCertificateProfile(content []byte) (*CertificateProfile, error)

LoadCertificateProfile marshalls raw data into a strongly typed CertificateProfile return object

func (*Apiloader) LoadCertificateProfileFromFile added in v0.60.0

func (a *Apiloader) LoadCertificateProfileFromFile(jsonFile string) (*CertificateProfile, error)

LoadCertificateProfileFromFile loads a CertificateProfile object from a JSON file

func (*Apiloader) LoadContainerService

func (a *Apiloader) LoadContainerService(
	contents []byte,
	version string,
	validate, isUpdate bool,
	existingContainerService *ContainerService) (*ContainerService, error)

LoadContainerService loads an AKS Cluster API Model, validates it, and returns the unversioned representation

func (*Apiloader) LoadContainerServiceFromFile

func (a *Apiloader) LoadContainerServiceFromFile(jsonFile string, validate, isUpdate bool, existingContainerService *ContainerService) (*ContainerService, string, error)

LoadContainerServiceFromFile loads an AKS Cluster API Model from a JSON file

func (*Apiloader) SerializeContainerService

func (a *Apiloader) SerializeContainerService(containerService *ContainerService, version string) ([]byte, error)

SerializeContainerService takes an unversioned container service and returns the bytes

type AuthenticatorType

type AuthenticatorType string

AuthenticatorType represents the authenticator type the cluster was set up with.

const (
	// OIDC represent cluster setup in OIDC auth mode
	OIDC AuthenticatorType = "oidc"
	// Webhook represent cluster setup in wehhook auth mode
	Webhook AuthenticatorType = "webhook"
)

type AzureCustomCloudSpecParams added in v0.50.0

type AzureCustomCloudSpecParams struct {
	IsUpgrade bool
	IsScale   bool
}

AzureCustomCloudSpecParams is the parameters when we set the custom cloud spec defaults for ContainerService.

type AzureEndpointConfig

type AzureEndpointConfig struct {
	ResourceManagerVMDNSSuffix string `json:"resourceManagerVMDNSSuffix,omitempty"`
}

AzureEndpointConfig describes an Azure endpoint

type AzureEnvironmentSpecConfig

type AzureEnvironmentSpecConfig struct {
	CloudName            string                        `json:"cloudName,omitempty"`
	KubernetesSpecConfig KubernetesSpecConfig          `json:"kubernetesSpecConfig,omitempty"`
	EndpointConfig       AzureEndpointConfig           `json:"endpointConfig,omitempty"`
	OSImageConfig        map[Distro]AzureOSImageConfig `json:"osImageConfig,omitempty"`
}

AzureEnvironmentSpecConfig is the overall configuration differences in different cloud environments.

type AzureOSImageConfig

type AzureOSImageConfig struct {
	ImageOffer     string `json:"imageOffer,omitempty"`
	ImageSku       string `json:"imageSku,omitempty"`
	ImagePublisher string `json:"imagePublisher,omitempty"`
	ImageVersion   string `json:"imageVersion,omitempty"`
}

AzureOSImageConfig describes an Azure OS image

type AzureStackMetadataAuthentication added in v0.34.0

type AzureStackMetadataAuthentication struct {
	LoginEndpoint string   `json:"loginEndpoint,omitempty"`
	Audiences     []string `json:"audiences,omitempty"`
}

AzureStackMetadataAuthentication is the type for Azure Stack metadata authentication endpoints

type AzureStackMetadataEndpoints added in v0.34.0

type AzureStackMetadataEndpoints struct {
	GalleryEndpoint string                            `json:"galleryEndpoint,omitempty"`
	GraphEndpoint   string                            `json:"graphEndpoint,omitempty"`
	PortalEndpoint  string                            `json:"portalEndpoint,omitempty"`
	Authentication  *AzureStackMetadataAuthentication `json:"authentication,omitempty"`
}

AzureStackMetadataEndpoints is the type for Azure Stack metadata endpoints

type AzureTelemetryPID added in v0.42.0

type AzureTelemetryPID string

AzureTelemetryPID represents the current telemetry ID See more information here https://docs.microsoft.com/en-us/azure/marketplace/azure-partner-customer-usage-attribution PID is maintained to keep consistent with Azure Stack Telemetry Terminologies

type CertificateProfile

type CertificateProfile struct {
	// CaCertificate is the certificate authority certificate.
	CaCertificate string `json:"caCertificate,omitempty" conform:"redact"`
	// CaPrivateKey is the certificate authority key.
	CaPrivateKey string `json:"caPrivateKey,omitempty" conform:"redact"`
	// ApiServerCertificate is the rest api server certificate, and signed by the CA
	APIServerCertificate string `json:"apiServerCertificate,omitempty" conform:"redact"`
	// ApiServerPrivateKey is the rest api server private key, and signed by the CA
	APIServerPrivateKey string `json:"apiServerPrivateKey,omitempty" conform:"redact"`
	// ClientCertificate is the certificate used by the client kubelet services and signed by the CA
	ClientCertificate string `json:"clientCertificate,omitempty" conform:"redact"`
	// ClientPrivateKey is the private key used by the client kubelet services and signed by the CA
	ClientPrivateKey string `json:"clientPrivateKey,omitempty" conform:"redact"`
	// KubeConfigCertificate is the client certificate used for kubectl cli and signed by the CA
	KubeConfigCertificate string `json:"kubeConfigCertificate,omitempty" conform:"redact"`
	// KubeConfigPrivateKey is the client private key used for kubectl cli and signed by the CA
	KubeConfigPrivateKey string `json:"kubeConfigPrivateKey,omitempty" conform:"redact"`
	// EtcdServerCertificate is the server certificate for etcd, and signed by the CA
	EtcdServerCertificate string `json:"etcdServerCertificate,omitempty" conform:"redact"`
	// EtcdServerPrivateKey is the server private key for etcd, and signed by the CA
	EtcdServerPrivateKey string `json:"etcdServerPrivateKey,omitempty" conform:"redact"`
	// EtcdClientCertificate is etcd client certificate, and signed by the CA
	EtcdClientCertificate string `json:"etcdClientCertificate,omitempty" conform:"redact"`
	// EtcdClientPrivateKey is the etcd client private key, and signed by the CA
	EtcdClientPrivateKey string `json:"etcdClientPrivateKey,omitempty" conform:"redact"`
	// EtcdPeerCertificates is list of etcd peer certificates, and signed by the CA
	EtcdPeerCertificates []string `json:"etcdPeerCertificates,omitempty" conform:"redact"`
	// EtcdPeerPrivateKeys is list of etcd peer private keys, and signed by the CA
	EtcdPeerPrivateKeys []string `json:"etcdPeerPrivateKeys,omitempty" conform:"redact"`
}

CertificateProfile represents the definition of the master cluster

type CloudProviderConfig

type CloudProviderConfig struct {
	CloudProviderBackoffMode          string `json:"cloudProviderBackoffMode,omitempty"`
	CloudProviderBackoff              *bool  `json:"cloudProviderBackoff,omitempty"`
	CloudProviderBackoffRetries       int    `json:"cloudProviderBackoffRetries,omitempty"`
	CloudProviderBackoffJitter        string `json:"cloudProviderBackoffJitter,omitempty"`
	CloudProviderBackoffDuration      int    `json:"cloudProviderBackoffDuration,omitempty"`
	CloudProviderBackoffExponent      string `json:"cloudProviderBackoffExponent,omitempty"`
	CloudProviderRateLimit            *bool  `json:"cloudProviderRateLimit,omitempty"`
	CloudProviderRateLimitQPS         string `json:"cloudProviderRateLimitQPS,omitempty"`
	CloudProviderRateLimitQPSWrite    string `json:"cloudProviderRateLimitQPSWrite,omitempty"`
	CloudProviderRateLimitBucket      int    `json:"cloudProviderRateLimitBucket,omitempty"`
	CloudProviderRateLimitBucketWrite int    `json:"cloudProviderRateLimitBucketWrite,omitempty"`
	CloudProviderDisableOutboundSNAT  *bool  `json:"cloudProviderDisableOutboundSNAT,omitempty"`
}

CloudProviderConfig contains the KubernetesConfig properties specific to the Cloud Provider

type ContainerService

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

	Properties *Properties `json:"properties,omitempty"`
}

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

Example (SetOrchestratorDefaults)
log.SetOutput(os.Stdout)
log.SetFormatter(&log.TextFormatter{
	DisableColors:    true,
	DisableTimestamp: true,
})

mockCS := getMockBaseContainerService("1.19.2")
mockCS.setOrchestratorDefaults(true, false)

mockCS = getMockBaseContainerService("1.19.2")
mockCS.setOrchestratorDefaults(false, true)

mockCS = getMockBaseContainerService("1.19.2")
mockCS.setOrchestratorDefaults(false, false)
Output:

level=warning msg="Moby will be upgraded to version 20.10.14\n"
level=warning msg="containerd will be upgraded to version 1.5.13\n"
level=warning msg="Any new nodes will have Moby version 20.10.14\n"
level=warning msg="Any new nodes will have containerd version 1.5.13\n"

func ConvertVLabsContainerService

func ConvertVLabsContainerService(vlabs *vlabs.ContainerService, isUpdate bool) (*ContainerService, error)

ConvertVLabsContainerService converts a vlabs ContainerService to an unversioned ContainerService

func CreateMockContainerService

func CreateMockContainerService(containerServiceName, orchestratorVersion string, masterCount, agentCount int, certs bool) *ContainerService

CreateMockContainerService returns a mock container service for testing purposes

func (*ContainerService) GetAzureProdFQDN

func (cs *ContainerService) GetAzureProdFQDN() string

GetAzureProdFQDN returns the formatted FQDN string for a given apimodel.

func (*ContainerService) GetCloudSpecConfig

func (cs *ContainerService) GetCloudSpecConfig() AzureEnvironmentSpecConfig

GetCloudSpecConfig returns the Kubernetes container images URL configurations based on the deploy target environment. for example: if the target is the public azure, then the default container image url should be registry.k8s.io/... if the target is azure china, then the default container image should be mirror.azure.cn:5000/google_container/...

func (*ContainerService) GetLocations added in v0.32.0

func (cs *ContainerService) GetLocations() []string

GetLocations returns all supported regions. If AzureStackCloud, GetLocations provides the location of container service If AzurePublicCloud, AzureChinaCloud,AzureGermanCloud or AzureUSGovernmentCloud, GetLocations provides all azure regions in prod.

func (*ContainerService) GetProvisionScriptParametersCommon added in v0.47.0

func (cs *ContainerService) GetProvisionScriptParametersCommon(input ProvisionScriptParametersInput) string

GetProvisionScriptParametersCommon returns the environment variables needed to run the Linux bootstrap scripts Ensure that the clientSecret parameter is surrounded by single quotes to protect against special characters

func (*ContainerService) IsAKSBillingEnabled added in v0.33.0

func (cs *ContainerService) IsAKSBillingEnabled() bool

IsAKSBillingEnabled checks if the AKS Billing Extension should be enabled for a cloud environment.

func (*ContainerService) SetCustomCloudProfileEnvironment added in v0.34.0

func (cs *ContainerService) SetCustomCloudProfileEnvironment() error

SetCustomCloudProfileEnvironment retrieves the endpoints from metadata endpoint (when required) and sets the values for azure.Environment

func (*ContainerService) SetDefaultCerts added in v0.35.0

func (cs *ContainerService) SetDefaultCerts(params DefaultCertParams) (bool, []net.IP, error)

SetDefaultCerts generates and sets defaults for the container certificateProfile, returns true if certs are generated

func (*ContainerService) SetPropertiesDefaults

func (cs *ContainerService) SetPropertiesDefaults(params PropertiesDefaultsParams) (bool, error)

SetPropertiesDefaults for the container Properties, returns true if certs are generated

type CustomCloudProfile added in v0.30.0

type CustomCloudProfile struct {
	Environment                 *azure.Environment          `json:"environment,omitempty"`
	AzureEnvironmentSpecConfig  *AzureEnvironmentSpecConfig `json:"azureEnvironmentSpecConfig,omitempty"`
	IdentitySystem              string                      `json:"identitySystem,omitempty"`
	AuthenticationMethod        string                      `json:"authenticationMethod,omitempty"`
	DependenciesLocation        DependenciesLocation        `json:"dependenciesLocation,omitempty"`
	PortalURL                   string                      `json:"portalURL,omitempty"`
	CustomCloudRootCertificates string                      `json:"customCloudRootCertificates,omitempty"`
	CustomCloudSourcesList      string                      `json:"customCloudSourcesList,omitempty"`
}

CustomCloudProfile represents the custom cloud profile

type CustomCloudProfileDefaultsParams added in v0.42.0

type CustomCloudProfileDefaultsParams struct {
	IsUpgrade bool
	IsScale   bool
}

CustomCloudProfileDefaultsParams is the parameters when we set the cloud profile defaults for ContainerService.

type CustomFile

type CustomFile struct {
	Source string `json:"source,omitempty"`
	Dest   string `json:"dest,omitempty"`
}

CustomFile has source as the full absolute source path to a file and dest is the full absolute desired destination path to put the file on a master node

type CustomNodesDNS

type CustomNodesDNS struct {
	DNSServer string `json:"dnsServer,omitempty"`
}

CustomNodesDNS represents the Search Domain when the custom vnet for a custom DNS as a nameserver.

type CustomSearchDomain

type CustomSearchDomain struct {
	Name          string `json:"name,omitempty"`
	RealmUser     string `json:"realmUser,omitempty"`
	RealmPassword string `json:"realmPassword,omitempty"`
}

CustomSearchDomain represents the Search Domain when the custom vnet has a windows server DNS as a nameserver.

type DefaultCertParams added in v0.41.0

type DefaultCertParams struct {
	PkiKeySize int
}

DefaultCertParams is the params when we set the default certs.

type DependenciesLocation added in v0.34.0

type DependenciesLocation string

DependenciesLocation represents location to retrieve the dependencies.

type Distro

type Distro string

Distro represents Linux distro to use for Linux VMs

const (
	Ubuntu            Distro = "ubuntu" // Ubuntu 16.04-LTS is at EOL, TODO deprecate this distro
	Ubuntu1804        Distro = "ubuntu-18.04"
	Ubuntu1804Gen2    Distro = "ubuntu-18.04-gen2"
	Ubuntu2004        Distro = "ubuntu-20.04"
	Ubuntu2004Gen2    Distro = "ubuntu-20.04-gen2"
	Flatcar           Distro = "flatcar"
	AKS1604Deprecated Distro = "aks"               // deprecated AKS 16.04 distro. Equivalent to aks-ubuntu-16.04.
	AKS1804Deprecated Distro = "aks-1804"          // deprecated AKS 18.04 distro. Equivalent to aks-ubuntu-18.04.
	AKSDockerEngine   Distro = "aks-docker-engine" // deprecated docker-engine distro.
	AKSUbuntu1604     Distro = "aks-ubuntu-16.04"
	AKSUbuntu1804     Distro = "aks-ubuntu-18.04"
	AKSUbuntu2004     Distro = "aks-ubuntu-20.04"
	ACC1604           Distro = "acc-16.04"
)

Distro string consts

type Extension

type Extension struct {
	Name        string `json:"name"`
	SingleOrAll string `json:"singleOrAll"`
	Template    string `json:"template"`
}

Extension represents an extension definition in the master or agentPoolProfile

type ExtensionProfile

type ExtensionProfile struct {
	Name                           string             `json:"name"`
	Version                        string             `json:"version"`
	ExtensionParameters            string             `json:"extensionParameters,omitempty"`
	ExtensionParametersKeyVaultRef *KeyvaultSecretRef `json:"parametersKeyvaultSecretRef,omitempty"`
	RootURL                        string             `json:"rootURL,omitempty"`
	// This is only needed for preprovision extensions and it needs to be a bash script
	Script   string `json:"script,omitempty"`
	URLQuery string `json:"urlQuery,omitempty"`
}

ExtensionProfile represents an extension definition

type FeatureFlags

type FeatureFlags struct {
	EnableCSERunInBackground bool `json:"enableCSERunInBackground,omitempty"`
	BlockOutboundInternet    bool `json:"blockOutboundInternet,omitempty"`
	EnableIPv6DualStack      bool `json:"enableIPv6DualStack,omitempty"`
	EnableTelemetry          bool `json:"enableTelemetry,omitempty"`
	EnableIPv6Only           bool `json:"enableIPv6Only,omitempty"`
	EnableWinDSR             bool `json:"enableWinDSR,omitempty"`
}

FeatureFlags defines feature-flag restricted functionality

func (*FeatureFlags) IsFeatureEnabled

func (f *FeatureFlags) IsFeatureEnabled(feature string) bool

IsFeatureEnabled returns true if a feature flag is on for the provided feature

type ImageReference

type ImageReference struct {
	Name           string `json:"name,omitempty"`
	ResourceGroup  string `json:"resourceGroup,omitempty"`
	SubscriptionID string `json:"subscriptionId,omitempty"`
	Gallery        string `json:"gallery,omitempty"`
	Version        string `json:"version,omitempty"`
}

ImageReference represents a reference to an Image resource in Azure.

func (*ImageReference) IsGalleryImage added in v0.41.0

func (i *ImageReference) IsGalleryImage() bool

IsGalleryImage returns true if ImageRefernce contains Gallry, Name, ResourceGroup, SubscriptionID, and Version

func (*ImageReference) IsValid added in v0.41.0

func (i *ImageReference) IsValid() bool

IsValid returns true if ImageRefernce contains at least Name and ResourceGroup

type JumpboxProfile

type JumpboxProfile struct {
	OSType    OSType `json:"osType"`
	DNSPrefix string `json:"dnsPrefix"`

	// Jumpbox 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"`
}

JumpboxProfile describes properties of the jumpbox setup in the AKS container cluster.

type KeyVaultCertificate

type KeyVaultCertificate struct {
	CertificateURL   string `json:"certificateUrl,omitempty"`
	CertificateStore string `json:"certificateStore,omitempty"`
}

KeyVaultCertificate specifies a certificate to install On Linux, the certificate file is placed under the /var/lib/waagent directory with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for the private key. Both of these files are .pem formatted. On windows the certificate will be saved in the specified store.

type KeyVaultID

type KeyVaultID struct {
	ID string `json:"id,omitempty"`
}

KeyVaultID specifies a key vault

type KeyVaultSecrets

type KeyVaultSecrets struct {
	SourceVault       *KeyVaultID           `json:"sourceVault,omitempty"`
	VaultCertificates []KeyVaultCertificate `json:"vaultCertificates,omitempty"`
}

KeyVaultSecrets specifies certificates to install on the pool of machines from a given key vault the key vault specified must have been granted read permissions to CRP

type KeyvaultSecretRef

type KeyvaultSecretRef struct {
	VaultID       string `json:"vaultID"`
	SecretName    string `json:"secretName"`
	SecretVersion string `json:"version,omitempty"`
}

KeyvaultSecretRef specifies path to the Azure keyvault along with secret name and (optionaly) version for Service Principal's secret

type KubeProxyMode added in v0.30.0

type KubeProxyMode string

KubeProxyMode is for iptables and ipvs (and future others)

const (
	// KubeProxyModeIPTables is used to set the kube-proxy to iptables mode
	KubeProxyModeIPTables KubeProxyMode = "iptables"
	// KubeProxyModeIPVS is used to set the kube-proxy to ipvs mode
	KubeProxyModeIPVS KubeProxyMode = "ipvs"
)

We currently support ipvs and iptables

type KubernetesAddon

type KubernetesAddon struct {
	Name       string                    `json:"name,omitempty"`
	Enabled    *bool                     `json:"enabled,omitempty"`
	Mode       string                    `json:"mode,omitempty"`
	Containers []KubernetesContainerSpec `json:"containers,omitempty"`
	Config     map[string]string         `json:"config,omitempty"`
	Pools      []AddonNodePoolsConfig    `json:"pools,omitempty"`
	Data       string                    `json:"data,omitempty"`
}

KubernetesAddon defines a list of addons w/ configuration to include with the cluster deployment

func (KubernetesAddon) GetAddonContainersIndexByName

func (a KubernetesAddon) GetAddonContainersIndexByName(containerName string) int

GetAddonContainersIndexByName returns the KubernetesAddon containers index with the name `containerName`

func (KubernetesAddon) GetAddonPoolIndexByName added in v0.44.0

func (a KubernetesAddon) GetAddonPoolIndexByName(poolName string) int

GetAddonPoolIndexByName returns the KubernetesAddon pools index with the name `poolName`

func (*KubernetesAddon) IsDisabled added in v0.46.0

func (a *KubernetesAddon) IsDisabled() bool

IsDisabled returns true if the addon is explicitly disabled

func (*KubernetesAddon) IsEnabled

func (a *KubernetesAddon) IsEnabled() bool

IsEnabled returns true if the addon is enabled

type KubernetesComponent added in v0.48.0

type KubernetesComponent struct {
	Name       string                    `json:"name,omitempty"`
	Enabled    *bool                     `json:"enabled,omitempty"`
	Containers []KubernetesContainerSpec `json:"containers,omitempty"`
	Config     map[string]string         `json:"config,omitempty"`
	Data       string                    `json:"data,omitempty"`
}

KubernetesComponent defines a component w/ configuration to include with the cluster deployment

func (KubernetesComponent) GetContainersIndexByName added in v0.48.0

func (c KubernetesComponent) GetContainersIndexByName(containerName string) int

GetContainersIndexByName returns the KubernetesAddon containers index with the name `containerName`

func (*KubernetesComponent) IsDisabled added in v0.48.0

func (c *KubernetesComponent) IsDisabled() bool

IsDisabled returns true if the component is explicitly disabled

func (*KubernetesComponent) IsEnabled added in v0.48.0

func (c *KubernetesComponent) IsEnabled() bool

IsEnabled returns true if the component is enabled

type KubernetesConfig

type KubernetesConfig struct {
	KubernetesImageBase                 string                `json:"kubernetesImageBase,omitempty"`
	KubernetesImageBaseType             string                `json:"kubernetesImageBaseType,omitempty"`
	MCRKubernetesImageBase              string                `json:"mcrKubernetesImageBase,omitempty"`
	ClusterSubnet                       string                `json:"clusterSubnet,omitempty"`
	NetworkPolicy                       string                `json:"networkPolicy,omitempty"`
	NetworkPlugin                       string                `json:"networkPlugin,omitempty"`
	NetworkMode                         string                `json:"networkMode,omitempty"`
	ContainerRuntime                    string                `json:"containerRuntime,omitempty"`
	MaxPods                             int                   `json:"maxPods,omitempty"`
	DockerBridgeSubnet                  string                `json:"dockerBridgeSubnet,omitempty"`
	DNSServiceIP                        string                `json:"dnsServiceIP,omitempty"`
	ServiceCIDR                         string                `json:"serviceCidr,omitempty"`
	UseManagedIdentity                  *bool                 `json:"useManagedIdentity,omitempty"`
	UserAssignedID                      string                `json:"userAssignedID,omitempty"`
	UserAssignedClientID                string                `json:"userAssignedClientID,omitempty"` //Note: cannot be provided in config. Used *only* for transferring this to azure.json.
	CustomHyperkubeImage                string                `json:"customHyperkubeImage,omitempty"`
	CustomKubeAPIServerImage            string                `json:"customKubeAPIServerImage,omitempty"`
	CustomKubeControllerManagerImage    string                `json:"customKubeControllerManagerImage,omitempty"`
	CustomKubeProxyImage                string                `json:"customKubeProxyImage,omitempty"`
	CustomKubeSchedulerImage            string                `json:"customKubeSchedulerImage,omitempty"`
	CustomKubeBinaryURL                 string                `json:"customKubeBinaryURL,omitempty"`
	DockerEngineVersion                 string                `json:"dockerEngineVersion,omitempty"` // Deprecated
	MobyVersion                         string                `json:"mobyVersion,omitempty"`
	LinuxMobyURL                        string                `json:"linuxMobyURL,omitempty"`
	LinuxRuncURL                        string                `json:"linuxRuncURL,omitempty"`
	ContainerdVersion                   string                `json:"containerdVersion,omitempty"`
	LinuxContainerdURL                  string                `json:"linuxContainerdURL,omitempty"`
	CustomCcmImage                      string                `json:"customCcmImage,omitempty"` // Image for cloud-controller-manager
	UseCloudControllerManager           *bool                 `json:"useCloudControllerManager,omitempty"`
	CustomWindowsPackageURL             string                `json:"customWindowsPackageURL,omitempty"`
	WindowsNodeBinariesURL              string                `json:"windowsNodeBinariesURL,omitempty"`
	WindowsContainerdURL                string                `json:"windowsContainerdURL,omitempty"`
	WindowsSdnPluginURL                 string                `json:"windowsSdnPluginURL,omitempty"`
	UseInstanceMetadata                 *bool                 `json:"useInstanceMetadata,omitempty"`
	EnableRbac                          *bool                 `json:"enableRbac,omitempty"`
	EnableSecureKubelet                 *bool                 `json:"enableSecureKubelet,omitempty"`
	EnableAggregatedAPIs                bool                  `json:"enableAggregatedAPIs,omitempty"`
	PrivateCluster                      *PrivateCluster       `json:"privateCluster,omitempty"`
	GCHighThreshold                     int                   `json:"gchighthreshold,omitempty"`
	GCLowThreshold                      int                   `json:"gclowthreshold,omitempty"`
	EtcdVersion                         string                `json:"etcdVersion,omitempty"`
	EtcdDiskSizeGB                      string                `json:"etcdDiskSizeGB,omitempty"`
	EtcdStorageLimitGB                  int                   `json:"etcdStorageLimitGB,omitempty"`
	EtcdEncryptionKey                   string                `json:"etcdEncryptionKey,omitempty"`
	EnableDataEncryptionAtRest          *bool                 `json:"enableDataEncryptionAtRest,omitempty"`
	EnableEncryptionWithExternalKms     *bool                 `json:"enableEncryptionWithExternalKms,omitempty"`
	EnablePodSecurityPolicy             *bool                 `json:"enablePodSecurityPolicy,omitempty"`
	Addons                              []KubernetesAddon     `json:"addons,omitempty"`
	Components                          []KubernetesComponent `json:"components,omitempty"`
	KubeletConfig                       map[string]string     `json:"kubeletConfig,omitempty"`
	ContainerRuntimeConfig              map[string]string     `json:"containerRuntimeConfig"`
	ControllerManagerConfig             map[string]string     `json:"controllerManagerConfig,omitempty"`
	CloudControllerManagerConfig        map[string]string     `json:"cloudControllerManagerConfig,omitempty"`
	APIServerConfig                     map[string]string     `json:"apiServerConfig,omitempty"`
	SchedulerConfig                     map[string]string     `json:"schedulerConfig,omitempty"`
	PodSecurityPolicyConfig             map[string]string     `json:"podSecurityPolicyConfig,omitempty"` // Deprecated
	KubeReservedCgroup                  string                `json:"kubeReservedCgroup,omitempty"`
	CloudProviderBackoffMode            string                `json:"cloudProviderBackoffMode"`
	CloudProviderBackoff                *bool                 `json:"cloudProviderBackoff,omitempty"`
	CloudProviderBackoffRetries         int                   `json:"cloudProviderBackoffRetries,omitempty"`
	CloudProviderBackoffJitter          float64               `json:"cloudProviderBackoffJitter,omitempty"`
	CloudProviderBackoffDuration        int                   `json:"cloudProviderBackoffDuration,omitempty"`
	CloudProviderBackoffExponent        float64               `json:"cloudProviderBackoffExponent,omitempty"`
	CloudProviderRateLimit              *bool                 `json:"cloudProviderRateLimit,omitempty"`
	CloudProviderRateLimitQPS           float64               `json:"cloudProviderRateLimitQPS,omitempty"`
	CloudProviderRateLimitQPSWrite      float64               `json:"cloudProviderRateLimitQPSWrite,omitempty"`
	CloudProviderRateLimitBucket        int                   `json:"cloudProviderRateLimitBucket,omitempty"`
	CloudProviderRateLimitBucketWrite   int                   `json:"cloudProviderRateLimitBucketWrite,omitempty"`
	CloudProviderDisableOutboundSNAT    *bool                 `json:"cloudProviderDisableOutboundSNAT,omitempty"`
	NonMasqueradeCidr                   string                `json:"nonMasqueradeCidr,omitempty"`
	NodeStatusUpdateFrequency           string                `json:"nodeStatusUpdateFrequency,omitempty"`
	HardEvictionThreshold               string                `json:"hardEvictionThreshold,omitempty"`
	CtrlMgrNodeMonitorGracePeriod       string                `json:"ctrlMgrNodeMonitorGracePeriod,omitempty"`
	CtrlMgrPodEvictionTimeout           string                `json:"ctrlMgrPodEvictionTimeout,omitempty"`
	CtrlMgrRouteReconciliationPeriod    string                `json:"ctrlMgrRouteReconciliationPeriod,omitempty"`
	LoadBalancerSku                     string                `json:"loadBalancerSku,omitempty"`
	ExcludeMasterFromStandardLB         *bool                 `json:"excludeMasterFromStandardLB,omitempty"`
	LoadBalancerOutboundIPs             *int                  `json:"loadBalancerOutboundIPs,omitempty"`
	AzureCNIVersion                     string                `json:"azureCNIVersion,omitempty"`
	AzureCNIURLLinux                    string                `json:"azureCNIURLLinux,omitempty"`
	AzureCNIURLWindows                  string                `json:"azureCNIURLWindows,omitempty"`
	KeyVaultSku                         string                `json:"keyVaultSku,omitempty"`
	MaximumLoadBalancerRuleCount        int                   `json:"maximumLoadBalancerRuleCount,omitempty"`
	ProxyMode                           KubeProxyMode         `json:"kubeProxyMode,omitempty"`
	PrivateAzureRegistryServer          string                `json:"privateAzureRegistryServer,omitempty"`
	OutboundRuleIdleTimeoutInMinutes    int32                 `json:"outboundRuleIdleTimeoutInMinutes,omitempty"`
	MicrosoftAptRepositoryURL           string                `json:"microsoftAptRepositoryURL,omitempty"`
	EnableMultipleStandardLoadBalancers *bool                 `json:"enableMultipleStandardLoadBalancers,omitempty"`
	Tags                                string                `json:"tags,omitempty"`
}

KubernetesConfig contains the Kubernetes config structure, containing Kubernetes specific configuration

func (*KubernetesConfig) GetAddonByName

func (k *KubernetesConfig) GetAddonByName(addonName string) KubernetesAddon

GetAddonByName returns the KubernetesAddon instance with name `addonName`

func (*KubernetesConfig) GetAddonScript

func (k *KubernetesConfig) GetAddonScript(addonName string) string

GetAddonScript retrieves the raw script data specified as input for the k8s addon with name "addonName".

func (*KubernetesConfig) GetAzureCNIURLLinux

func (k *KubernetesConfig) GetAzureCNIURLLinux(cloudSpecConfig AzureEnvironmentSpecConfig) string

GetAzureCNIURLLinux returns the full URL to source Azure CNI binaries from

func (*KubernetesConfig) GetAzureCNIURLWindows

func (k *KubernetesConfig) GetAzureCNIURLWindows(cloudSpecConfig AzureEnvironmentSpecConfig) string

GetAzureCNIURLWindows returns the full URL to source Azure CNI binaries from

func (*KubernetesConfig) GetComponentByName added in v0.48.0

func (k *KubernetesConfig) GetComponentByName(componentName string) KubernetesComponent

GetComponentByName returns the KubernetesComponent object with name `componentName`

func (*KubernetesConfig) GetComponentData added in v0.48.0

func (k *KubernetesConfig) GetComponentData(componentName string) string

GetComponentData retrieves the raw data specified as input for a component with name "componentName".

func (*KubernetesConfig) GetOrderedKubeletConfigString added in v0.37.0

func (k *KubernetesConfig) GetOrderedKubeletConfigString() string

GetOrderedKubeletConfigString returns an ordered string of key/val pairs

func (*KubernetesConfig) GetOrderedKubeletConfigStringForPowershell added in v0.37.0

func (k *KubernetesConfig) GetOrderedKubeletConfigStringForPowershell() string

GetOrderedKubeletConfigStringForPowershell returns an ordered string of key/val pairs for Powershell script consumption

func (*KubernetesConfig) IsAADPodIdentityEnabled

func (k *KubernetesConfig) IsAADPodIdentityEnabled() bool

IsAADPodIdentityEnabled checks if the AAD pod identity addon is enabled

func (*KubernetesConfig) IsAddonDisabled added in v0.46.0

func (k *KubernetesConfig) IsAddonDisabled(addonName string) bool

IsAddonDisabled checks whether a k8s addon with name "addonName" is explicitly disabled based on the Enabled field of KubernetesAddon. If the value of Enabled is nil, we return false (not explicitly disabled)

func (*KubernetesConfig) IsAddonEnabled added in v0.37.0

func (k *KubernetesConfig) IsAddonEnabled(addonName string) bool

IsAddonEnabled checks whether a k8s addon with name "addonName" is enabled or not based on the Enabled field of KubernetesAddon. If the value of Enabled is nil, the "defaultValue" is returned.

func (*KubernetesConfig) IsAppGWIngressEnabled added in v0.38.0

func (k *KubernetesConfig) IsAppGWIngressEnabled() bool

IsAppGWIngressEnabled checks if the appgw ingress addon is enabled

func (*KubernetesConfig) IsAzurePolicyEnabled added in v0.43.0

func (k *KubernetesConfig) IsAzurePolicyEnabled() bool

IsAzurePolicyEnabled checks if the azure policy addon is enabled

func (*KubernetesConfig) IsClusterAutoscalerEnabled

func (k *KubernetesConfig) IsClusterAutoscalerEnabled() bool

IsClusterAutoscalerEnabled checks if the cluster autoscaler addon is enabled

func (*KubernetesConfig) IsComponentEnabled added in v0.48.0

func (k *KubernetesConfig) IsComponentEnabled(componentName string) (KubernetesComponent, bool)

IsComponentEnabled checks whether a component with name "componentName" is enabled or not based on the Enabled field of KubernetesComponent. If the value of Enabled is nil, the "defaultValue" is returned.

func (*KubernetesConfig) IsContainerMonitoringAddonEnabled added in v0.41.0

func (k *KubernetesConfig) IsContainerMonitoringAddonEnabled() bool

IsContainerMonitoringAddonEnabled checks if the container monitoring addon is enabled

func (*KubernetesConfig) IsRBACEnabled added in v0.29.0

func (k *KubernetesConfig) IsRBACEnabled() bool

IsRBACEnabled checks if RBAC is enabled

func (*KubernetesConfig) NeedsContainerd added in v0.40.0

func (k *KubernetesConfig) NeedsContainerd() bool

NeedsContainerd returns whether or not we need the containerd runtime configuration

func (*KubernetesConfig) PrivateJumpboxProvision

func (k *KubernetesConfig) PrivateJumpboxProvision() bool

PrivateJumpboxProvision checks if a private cluster has jumpbox auto-provisioning

func (*KubernetesConfig) RequiresDocker

func (k *KubernetesConfig) RequiresDocker() bool

RequiresDocker returns if the kubernetes settings require docker binary to be installed.

func (*KubernetesConfig) ShouldCreateNewUserAssignedIdentity added in v0.49.0

func (k *KubernetesConfig) ShouldCreateNewUserAssignedIdentity() bool

func (*KubernetesConfig) SystemAssignedIDEnabled added in v0.46.1

func (k *KubernetesConfig) SystemAssignedIDEnabled() bool

SystemAssignedIDEnabled checks if system assigned IDs should be used.

func (*KubernetesConfig) UserAssignedIDEnabled added in v0.30.0

func (k *KubernetesConfig) UserAssignedIDEnabled() bool

UserAssignedIDEnabled checks if the user assigned ID is enabled or not.

type KubernetesContainerSpec

type KubernetesContainerSpec struct {
	Name           string `json:"name,omitempty"`
	Image          string `json:"image,omitempty"`
	CPURequests    string `json:"cpuRequests,omitempty"`
	MemoryRequests string `json:"memoryRequests,omitempty"`
	CPULimits      string `json:"cpuLimits,omitempty"`
	MemoryLimits   string `json:"memoryLimits,omitempty"`
}

KubernetesContainerSpec defines configuration for a container spec

type KubernetesSpecConfig

type KubernetesSpecConfig struct {
	AzureTelemetryPID string `json:"azureTelemetryPID,omitempty"`
	// KubernetesImageBase defines a base image URL substring to source images that originate from upstream registry.k8s.io
	KubernetesImageBase   string `json:"kubernetesImageBase,omitempty"`
	TillerImageBase       string `json:"tillerImageBase,omitempty"`
	ACIConnectorImageBase string `json:"aciConnectorImageBase,omitempty"` // Deprecated
	// MCRKubernetesImageBase defines a base image URL substring to source MS-curated images that originate from MCR
	MCRKubernetesImageBase               string `json:"mcrKubernetesImageBase,omitempty"`
	NVIDIAImageBase                      string `json:"nvidiaImageBase,omitempty"`
	AzureCNIImageBase                    string `json:"azureCNIImageBase,omitempty"`
	CalicoImageBase                      string `json:"CalicoImageBase,omitempty"`
	EtcdDownloadURLBase                  string `json:"etcdDownloadURLBase,omitempty"`
	KubeBinariesSASURLBase               string `json:"kubeBinariesSASURLBase,omitempty"`
	WindowsTelemetryGUID                 string `json:"windowsTelemetryGUID,omitempty"`
	CNIPluginsDownloadURL                string `json:"cniPluginsDownloadURL,omitempty"`
	VnetCNILinuxPluginsDownloadURL       string `json:"vnetCNILinuxPluginsDownloadURL,omitempty"`
	VnetCNIWindowsPluginsDownloadURL     string `json:"vnetCNIWindowsPluginsDownloadURL,omitempty"`
	ContainerdDownloadURLBase            string `json:"containerdDownloadURLBase,omitempty"`
	CSIProxyDownloadURL                  string `json:"csiProxyDownloadURL,omitempty"`
	WindowsProvisioningScriptsPackageURL string `json:"windowsProvisioningScriptsPackageURL,omitempty"`
	WindowsPauseImageURL                 string `json:"windowsPauseImageURL,omitempty"`
	AlwaysPullWindowsPauseImage          bool   `json:"alwaysPullWindowsPauseImage,omitempty"`
}

KubernetesSpecConfig is the kubernetes container images used.

type LinuxProfile

type LinuxProfile struct {
	AdminUsername string `json:"adminUsername"`
	SSH           struct {
		PublicKeys []PublicKey `json:"publicKeys"`
	} `json:"ssh"`
	Secrets                          []KeyVaultSecrets   `json:"secrets,omitempty"`
	Distro                           Distro              `json:"distro,omitempty"`
	ScriptRootURL                    string              `json:"scriptroot,omitempty"`
	CustomSearchDomain               *CustomSearchDomain `json:"customSearchDomain,omitempty"`
	CustomNodesDNS                   *CustomNodesDNS     `json:"CustomNodesDNS,omitempty"`
	IsSSHKeyAutoGenerated            *bool               `json:"isSSHKeyAutoGenerated,omitempty"`
	RunUnattendedUpgradesOnBootstrap *bool               `json:"runUnattendedUpgradesOnBootstrap,omitempty"`
	EnableUnattendedUpgrades         *bool               `json:"enableUnattendedUpgrades,omitempty"`
	Eth0MTU                          int                 `json:"eth0MTU,omitempty"`
}

LinuxProfile represents the linux parameters passed to the cluster

func (*LinuxProfile) HasCustomNodesDNS

func (l *LinuxProfile) HasCustomNodesDNS() bool

HasCustomNodesDNS returns true if the customer specified a dns server

func (*LinuxProfile) HasSearchDomain

func (l *LinuxProfile) HasSearchDomain() bool

HasSearchDomain returns true if the customer specified secrets to install

func (*LinuxProfile) HasSecrets

func (l *LinuxProfile) HasSecrets() bool

HasSecrets returns true if the customer specified secrets to install

type MasterProfile

type MasterProfile struct {
	Count                     int               `json:"count"`
	DNSPrefix                 string            `json:"dnsPrefix"`
	SubjectAltNames           []string          `json:"subjectAltNames"`
	VMSize                    string            `json:"vmSize"`
	OSDiskSizeGB              int               `json:"osDiskSizeGB,omitempty"`
	VnetSubnetID              string            `json:"vnetSubnetID,omitempty"`
	VnetCidr                  string            `json:"vnetCidr,omitempty"`
	AgentVnetSubnetID         string            `json:"agentVnetSubnetID,omitempty"`
	FirstConsecutiveStaticIP  string            `json:"firstConsecutiveStaticIP,omitempty"`
	Subnet                    string            `json:"subnet"`
	SubnetIPv6                string            `json:"subnetIPv6"`
	IPAddressCount            int               `json:"ipAddressCount,omitempty"`
	StorageProfile            string            `json:"storageProfile,omitempty"`
	HTTPSourceAddressPrefix   string            `json:"HTTPSourceAddressPrefix,omitempty"`
	OAuthEnabled              bool              `json:"oauthEnabled"`
	PreprovisionExtension     *Extension        `json:"preProvisionExtension"`
	Extensions                []Extension       `json:"extensions"`
	Distro                    Distro            `json:"distro,omitempty"`
	KubernetesConfig          *KubernetesConfig `json:"kubernetesConfig,omitempty"`
	ImageRef                  *ImageReference   `json:"imageReference,omitempty"`
	CustomFiles               *[]CustomFile     `json:"customFiles,omitempty"`
	AvailabilityProfile       string            `json:"availabilityProfile"`
	PlatformFaultDomainCount  *int              `json:"platformFaultDomainCount"`
	PlatformUpdateDomainCount *int              `json:"platformUpdateDomainCount"`
	AgentSubnet               string            `json:"agentSubnet,omitempty"`
	AvailabilityZones         []string          `json:"availabilityZones,omitempty"`
	SinglePlacementGroup      *bool             `json:"singlePlacementGroup,omitempty"`
	AuditDEnabled             *bool             `json:"auditDEnabled,omitempty"`
	UltraSSDEnabled           *bool             `json:"ultraSSDEnabled,omitempty"`
	EncryptionAtHost          *bool             `json:"encryptionAtHost,omitempty"`
	CustomVMTags              map[string]string `json:"customVMTags,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"`
	// True: uses cosmos etcd endpoint instead of installing etcd on masters
	CosmosEtcd                *bool             `json:"cosmosEtcd,omitempty"`
	SysctlDConfig             map[string]string `json:"sysctldConfig,omitempty"`
	ProximityPlacementGroupID string            `json:"proximityPlacementGroupID,omitempty"`
	OSDiskCachingType         string            `json:"osDiskCachingType,omitempty"`
}

MasterProfile represents the definition of the master cluster

func (*MasterProfile) GetCosmosEndPointURI added in v0.37.0

func (m *MasterProfile) GetCosmosEndPointURI() string

GetCosmosEndPointURI returns the URI string for the cosmos etcd endpoint

func (*MasterProfile) GetFirstConsecutiveStaticIPAddress

func (m *MasterProfile) GetFirstConsecutiveStaticIPAddress(subnetStr string) string

GetFirstConsecutiveStaticIPAddress returns the first static IP address of the given subnet.

func (*MasterProfile) HasAvailabilityZones

func (m *MasterProfile) HasAvailabilityZones() bool

HasAvailabilityZones returns true if the master profile has availability zones

func (*MasterProfile) HasCosmosEtcd added in v0.37.0

func (m *MasterProfile) HasCosmosEtcd() bool

HasCosmosEtcd returns true if cosmos etcd configuration is enabled

func (*MasterProfile) HasImageGallery added in v0.38.0

func (m *MasterProfile) HasImageGallery() bool

HasImageGallery returns true if the customer brought os image from Shared Image Gallery

func (*MasterProfile) HasImageRef added in v0.38.0

func (m *MasterProfile) HasImageRef() bool

HasImageRef returns true if the customer brought os image

func (*MasterProfile) HasMultipleNodes added in v0.37.0

func (m *MasterProfile) HasMultipleNodes() bool

HasMultipleNodes returns true if there are more than one master nodes

func (*MasterProfile) IsAuditDEnabled added in v0.42.0

func (m *MasterProfile) IsAuditDEnabled() bool

IsAuditDEnabled returns true if the master profile is configured for auditd

func (*MasterProfile) IsAvailabilitySet added in v0.46.1

func (m *MasterProfile) IsAvailabilitySet() bool

IsAvailabilitySet returns true if the master availability profile is availability set

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) IsUbuntu added in v0.35.0

func (m *MasterProfile) IsUbuntu() bool

IsUbuntu returns true if the master profile distro is any ubuntu distro

func (*MasterProfile) IsUbuntu1604 added in v0.33.0

func (m *MasterProfile) IsUbuntu1604() bool

IsUbuntu1604 returns true if the master profile distro is based on Ubuntu 16.04

func (*MasterProfile) IsUbuntu1804 added in v0.33.0

func (m *MasterProfile) IsUbuntu1804() bool

IsUbuntu1804 returns true if the master profile distro is based on Ubuntu 18.04

func (*MasterProfile) IsUbuntu2004 added in v0.72.0

func (m *MasterProfile) IsUbuntu2004() bool

IsUbuntu2004 returns true if the master profile distro is based on Ubuntu 20.04

func (*MasterProfile) IsUbuntuNonVHD added in v0.35.0

func (m *MasterProfile) IsUbuntuNonVHD() bool

IsUbuntuNonVHD returns true if the distro uses a base Ubuntu image

func (*MasterProfile) IsVHDDistro added in v0.35.0

func (m *MasterProfile) IsVHDDistro() bool

IsVHDDistro returns true if the distro uses VHD SKUs

func (*MasterProfile) IsVirtualMachineScaleSets

func (m *MasterProfile) IsVirtualMachineScaleSets() bool

IsVirtualMachineScaleSets returns true if the master availability profile is VMSS

type OSType

type OSType string

OSType represents OS types of agents

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

the OSTypes supported by vlabs

type OrchestratorProfile

type OrchestratorProfile struct {
	// OrchestratorType is a legacy property, this should always be set to "Kubernetes"
	OrchestratorType    string            `json:"orchestratorType"`
	OrchestratorVersion string            `json:"orchestratorVersion"`
	KubernetesConfig    *KubernetesConfig `json:"kubernetesConfig,omitempty"`
}

OrchestratorProfile contains Orchestrator properties

func (*OrchestratorProfile) GetAPIServerEtcdAPIVersion

func (o *OrchestratorProfile) GetAPIServerEtcdAPIVersion() string

GetAPIServerEtcdAPIVersion Used to set apiserver's etcdapi version

func (*OrchestratorProfile) GetPodInfraContainerSpec added in v0.43.0

func (o *OrchestratorProfile) GetPodInfraContainerSpec() string

GetPodInfraContainerSpec returns the sandbox image as a string (ex: registry.k8s.io/pause-amd64:3.1)

func (*OrchestratorProfile) IsAzureCNI

func (o *OrchestratorProfile) IsAzureCNI() bool

IsAzureCNI returns true if Azure CNI network plugin is enabled

func (*OrchestratorProfile) IsHostsConfigAgentEnabled added in v0.54.0

func (o *OrchestratorProfile) IsHostsConfigAgentEnabled() bool

IsHostsConfigAgentEnabled returns true if hosts config agent is enabled

func (*OrchestratorProfile) IsPrivateCluster added in v0.35.0

func (o *OrchestratorProfile) IsPrivateCluster() bool

IsPrivateCluster returns true if this deployment is a private cluster

type OrchestratorVersionProfile

type OrchestratorVersionProfile struct {
	// Orchestrator type and version
	OrchestratorProfile
	// Whether this orchestrator version is deployed by default if orchestrator release is not specified
	Default bool `json:"default,omitempty"`
	// List of available upgrades for this orchestrator version
	Upgrades []*OrchestratorProfile `json:"upgrades,omitempty"`
}

OrchestratorVersionProfile contains information of a supported orchestrator version:

func GetOrchestratorVersionProfile

func GetOrchestratorVersionProfile(orch *OrchestratorProfile, hasWindows bool, isAzureStackCloud bool) (*OrchestratorVersionProfile, error)

GetOrchestratorVersionProfile returns orchestrator info for upgradable container service

func GetOrchestratorVersionProfileList added in v0.35.0

func GetOrchestratorVersionProfileList(orchestrator, version string, windows bool, azureEnv string) ([]*OrchestratorVersionProfile, error)

GetOrchestratorVersionProfileList returns a list of unversioned OrchestratorVersionProfile objects per (optionally) specified orchestrator and version

type PrivateCluster

type PrivateCluster struct {
	Enabled                *bool                  `json:"enabled,omitempty"`
	EnableHostsConfigAgent *bool                  `json:"enableHostsConfigAgent,omitempty"`
	JumpboxProfile         *PrivateJumpboxProfile `json:"jumpboxProfile,omitempty"`
}

PrivateCluster defines the configuration for a private cluster

type PrivateJumpboxProfile

type PrivateJumpboxProfile struct {
	Name           string `json:"name" validate:"required"`
	VMSize         string `json:"vmSize" validate:"required"`
	OSDiskSizeGB   int    `json:"osDiskSizeGB,omitempty" validate:"min=0,max=2048"`
	Username       string `json:"username,omitempty"`
	PublicKey      string `json:"publicKey" validate:"required"`
	StorageProfile string `json:"storageProfile,omitempty"`
}

PrivateJumpboxProfile represents a jumpbox definition

type Properties

type Properties struct {
	ClusterID               string
	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"`
	ExtensionProfiles       []*ExtensionProfile      `json:"extensionProfiles"`
	JumpboxProfile          *JumpboxProfile          `json:"jumpboxProfile,omitempty"`
	ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
	CertificateProfile      *CertificateProfile      `json:"certificateProfile,omitempty"`
	AADProfile              *AADProfile              `json:"aadProfile,omitempty"`
	FeatureFlags            *FeatureFlags            `json:"featureFlags,omitempty"`
	CustomCloudProfile      *CustomCloudProfile      `json:"customCloudProfile,omitempty"`
	TelemetryProfile        *TelemetryProfile        `json:"telemetryProfile,omitempty"`
}

Properties represents the AKS cluster definition

func GetK8sDefaultProperties

func GetK8sDefaultProperties(hasWindows bool) *Properties

GetK8sDefaultProperties returns a struct of type api.Properties for testing purposes.

func GetMockPropertiesWithCustomCloudProfile added in v0.36.0

func GetMockPropertiesWithCustomCloudProfile(name string, hasCustomCloudProfile, hasEnvironment, hasAzureEnvironmentSpecConfig bool) Properties

GetMockPropertiesWithCustomCloudProfile returns a Properties object w/ mock CustomCloudProfile data

func (*Properties) AnyAgentHasLoadBalancerBackendAddressPoolIDs added in v0.39.0

func (p *Properties) AnyAgentHasLoadBalancerBackendAddressPoolIDs() bool

AnyAgentHasLoadBalancerBackendAddressPoolIDs returns true if any of the agent profiles contains LoadBalancerBackendAddressPoolIDs

func (*Properties) AnyAgentIsLinux added in v0.37.0

func (p *Properties) AnyAgentIsLinux() bool

AnyAgentIsLinux checks whether any of the agents in the AgentPools are linux

func (*Properties) AreAgentProfilesCustomVNET

func (p *Properties) AreAgentProfilesCustomVNET() bool

AreAgentProfilesCustomVNET returns true if all of the agent profiles in the clusters are configured with VNET.

func (*Properties) GetAADAdminGroupID added in v0.46.0

func (p *Properties) GetAADAdminGroupID() string

GetAADAdminGroupID returns AADProfile.AdminGroupID, or "" if no AADProfile

func (*Properties) GetAgentPoolByName added in v0.44.0

func (p *Properties) GetAgentPoolByName(name string) *AgentPoolProfile

GetAgentPoolByName returns the pool in the AgentPoolProfiles array that matches a name, nil if no match

func (*Properties) GetAgentPoolIndexByName added in v0.34.2

func (p *Properties) GetAgentPoolIndexByName(name string) int

GetAgentPoolIndexByName returns the index of the provided agentpool.

func (*Properties) GetAgentVMPrefix

func (p *Properties) GetAgentVMPrefix(a *AgentPoolProfile, index int) string

GetAgentVMPrefix returns the VM prefix for an agentpool.

func (*Properties) GetAzureCNICidr

func (p *Properties) GetAzureCNICidr() string

GetAzureCNICidr returns the default CNI Cidr if Azure CNI is enabled.

func (*Properties) GetClusterID

func (p *Properties) GetClusterID() string

GetClusterID creates a unique 8 string cluster ID.

func (*Properties) GetCustomCloudAuthenticationMethod added in v0.32.0

func (p *Properties) GetCustomCloudAuthenticationMethod() string

GetCustomCloudAuthenticationMethod returns authentication method which k8s azure cloud provider will use For AzurePublicCloud,AzureChinaCloud,azureGermanCloud,AzureUSGovernmentCloud, it will be always be client_secret For AzureStackCloud, if it is specified in configuration, the value will be used, if not ,the default value is client_secret.

func (*Properties) GetCustomCloudIdentitySystem added in v0.32.0

func (p *Properties) GetCustomCloudIdentitySystem() string

GetCustomCloudIdentitySystem returns identity system method for azure stack. For AzurePublicCloud,AzureChinaCloud,azureGermanCloud,AzureUSGovernmentCloud, it will be always be AzureAD For AzureStackCloud, if it is specified in configuration, the value will be used, if not ,the default value is AzureAD.

func (*Properties) GetCustomCloudName added in v0.31.0

func (p *Properties) GetCustomCloudName() string

GetCustomCloudName returns name of environment if customCloudProfile is provided, returns empty string if customCloudProfile is empty. Because customCloudProfile is empty for deployment is AzurePublicCloud, AzureChinaCloud,AzureGermanCloud,AzureUSGovernmentCloud, the return value will be empty string for those clouds

func (*Properties) GetCustomCloudRootCertificates added in v0.50.0

func (p *Properties) GetCustomCloudRootCertificates() string

GetCustomCloudRootCertificates returns comma-separated list of base64-encoded custom root certificates

func (*Properties) GetCustomCloudSourcesList added in v0.50.0

func (p *Properties) GetCustomCloudSourcesList() string

GetCustomCloudSourcesList returns a base64-encoded custom sources.list file

func (*Properties) GetCustomEnvironmentJSON added in v0.30.0

func (p *Properties) GetCustomEnvironmentJSON(escape bool) (string, error)

GetCustomEnvironmentJSON return the JSON format string for custom environment

func (*Properties) GetDNSPrefix added in v0.47.0

func (p *Properties) GetDNSPrefix() string

GetDNSPrefix returns the the string used as master FQDN prefix

func (*Properties) GetKubeProxyFeatureGates added in v0.45.0

func (p *Properties) GetKubeProxyFeatureGates() string

GetKubeProxyFeatureGates returns the feature gates string for the kube-proxy yaml manifest

func (*Properties) GetKubeProxyFeatureGatesWindowsArguments added in v0.59.0

func (p *Properties) GetKubeProxyFeatureGatesWindowsArguments() string

GetKubeProxyFeatureGatesWindowsArguments returns the feature gates string for the kube-proxy arguments in Windows nodes

func (*Properties) GetKubernetesHyperkubeSpec added in v0.47.0

func (p *Properties) GetKubernetesHyperkubeSpec() string

GetKubernetesHyperkubeSpec returns the string to use for the Kubernetes hyperkube image.

func (*Properties) GetKubernetesVersion added in v0.47.0

func (p *Properties) GetKubernetesVersion() string

GetKubernetesVersion returns the cluster Kubernetes version, with the Azure Stack suffix if Azure Stack Cloud.

func (*Properties) GetMasterFQDN added in v0.32.0

func (p *Properties) GetMasterFQDN() string

GetMasterFQDN returns the master FQDN.

func (*Properties) GetMasterVMNameList added in v0.60.0

func (p *Properties) GetMasterVMNameList() []string

GetMasterVMNameList returns the ordered control plane VM name list

func (*Properties) GetMasterVMPrefix

func (p *Properties) GetMasterVMPrefix() string

GetMasterVMPrefix returns the prefix of master VMs

func (*Properties) GetNSGName

func (p *Properties) GetNSGName() string

GetNSGName returns the name of the network security group of the cluster.

func (*Properties) GetNonMasqueradeCIDR

func (p *Properties) GetNonMasqueradeCIDR() string

GetNonMasqueradeCIDR returns the non-masquerade CIDR for the ip-masq-agent.

func (*Properties) GetPrimaryAvailabilitySetName

func (p *Properties) GetPrimaryAvailabilitySetName() string

GetPrimaryAvailabilitySetName returns the name of the primary availability set of the cluster

func (*Properties) GetPrimaryScaleSetName

func (p *Properties) GetPrimaryScaleSetName() string

GetPrimaryScaleSetName returns the name of the primary scale set node of the cluster

func (*Properties) GetRouteTableName

func (p *Properties) GetRouteTableName() string

GetRouteTableName returns the route table name of the cluster.

func (*Properties) GetSecondaryNonMasqueradeCIDR added in v0.41.0

func (p *Properties) GetSecondaryNonMasqueradeCIDR() string

GetSecondaryNonMasqueradeCIDR returns second cidr in case of dualstack clusters

func (*Properties) GetSubnetName

func (p *Properties) GetSubnetName() string

GetSubnetName returns the subnet name of the cluster based on its current configuration.

func (*Properties) GetVMType added in v0.47.0

func (p *Properties) GetVMType() string

GetVMType returns the type of VM "vmss" or "standard" to be passed to the cloud provider

func (*Properties) GetVNetResourceGroupName

func (p *Properties) GetVNetResourceGroupName() string

GetVNetResourceGroupName returns the virtual network resource group name of the cluster

func (*Properties) GetVirtualNetworkName

func (p *Properties) GetVirtualNetworkName() string

GetVirtualNetworkName returns the virtual network name of the cluster

func (*Properties) HasAADAdminGroupID added in v0.46.0

func (p *Properties) HasAADAdminGroupID() bool

HasAADAdminGroupID returns true if the cluster has an AADProfile w/ a valid AdminGroupID

func (*Properties) HasAadProfile

func (p *Properties) HasAadProfile() bool

HasAadProfile returns true if the has aad profile

func (*Properties) HasAgentPoolAvailabilityZones added in v0.68.0

func (p *Properties) HasAgentPoolAvailabilityZones() bool

func (*Properties) HasAvailabilityZones

func (p *Properties) HasAvailabilityZones() bool

HasAvailabilityZones returns true if the cluster contains a profile with zones

func (*Properties) HasDCSeriesSKU added in v0.42.0

func (p *Properties) HasDCSeriesSKU() bool

HasDCSeriesSKU returns whether or not there is an DC series SKU agent pool

func (*Properties) HasEphemeralDisks added in v0.40.0

func (p *Properties) HasEphemeralDisks() bool

HasStorageAccountDisks returns true if the cluster contains agent pools with Ephemeral Disks

func (*Properties) HasFlatcar added in v0.53.0

func (p *Properties) HasFlatcar() bool

HasFlatcar returns true if the cluster contains flatcar nodes

func (*Properties) HasManagedDisks

func (p *Properties) HasManagedDisks() bool

HasManagedDisks returns true if the cluster contains Managed Disks

func (*Properties) HasNSeriesSKU

func (p *Properties) HasNSeriesSKU() bool

HasNSeriesSKU returns whether or not there is an N series SKU agent pool

func (*Properties) HasNonRegularPriorityScaleset added in v0.46.0

func (p *Properties) HasNonRegularPriorityScaleset() bool

HasNonRegularPriorityScaleset returns true if any one node pool has a low or spot priority scaleset configuration

func (*Properties) HasStorageAccountDisks

func (p *Properties) HasStorageAccountDisks() bool

HasStorageAccountDisks returns true if the cluster contains Storage Account Disks

func (*Properties) HasVHDDistroNodes added in v0.49.0

func (p *Properties) HasVHDDistroNodes() bool

HasVHDDistroNodes returns true if any one Linux node pool, including masters, are running a VHD image

func (*Properties) HasVMASAgentPool added in v0.47.0

func (p *Properties) HasVMASAgentPool() bool

HasVMASAgentPool checks whether any of the agents in the AgentPool use VMAS or not

func (*Properties) HasVMSSAgentPool

func (p *Properties) HasVMSSAgentPool() bool

HasVMSSAgentPool returns true if the cluster contains Virtual Machine Scale Sets agent pools

func (*Properties) HasWindows

func (p *Properties) HasWindows() bool

HasWindows returns true if the cluster contains windows

func (*Properties) HasZonesForAllAgentPools

func (p *Properties) HasZonesForAllAgentPools() bool

HasZonesForAllAgentPools returns true if all of the agent pools have zones

func (*Properties) IsAgentPoolMember added in v0.58.0

func (p *Properties) IsAgentPoolMember(vmName string, a *AgentPoolProfile, index int) bool

IsAgentPoolMember returns true the VM is a pool member

func (*Properties) IsAzureCNIDualStack added in v0.50.0

func (p *Properties) IsAzureCNIDualStack() bool

IsAzureCNIDualStack determines if azure cni dual stack is enabled

func (*Properties) IsAzureStackCloud added in v0.30.0

func (p *Properties) IsAzureStackCloud() bool

IsAzureStackCloud return true if the cloud is AzureStack

func (*Properties) IsCustomCloudProfile added in v0.50.0

func (p *Properties) IsCustomCloudProfile() bool

IsCustomCloudProfile returns true if user has provided a custom cloud profile

func (*Properties) IsIPMasqAgentDisabled added in v0.46.0

func (p *Properties) IsIPMasqAgentDisabled() bool

IsIPMasqAgentDisabled returns true if the ip-masq-agent functionality is disabled

func (*Properties) IsIPMasqAgentEnabled added in v0.28.0

func (p *Properties) IsIPMasqAgentEnabled() bool

IsIPMasqAgentEnabled returns true if ip-masq-agent is enabled

func (*Properties) IsNVIDIADevicePluginEnabled

func (p *Properties) IsNVIDIADevicePluginEnabled() bool

IsNVIDIADevicePluginEnabled checks if the NVIDIA Device Plugin addon is enabled It is enabled by default if agents contain a GPU and Kubernetes version is >= 1.10.0

func (*Properties) IsNvidiaDevicePluginCapable added in v0.36.0

func (p *Properties) IsNvidiaDevicePluginCapable() bool

IsNvidiaDevicePluginCapable determines if the cluster definition is compatible with the nvidia-device-plugin daemonset

func (*Properties) IsVHDDistroForAllNodes added in v0.36.0

func (p *Properties) IsVHDDistroForAllNodes() bool

IsVHDDistroForAllNodes returns true if all of the agent pools plus masters are running the VHD image

func (*Properties) K8sOrchestratorName

func (p *Properties) K8sOrchestratorName() string

K8sOrchestratorName returns the 3 character orchestrator code for kubernetes-based clusters.

func (*Properties) NeedsAuditdRules added in v0.60.2

func (p *Properties) NeedsAuditdRules() bool

func (*Properties) RequireRouteTable added in v0.50.0

func (p *Properties) RequireRouteTable() bool

RequireRouteTable returns true if this deployment requires routing table

func (*Properties) SetCloudProviderBackoffDefaults added in v0.48.0

func (p *Properties) SetCloudProviderBackoffDefaults()

SetCloudProviderBackoffDefaults sets default cloudprovider backoff config

func (*Properties) SetCloudProviderRateLimitDefaults added in v0.40.0

func (p *Properties) SetCloudProviderRateLimitDefaults()

SetCloudProviderRateLimitDefaults sets default cloudprovider rate limiter config

func (*Properties) SetCustomCloudSpec added in v0.50.0

func (p *Properties) SetCustomCloudSpec(params AzureCustomCloudSpecParams) error

SetAzureCustomCloudSpec sets the cloud spec for Custom Cloud .

func (*Properties) ShouldEnableAzureCloudAddon added in v0.50.0

func (p *Properties) ShouldEnableAzureCloudAddon(addonName string) bool

ShouldEnableAzureCloudAddon determines whether or not we should enable the following addons: 1. cloud-node-manager, 2. azuredisk-csi-driver, 3. azurefile-csi-driver. For Linux clusters, we should enable CSI Drivers when using K8s 1.13+ and cloud-node-manager when using K8s 1.16+. For Windows clusters, we should enable them when using K8s 1.18+.

func (*Properties) TotalNodes

func (p *Properties) TotalNodes() int

TotalNodes returns the total number of nodes in the cluster configuration

type PropertiesDefaultsParams added in v0.41.0

type PropertiesDefaultsParams struct {
	IsUpgrade  bool
	IsScale    bool
	PkiKeySize int
}

PropertiesDefaultsParams is the parameters when we set the properties defaults for ContainerService.

type ProvisionScriptParametersInput added in v0.47.0

type ProvisionScriptParametersInput struct {
	Location             string
	ResourceGroup        string
	TenantID             string
	SubscriptionID       string
	ClientID             string
	ClientSecret         string
	APIServerCertificate string
	KubeletPrivateKey    string
	ClusterKeyVaultName  string
}

ProvisionScriptParametersInput is the struct used to pass in Azure environment variables and secrets as either values or ARM template variables when generating provision script parameters.

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"
	// Scaling means an existing ContainerService resource is being scaled only
	Scaling ProvisioningState = "Scaling"
	// 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 ContainerService 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"`
	Product       string `json:"product"`
	PromotionCode string `json:"promotionCode"`
	Publisher     string `json:"publisher"`
}

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

type RuntimeHandlers added in v0.55.0

type RuntimeHandlers struct {
	BuildNumber string `json:"buildNumber,omitempty"`
}

RuntimeHandlers configures the runtime settings in containerd

type ServicePrincipalProfile

type ServicePrincipalProfile struct {
	ClientID          string             `json:"clientId"`
	Secret            string             `json:"secret,omitempty" conform:"redact"`
	ObjectID          string             `json:"objectId,omitempty"`
	KeyvaultSecretRef *KeyvaultSecretRef `json:"keyvaultSecretRef,omitempty"`
}

ServicePrincipalProfile contains the client and secret used by the cluster for Azure Resource CRUD

type TelemetryProfile added in v0.45.0

type TelemetryProfile struct {
	ApplicationInsightsKey string `json:"applicationInsightsKey,omitempty"`
}

TelemetryProfile contains settings for collecting telemtry. Note telemtry is currently enabled/disabled with the 'EnableTelemetry' feature flag.

type TypeMeta

type TypeMeta struct {
	// APIVersion is on every object
	APIVersion string `json:"apiVersion"`
}

TypeMeta describes an individual API model object

func LoadDefaultContainerServiceProperties

func LoadDefaultContainerServiceProperties() (TypeMeta, *vlabs.Properties)

LoadDefaultContainerServiceProperties loads the default API model

type VlabsARMContainerService

type VlabsARMContainerService struct {
	TypeMeta
	*vlabs.ContainerService
}

VlabsARMContainerService is the type we read and write from file needed because the json that is sent to ARM and aks-engine is different from the json that the ACS RP Api gets from ARM

type WindowsProfile

type WindowsProfile struct {
	AdminUsername                 string            `json:"adminUsername"`
	AdminPassword                 string            `json:"adminPassword" conform:"redact"`
	CSIProxyURL                   string            `json:"csiProxyURL,omitempty"`
	EnableCSIProxy                *bool             `json:"enableCSIProxy,omitempty"`
	ImageRef                      *ImageReference   `json:"imageReference,omitempty"`
	ImageVersion                  string            `json:"imageVersion"`
	ProvisioningScriptsPackageURL string            `json:"provisioningScriptsPackageURL,omitempty"`
	WindowsImageSourceURL         string            `json:"windowsImageSourceURL"`
	WindowsPublisher              string            `json:"windowsPublisher"`
	WindowsOffer                  string            `json:"windowsOffer"`
	WindowsSku                    string            `json:"windowsSku"`
	WindowsDockerVersion          string            `json:"windowsDockerVersion"`
	Secrets                       []KeyVaultSecrets `json:"secrets,omitempty"`
	SSHEnabled                    *bool             `json:"sshEnabled,omitempty"`
	EnableAutomaticUpdates        *bool             `json:"enableAutomaticUpdates,omitempty"`
	IsCredentialAutoGenerated     *bool             `json:"isCredentialAutoGenerated,omitempty"`
	EnableAHUB                    *bool             `json:"enableAHUB,omitempty"`
	WindowsPauseImageURL          string            `json:"windowsPauseImageURL"`
	AlwaysPullWindowsPauseImage   *bool             `json:"alwaysPullWindowsPauseImage,omitempty"`
	WindowsRuntimes               *WindowsRuntimes  `json:"windowsRuntimes,omitempty"`
	WindowsSecureTLSEnabled       *bool             `json:"windowsSecureTLSEnabled,omitempty"`
}

WindowsProfile represents the windows parameters passed to the cluster

func (*WindowsProfile) GetEnableAHUB added in v0.52.0

func (w *WindowsProfile) GetEnableAHUB() bool

GetEnableAHUB returns true if AHUB should be enabled for Windows nodes

func (*WindowsProfile) GetEnableWindowsUpdate added in v0.32.0

func (w *WindowsProfile) GetEnableWindowsUpdate() bool

GetEnableWindowsUpdate gets the flag for enable windows update or returns the default value

func (*WindowsProfile) GetIsCredentialAutoGenerated added in v0.48.0

func (w *WindowsProfile) GetIsCredentialAutoGenerated() bool

GetIsCredentialAutoGenerated gets the flag to indicate whether the WindowsProfile is auto generated or returns the default value

func (*WindowsProfile) GetSSHEnabled added in v0.50.0

func (w *WindowsProfile) GetSSHEnabled() bool

GetSSHEnabled gets it ssh should be enabled for Windows nodes

func (*WindowsProfile) GetWindowsDefaultRuntimeHandler added in v0.55.0

func (w *WindowsProfile) GetWindowsDefaultRuntimeHandler() string

GetWindowsDefaultRuntimeHandler get the default containerd runtime handler or return default value

func (*WindowsProfile) GetWindowsDockerVersion

func (w *WindowsProfile) GetWindowsDockerVersion() string

GetWindowsDockerVersion gets the docker version specified or returns default value

func (*WindowsProfile) GetWindowsHypervRuntimeHandlers added in v0.55.0

func (w *WindowsProfile) GetWindowsHypervRuntimeHandlers() string

GetWindowsHypervRuntimeHandlers gets comma separated list of runtimehandler names

func (*WindowsProfile) GetWindowsSku

func (w *WindowsProfile) GetWindowsSku() string

GetWindowsSku gets the marketplace sku specified (such as Datacenter-Core-1809-with-Containers-smalldisk) or returns default value

func (*WindowsProfile) HasCustomImage

func (w *WindowsProfile) HasCustomImage() bool

HasCustomImage returns true if there is a custom windows os image url specified

func (*WindowsProfile) HasEnableAHUB added in v0.53.0

func (w *WindowsProfile) HasEnableAHUB() bool

HasEnableAHUB returns true if EnableAHUB is not nil

func (*WindowsProfile) HasImageGallery added in v0.41.0

func (w *WindowsProfile) HasImageGallery() bool

HasImageGallery returns true if the customer brought os image from Shared Image Gallery

func (*WindowsProfile) HasImageRef added in v0.41.0

func (w *WindowsProfile) HasImageRef() bool

HasImageRef returns true if the customer brought os image

func (*WindowsProfile) HasSecrets

func (w *WindowsProfile) HasSecrets() bool

HasSecrets returns true if the customer specified secrets to install

func (*WindowsProfile) IsCSIProxyEnabled added in v0.48.0

func (w *WindowsProfile) IsCSIProxyEnabled() bool

IsCSIProxyEnabled returns true if csi proxy service should be enable for Windows nodes

func (*WindowsProfile) IsVHDDistro added in v0.58.0

func (w *WindowsProfile) IsVHDDistro() bool

IsVHDDistro returns true if the distro uses VHD SKUs

type WindowsRuntimes added in v0.55.0

type WindowsRuntimes struct {
	Default        string            `json:"default,omitempty"`
	HypervRuntimes []RuntimeHandlers `json:"hypervRuntimes,omitempty"`
}

WindowsRuntimes configures containerd runtimes that are available on the windows nodes

Directories

Path Synopsis
Package common stores helpers and utility functions.
Package common stores helpers and utility functions.
Package vlabs stores an experimental API model.
Package vlabs stores an experimental API model.

Jump to

Keyboard shortcuts

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