datamodel

package
v0.20201015.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: MIT Imports: 16 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// KubernetesWindowsDockerVersion is the default version for docker on Windows nodes in kubernetes
	KubernetesWindowsDockerVersion = "19.03.5"
	// KubernetesDefaultWindowsSku is the default SKU for Windows VMs in kubernetes
	KubernetesDefaultWindowsSku = "Datacenter-Core-1809-with-Containers-smalldisk"
)
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"
	// DefaultHostedProfileMasterName specifies the 3 character orchestrator code of the clusters with hosted master profiles.
	DefaultHostedProfileMasterName = "aks"
	// 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"
	// ScaleSetPrioritySpot means the ScaleSet will use Spot VMs
	ScaleSetPrioritySpot = "Spot"
)

Availability profiles

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

Supported container runtimes

View Source
const (
	// NetworkPluginKubenet is the string expression for the kubenet NetworkPlugin config
	NetworkPluginKubenet = "kubenet"
	// NetworkPluginAzure is the string expression for Azure CNI plugin.
	NetworkPluginAzure = "azure"
	// 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 = true
	// 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"
)
View Source
const (
	APIVersionAuthorizationUser   = "2018-09-01-preview"
	APIVersionAuthorizationSystem = "2018-01-01-preview"
	APIVersionCompute             = "2019-07-01"
	APIVersionDeployments         = "2018-06-01"
	APIVersionKeyVault            = "2018-02-14"
	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

	// DefaultAzureStackFaultDomainCount set to 3 as Azure Stack today has minimum 4 node deployment.
	DefaultAzureStackFaultDomainCount = 3

	// MaxAzureStackManagedDiskSize = size for Kubernetes master etcd disk volumes in GB if > 10 nodes as this is max what Azure Stack supports today.
	MaxAzureStackManagedDiskSize = "1023"
	// AzureStackSuffix is appended to kubernetes version on Azure Stack instances
	AzureStackSuffix = "-azs"
)

AzureStackCloud Specific Defaults

View Source
const (
	//AzureEdgeDCOSBootstrapDownloadURL is the azure edge CDN download url
	AzureEdgeDCOSBootstrapDownloadURL = "https://dcosio.azureedge.net/dcos/%s/bootstrap/%s.bootstrap.tar.xz"
	//AzureChinaCloudDCOSBootstrapDownloadURL is the China specific DCOS package download url.
	AzureChinaCloudDCOSBootstrapDownloadURL = "https://acsengine.blob.core.chinacloudapi.cn/dcos/%s.bootstrap.tar.xz"
)
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.1.3"
	// 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.1.3"
	// CNIPluginVer specifies the version of CNI implementation
	// https://github.com/containernetworking/plugins
	CNIPluginVer = "v0.7.6"
	// WindowsPauseImageVersion specifies version of Windows pause image
	WindowsPauseImageVersion = "1.4.0"
	// DefaultAlwaysPullWindowsPauseImage is the default windowsProfile.AlwaysPullWindowsPauseImage value
	DefaultAlwaysPullWindowsPauseImage = false
)
View Source
const (
	// DefaultMasterSubnet specifies the default master subnet for DCOS or Swarm
	DefaultMasterSubnet = "172.16.0.0/24"
	// DefaultFirstConsecutiveStaticIP specifies the static IP address on master 0 for DCOS or Swarm
	DefaultFirstConsecutiveStaticIP = "172.16.0.5"
	// DefaultSwarmWindowsMasterSubnet specifies the default master subnet for a Swarm Windows cluster
	DefaultSwarmWindowsMasterSubnet = "192.168.255.0/24"
	// DefaultSwarmWindowsFirstConsecutiveStaticIP specifies the static IP address on master 0 for a Swarm WIndows cluster
	DefaultSwarmWindowsFirstConsecutiveStaticIP = "192.168.255.5"
	// DefaultDCOSMasterSubnet specifies the default master subnet for a DCOS cluster
	DefaultDCOSMasterSubnet = "192.168.255.0/24"
	// DefaultDCOSFirstConsecutiveStaticIP  specifies the static IP address on master 0 for a DCOS cluster
	DefaultDCOSFirstConsecutiveStaticIP = "192.168.255.5"
	// DefaultDCOSBootstrapStaticIP specifies the static IP address on bootstrap for a DCOS cluster
	DefaultDCOSBootstrapStaticIP = "192.168.255.240"
	// 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.18"
	// 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"
	// 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"
	// 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 = "3.0.10"
	// DefaultContainerdVersion specifies the default containerd version to install.
	DefaultContainerdVersion = "1.1.5"
	// 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"
	// 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"
	// DefaultWindowsSSHEnabled is the default windowsProfile.sshEnabled value
	DefaultWindowsSSHEnabled = true
)
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 (
	// AzureStackDependenciesLocationPublic indicates to get dependencies from in AzurePublic cloud
	AzureStackDependenciesLocationPublic = "public"
	// AzureStackDependenciesLocationChina indicates to get dependencies from AzureChina cloud
	AzureStackDependenciesLocationChina = "china"
	// AzureStackDependenciesLocationGerman indicates to get dependencies from AzureGerman cloud
	AzureStackDependenciesLocationGerman = "german"
	// AzureStackDependenciesLocationUSGovernment indicates to get dependencies from AzureUSGovernment cloud
	AzureStackDependenciesLocationUSGovernment = "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 (
	// KubernetesDefaultRelease is the default Kubernetes release
	KubernetesDefaultRelease string = "1.13"
	// KubernetesDefaultReleaseWindows is the default Kubernetes release
	KubernetesDefaultReleaseWindows string = "1.14"
)
View Source
const (
	// HeapsterAddonName is the name of the heapster addon
	HeapsterAddonName = "heapster"
	// TillerAddonName is the name of the tiller addon deployment
	TillerAddonName = "tiller"
	// ACIConnectorAddonName is the name of the aci-connector addon deployment
	ACIConnectorAddonName = "aci-connector"
	// ClusterAutoscalerAddonName is the name of the cluster autoscaler addon deployment
	ClusterAutoscalerAddonName = "cluster-autoscaler"
	// BlobfuseFlexVolumeAddonName is the name of the blobfuse flexvolume addon
	BlobfuseFlexVolumeAddonName = "blobfuse-flexvolume"
	// SMBFlexVolumeAddonName is the name of the smb flexvolume addon
	SMBFlexVolumeAddonName = "smb-flexvolume"
	// KeyVaultFlexVolumeAddonName is the name of the key vault flexvolume addon deployment
	KeyVaultFlexVolumeAddonName = "keyvault-flexvolume"
	// DashboardAddonName is the name of the kubernetes-dashboard addon deployment
	DashboardAddonName = "kubernetes-dashboard"
	// ReschedulerAddonName is the name of the rescheduler addon deployment
	ReschedulerAddonName = "rescheduler"
	// MetricsServerAddonName is the name of the kubernetes metrics server addon deployment
	MetricsServerAddonName = "metrics-server"
	// NVIDIADevicePluginAddonName is the name of the NVIDIA device plugin addon deployment
	NVIDIADevicePluginAddonName = "nvidia-device-plugin"
	// ContainerMonitoringAddonName is the name of the kubernetes Container Monitoring addon deployment
	ContainerMonitoringAddonName = "container-monitoring"
	// IPMASQAgentAddonName is the name of the ip masq agent addon
	IPMASQAgentAddonName = "ip-masq-agent"
	// AzureCNINetworkMonitorAddonName is the name of the Azure CNI networkmonitor addon
	AzureCNINetworkMonitorAddonName = "azure-cni-networkmonitor"
	// AzureNetworkPolicyAddonName is the name of the Azure network policy manager addon
	AzureNetworkPolicyAddonName = "azure-npm-daemonset"
	// AzureVnetTelemetryContainerName is the name of the deprecated Azure vnet telemetry container in the azure-npm-daemonset addon
	AzureVnetTelemetryContainerName = "azure-vnet-telemetry-daemonset"
	// NMIContainerName is the name of the nmi container in the aad-pod-identity addon
	NMIContainerName = "nmi"
	// MICContainerName is the name of the mic container in the aad-pod-identity addon
	MICContainerName = "mic"
	// CiliumAgentContainerName is the name of the cilium-agent container in the cilium addon
	CiliumAgentContainerName = "cilium-agent"
	// CiliumCleanStateContainerName is the name of the clean-cilium-state container in the cilium addon
	CiliumCleanStateContainerName = "clean-cilium-state"
	// CiliumOperatorContainerName is the name of the cilium-operator container in the cilium addon
	CiliumOperatorContainerName = "cilium-operator"
	// CiliumEtcdOperatorContainerName is the name of the cilium-etcd-operator container in the cilium addon
	CiliumEtcdOperatorContainerName = "cilium-etcd-operator"
	// AntreaControllerContainerName is the name of the antrea-controller container in the antrea addon
	AntreaControllerContainerName = "antrea-controller"
	// AntreaAgentContainerName is the name of the antrea-agent container in the antrea addon
	AntreaAgentContainerName = "antrea-agent"
	// AntreaOVSContainerName is the name of the antrea-ovs container in the antrea addon
	AntreaOVSContainerName = "antrea-ovs"
	// AntreaInstallCNIContainerName is the name of the install-cni container in the antrea addon
	AntreaInstallCNIContainerName = "install-cni"
	// GatekeeperContainerName is the name of the gatekeeper container in the azure-policy addon
	GatekeeperContainerName = "gatekeeper"
	// CloudNodeManagerAddonName is the name of the cloud node manager addon
	CloudNodeManagerAddonName = "cloud-node-manager"
	// DNSAutoscalerAddonName is the name of the dns-autoscaler addon
	DNSAutoscalerAddonName = "dns-autoscaler"
	// CalicoAddonName is the name of calico daemonset addon
	CalicoAddonName = "calico-daemonset"
	// AADPodIdentityAddonName is the name of the aad-pod-identity addon deployment
	AADPodIdentityAddonName = "aad-pod-identity"
	// AzurePolicyAddonName is the name of the Azure Policy addon
	AzurePolicyAddonName = "azure-policy"
	// AppGwIngressAddonName appgw addon
	AppGwIngressAddonName = "appgw-ingress"
	// AzureDiskCSIDriverAddonName is the name of Azure Disk CSI Driver addon
	AzureDiskCSIDriverAddonName = "azuredisk-csi-driver"
	// CSIProvisionerContainerName is the name of the csi-provisioner container in the azuredisk-csi-driver and azurefile-csi-driver addons
	CSIProvisionerContainerName = "csi-provisioner"
	// CSIAttacherContainerName is the name of the csi-attacher container in the azuredisk-csi-driver and azurefile-csi-driver addons
	CSIAttacherContainerName = "csi-attacher"
	// CSIClusterDriverRegistrarContainerName is the name of the csi-cluster-driver-registrar container in the azuredisk-csi-driver and azurefile-csi-driver addons
	CSIClusterDriverRegistrarContainerName = "csi-cluster-driver-registrar"
	// CSILivenessProbeContainerName is the name of the livenessprobe container in the azuredisk-csi-driver and azurefile-csi-driver addons
	CSILivenessProbeContainerName = "livenessprobe"
	// CSISnapshotterContainerName is the name of the csi-snapshotter container in the azuredisk-csi-driver addon
	CSISnapshotterContainerName = "csi-snapshotter"
	// CSIResizerContainerName is the name of the csi-resizer container in the azuredisk-csi-driver addon
	CSIResizerContainerName = "csi-resizer"
	// CSINodeDriverRegistrarContainerName is the name of the csi-node-driver-registrar container in the azuredisk-csi-driver and azurefile-csi-driver addons
	CSINodeDriverRegistrarContainerName = "csi-node-driver-registrar"
	// CSIAzureDiskContainerName is the name of the azuredisk-csi container in the azuredisk-csi-driver and azurefile-csi-driver addons
	CSIAzureDiskContainerName = "azuredisk-csi"
	// AzureFileCSIDriverAddonName is the name of Azure File CSI Driver addon
	AzureFileCSIDriverAddonName = "azurefile-csi-driver"
	// CSIAzureFileContainerName is the name of the azurefile-csi container in the azurefile-csi-driver addon
	CSIAzureFileContainerName = "azurefile-csi"
	// AzureStorageClassesAddonName is the name of the azure storage classes addon
	AzureStorageClassesAddonName = "azure-storage-classes"
	// KubeDNSAddonName is the name of the kube-dns-deployment addon
	KubeDNSAddonName = "kube-dns"
	// CoreDNSAddonName is the name of the coredns addon
	CoreDNSAddonName = "coredns"
	// KubeProxyAddonName is the name of the kube-proxy config addon
	KubeProxyAddonName = "kube-proxy"
	// CiliumAddonName is the name of cilium daemonset addon
	CiliumAddonName = "cilium"
	// AntreaAddonName is the name of antrea daemonset addon
	AntreaAddonName = "antrea"
	// FlannelAddonName is the name of flannel plugin daemonset addon
	FlannelAddonName = "flannel"
	// KubeFlannelContainerName is the name of the kube-flannel container in the flannel addon
	KubeFlannelContainerName = "kube-flannel"
	// FlannelInstallCNIContainerName is the name of the install-cni container in the flannel addon
	FlannelInstallCNIContainerName = "install-cni"
	// KubeRBACProxyContainerName is the name of the kube-rbac-proxy container in the scheduled-maintenance addon
	KubeRBACProxyContainerName = "kube-rbac-proxy"
	// ScheduledMaintenanceManagerContainerName is the name of the manager container in the scheduled-maintenance addon
	ScheduledMaintenanceManagerContainerName = "manager"
	// AADAdminGroupAddonName is the name of the default admin group RBAC addon
	AADAdminGroupAddonName = "aad"
	// AzureCloudProviderAddonName is the name of the azure-cloud-provider addon
	AzureCloudProviderAddonName = "azure-cloud-provider"
	// AzureCSIStorageClassesAddonName is the name of Azure CSI storage classes addon
	AzureCSIStorageClassesAddonName = "azure-csi-storage-classes"
	// AuditPolicyAddonName is the name of the audit policy addon
	AuditPolicyAddonName = "audit-policy"
	// ScheduledMaintenanceAddonName is the name of the scheduled maintenance addon deployment
	ScheduledMaintenanceAddonName = "scheduled-maintenance"
	// PodSecurityPolicyAddonName is the name of the PodSecurityPolicy addon
	PodSecurityPolicyAddonName = "pod-security-policy"
	// NodeProblemDetectorAddonName is the name of the node problem detector addon
	NodeProblemDetectorAddonName = "node-problem-detector"
)

Addon name consts

View Source
const (
	ContainerDataDirKey = "dataDir"
)

Known container runtime configuration keys

View Source
const DefaultApplicationInsightsKey = "c92d8284-b550-4b06-b7ba-e80fd7178faa"

Default instrmentation key used for routing Application Insights data NOTE! this is in a test sub and needs to be switched to a production sub before collecting user data!

View Source
const (
	//DefaultExtensionsRootURL  Root URL for extensions
	DefaultExtensionsRootURL = "https://raw.githubusercontent.com/Azure/aks-engine/master/"
)
View Source
const (
	DefaultWindowsProvisioningScriptsPackageVersion = "v0.0.2"
)

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

View Source
const (
	// Kubernetes is the string constant for the Kubernetes orchestrator type
	Kubernetes string = "Kubernetes"
)

the orchestrators supported by vlabs

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

storage profiles

View Source
const MinCloudProviderQPSToBucketFactor float64 = 0.1

MinCloudProviderQPSToBucketFactor defines the minimum ratio between QPS and Bucket size for cloudprovider rate limiting

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 AllKubernetesSupportedVersions = map[string]bool{}/* 180 elements not displayed */

AllKubernetesSupportedVersions is a whitelist map of all supported Kubernetes version strings The bool value indicates if creating new clusters with this version is allowed

View Source
var AllKubernetesWindowsSupportedVersions = getAllKubernetesWindowsSupportedVersionsMap()

AllKubernetesWindowsSupportedVersions maintain a set of available k8s Windows versions in aks-engine

View Source
var (
	AzurePublicCloudSpecForTest = &AzureEnvironmentSpecConfig{
		CloudName: AzurePublicCloud,

		DockerSpecConfig: DockerSpecConfig{
			DockerEngineRepo:         "https://aptdocker.azureedge.net/repo",
			DockerComposeDownloadURL: "https://github.com/docker/compose/releases/download",
		},

		KubernetesSpecConfig: KubernetesSpecConfig{
			KubernetesImageBase:                  "k8s.gcr.io/",
			TillerImageBase:                      "gcr.io/kubernetes-helm/",
			ACIConnectorImageBase:                "microsoft/",
			NVIDIAImageBase:                      "nvidia/",
			CalicoImageBase:                      "calico/",
			AzureCNIImageBase:                    "mcr.microsoft.com/containernetworking/",
			MCRKubernetesImageBase:               "mcr.microsoft.com/",
			EtcdDownloadURLBase:                  "mcr.microsoft.com/oss/etcd-io/",
			KubeBinariesSASURLBase:               "https://acs-mirror.azureedge.net/kubernetes/",
			WindowsTelemetryGUID:                 "fb801154-36b9-41bc-89c2-f4d4f05472b0",
			CNIPluginsDownloadURL:                "https://acs-mirror.azureedge.net/cni/cni-plugins-amd64-" + CNIPluginVer + ".tgz",
			VnetCNILinuxPluginsDownloadURL:       "https://acs-mirror.azureedge.net/azure-cni/" + AzureCniPluginVerLinux + "/binaries/azure-vnet-cni-linux-amd64-" + AzureCniPluginVerLinux + ".tgz",
			VnetCNIWindowsPluginsDownloadURL:     "https://acs-mirror.azureedge.net/azure-cni/" + AzureCniPluginVerWindows + "/binaries/azure-vnet-cni-singletenancy-windows-amd64-" + AzureCniPluginVerWindows + ".zip",
			ContainerdDownloadURLBase:            "https://storage.googleapis.com/cri-containerd-release/",
			CSIProxyDownloadURL:                  "https://acs-mirror.azureedge.net/csi-proxy/v0.1.0/binaries/csi-proxy.tar.gz",
			WindowsProvisioningScriptsPackageURL: "https://acs-mirror.azureedge.net/aks-engine/windows/provisioning/signedscripts-" + DefaultWindowsProvisioningScriptsPackageVersion + ".zip",
			WindowsPauseImageURL:                 "mcr.microsoft.com/oss/kubernetes/pause:" + WindowsPauseImageVersion,
			AlwaysPullWindowsPauseImage:          DefaultAlwaysPullWindowsPauseImage,
		},

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

Functions

func FormatProdFQDNByLocation

func FormatProdFQDNByLocation(fqdnPrefix string, location string, cloudSpecConfig *AzureEnvironmentSpecConfig) 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 GetAllSupportedKubernetesVersions

func GetAllSupportedKubernetesVersions(isUpdate, hasWindows bool) []string

GetAllSupportedKubernetesVersions returns a slice of all supported Kubernetes versions

func GetDefaultKubernetesVersion

func GetDefaultKubernetesVersion(hasWindows bool) string

GetDefaultKubernetesVersion returns the default Kubernetes version, that is the latest patch of the default release

func GetLatestPatchVersion

func GetLatestPatchVersion(majorMinor string, versionsList []string) (version string)

GetLatestPatchVersion gets the most recent patch version from a list of semver versions given a major.minor string

func GetMaxVersion

func GetMaxVersion(versions []string, preRelease bool) string

GetMaxVersion gets the highest semver version preRelease=true means accept a pre-release version as a max value

func GetMinVersion

func GetMinVersion(versions []string, preRelease bool) string

GetMinVersion gets the lowest semver version preRelease=true means accept a pre-release version as a min value

func GetOrderedEscapedKeyValsString

func GetOrderedEscapedKeyValsString(config map[string]string) string

GetOrderedEscapedKeyValsString returns an ordered string of escaped, quoted key=val

func GetStorageAccountType

func GetStorageAccountType(sizeName string) (string, error)

GetStorageAccountType returns the support managed disk storage tier for a give VM size

func GetSupportedKubernetesVersion

func GetSupportedKubernetesVersion(version string, hasWindows bool) string

GetSupportedKubernetesVersion verifies that a passed-in version string is supported, or returns a default version string if not

func GetSupportedVersions

func GetSupportedVersions(orchType string, isUpdate, hasWindows bool) (versions []string, defaultVersion string)

GetSupportedVersions get supported version list for a certain orchestrator

func GetValidPatchVersion

func GetValidPatchVersion(orchType, orchVer string, isUpdate, hasWindows bool) string

GetValidPatchVersion gets the current valid patch version for the minor version of the passed in version

func GetVersionsBetween

func GetVersionsBetween(versions []string, versionMin, versionMax string, inclusive, preReleases bool) []string

GetVersionsBetween returns a list of versions between a min and max inclusive=true means that we test for equality on both bounds preReleases=true means that we include pre-release versions in the list

func GetVersionsGt

func GetVersionsGt(versions []string, version string, inclusive, preReleases bool) []string

GetVersionsGt returns a list of versions greater than a semver string given a list of versions inclusive=true means that we test for equality as well preReleases=true means that we include pre-release versions in the list

func GetVersionsLt

func GetVersionsLt(versions []string, version string, inclusive, preReleases bool) []string

GetVersionsLt returns a list of versions less than than a semver string given a list of versions inclusive=true means that we test for equality as well preReleases=true means that we include pre-release versions in the list

func IndentString

func IndentString(original string, spaces int) string

IndentString pads each line of an original string with N spaces and returns the new value.

func IsKubernetesVersionGe

func IsKubernetesVersionGe(actualVersion, version string) bool

IsKubernetesVersionGe returns true if actualVersion is greater than or equal to version

func IsSgxEnabledSKU

func IsSgxEnabledSKU(vmSize string) bool

IsSgxEnabledSKU determines if an VM SKU has SGX driver support

func IsSupportedKubernetesVersion

func IsSupportedKubernetesVersion(version string, isUpdate, hasWindows bool) bool

IsSupportedKubernetesVersion return true if the provided Kubernetes version is supported

func IsValidMinVersion

func IsValidMinVersion(orchType, orchRelease, orchVersion, minVersion string) (bool, error)

func RationalizeReleaseAndVersion

func RationalizeReleaseAndVersion(orchType, orchRel, orchVer string, isUpdate, hasWindows bool) (version string)

RationalizeReleaseAndVersion return a version when it can be rationalized from the input, otherwise ""

func SliceIntIsNonEmpty

func SliceIntIsNonEmpty(s []int) bool

SliceIntIsNonEmpty is a simple convenience to determine if a []int is non-empty

func ValidateDNSPrefix

func ValidateDNSPrefix(dnsName string) error

ValidateDNSPrefix is a helper function to check that a DNS Prefix is valid

func WrapAsVerbatim

func WrapAsVerbatim(s string) string

WrapAsVerbatim formats a string for inserting a literal string into an ARM expression

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

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 AddonProfile

type AddonProfile struct {
	Enabled bool              `json:"enabled"`
	Config  map[string]string `json:"config"`
	// Identity contains information of the identity associated with this addon.
	// This property will only appear in an MSI-enabled cluster.
	Identity *UserAssignedIdentity `json:"identity,omitempty"`
}

AddonProfile represents an addon for managed cluster

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"`
	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"`
	UltraSSDEnabled                     *bool                `json:"ultraSSDEnabled,omitempty"`
	EncryptionAtHost                    *bool                `json:"encryptionAtHost,omitempty"`
	ProximityPlacementGroupID           string               `json:"proximityPlacementGroupID,omitempty"`
}

AgentPoolProfile represents an agent pool definition

func (*AgentPoolProfile) GetKubernetesLabels

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

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

func (*AgentPoolProfile) HasAvailabilityZones added in v0.20200813.1

func (a *AgentPoolProfile) HasAvailabilityZones() bool

HasAvailabilityZones returns true if the agent pool has availability zones

func (*AgentPoolProfile) HasDisks added in v0.20200813.1

func (a *AgentPoolProfile) HasDisks() bool

HasDisks returns true if the customer specified disks

func (*AgentPoolProfile) IsAuditDEnabled added in v0.20200813.1

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) IsLinux added in v0.20200813.1

func (a *AgentPoolProfile) IsLinux() bool

IsLinux returns true if the agent pool is linux

func (*AgentPoolProfile) IsSpotScaleSet added in v0.20200813.1

func (a *AgentPoolProfile) IsSpotScaleSet() bool

IsSpotScaleSet returns true if the VMSS is Spot Scale Set

func (*AgentPoolProfile) IsUbuntu1804 added in v0.20200813.1

func (a *AgentPoolProfile) IsUbuntu1804() bool

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

func (*AgentPoolProfile) IsVHDDistro

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

type AgentPoolProfileRole added in v0.20200825.1

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 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 AzureEndpointConfig

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

AzureEndpointConfig describes an Azure endpoint

type AzureEnvironmentSpecConfig

type AzureEnvironmentSpecConfig struct {
	CloudName            string                        `json:"cloudName,omitempty"`
	DockerSpecConfig     DockerSpecConfig              `json:"dockerSpecConfig,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 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 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.

func CreateMockContainerService

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

CreateMockContainerService returns a mock container service for testing purposes

func (*ContainerService) GetLocations

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

GetLocations returns all supported regions. If AzurePublicCloud, AzureChinaCloud,AzureGermanCloud or AzureUSGovernmentCloud, GetLocations provides all azure regions in prod.

func (*ContainerService) IsAKSCustomCloud

func (cs *ContainerService) IsAKSCustomCloud() bool

IsAKSCustomCloud checks if it's in AKS custom cloud

type CustomCloudEnv

type CustomCloudEnv struct {
	Name                         string              `json:"Name,omitempty"`
	McrURL                       string              `json:"mcrURL,omitempty"`
	RepoDepotEndpoint            string              `json:"repoDepotEndpoint,omitempty"`
	ManagementPortalURL          string              `json:"managementPortalURL,omitempty"`
	PublishSettingsURL           string              `json:"publishSettingsURL,omitempty"`
	ServiceManagementEndpoint    string              `json:"serviceManagementEndpoint,omitempty"`
	ResourceManagerEndpoint      string              `json:"resourceManagerEndpoint,omitempty"`
	ActiveDirectoryEndpoint      string              `json:"activeDirectoryEndpoint,omitempty"`
	GalleryEndpoint              string              `json:"galleryEndpoint,omitempty"`
	KeyVaultEndpoint             string              `json:"keyVaultEndpoint,omitempty"`
	GraphEndpoint                string              `json:"graphEndpoint,omitempty"`
	ServiceBusEndpoint           string              `json:"serviceBusEndpoint,omitempty"`
	BatchManagementEndpoint      string              `json:"batchManagementEndpoint,omitempty"`
	StorageEndpointSuffix        string              `json:"storageEndpointSuffix,omitempty"`
	SQLDatabaseDNSSuffix         string              `json:"sqlDatabaseDNSSuffix,omitempty"`
	TrafficManagerDNSSuffix      string              `json:"trafficManagerDNSSuffix,omitempty"`
	KeyVaultDNSSuffix            string              `json:"keyVaultDNSSuffix,omitempty"`
	ServiceBusEndpointSuffix     string              `json:"serviceBusEndpointSuffix,omitempty"`
	ServiceManagementVMDNSSuffix string              `json:"serviceManagementVMDNSSuffix,omitempty"`
	ResourceManagerVMDNSSuffix   string              `json:"resourceManagerVMDNSSuffix,omitempty"`
	ContainerRegistryDNSSuffix   string              `json:"containerRegistryDNSSuffix,omitempty"`
	CosmosDBDNSSuffix            string              `json:"cosmosDBDNSSuffix,omitempty"`
	TokenAudience                string              `json:"tokenAudience,omitempty"`
	ResourceIdentifiers          ResourceIdentifiers `json:"resourceIdentifiers,omitempty"`
}

CustomCloudEnv represents the custom cloud env info of the AKS cluster.

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 added in v0.20200819.0

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 CustomProfile

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

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

type 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 DiagnosticsProfile

type DiagnosticsProfile struct {
	VMDiagnostics *VMDiagnostics `json:"vmDiagnostics"`
}

DiagnosticsProfile setting to enable/disable capturing diagnostics for VMs hosting container cluster.

type Distro

type Distro string

Distro represents Linux distro to use for Linux VMs

const (
	Ubuntu               Distro = "ubuntu"
	Ubuntu1804           Distro = "ubuntu-18.04"
	Ubuntu1804Gen2       Distro = "ubuntu-18.04-gen2"
	AKSUbuntu1604        Distro = "aks-ubuntu-16.04"
	AKSUbuntu1804        Distro = "aks-ubuntu-18.04"
	AKSUbuntuGPU1804     Distro = "aks-ubuntu-gpu-18.04"
	AKSUbuntuGPU1804Gen2 Distro = "aks-ubuntu-gpu-18.04-gen2"
)

Distro string consts

type DockerSpecConfig

type DockerSpecConfig struct {
	DockerEngineRepo         string `json:"dockerEngineRepo,omitempty"`
	DockerComposeDownloadURL string `json:"dockerComposeDownloadURL,omitempty"`
}

DockerSpecConfig is the configurations of docker

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

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 HostedMasterProfile

type HostedMasterProfile struct {
	// Master public endpoint/FQDN with port
	// The format will be FQDN:2376
	// Not used during PUT, returned as part of GETFQDN
	FQDN      string `json:"fqdn,omitempty"`
	DNSPrefix string `json:"dnsPrefix"`
	// Subnet holds the CIDR which defines the Azure Subnet in which
	// Agents will be provisioned. This is stored on the HostedMasterProfile
	// and will become `masterSubnet` in the compiled template.
	Subnet string `json:"subnet"`
	// ApiServerWhiteListRange is a comma delimited CIDR which is whitelisted to AKS
	APIServerWhiteListRange *string `json:"apiServerWhiteListRange"`
	IPMasqAgent             bool    `json:"ipMasqAgent"`
}

HostedMasterProfile defines properties for a hosted master

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) IsValid

func (i *ImageReference) IsValid() bool

IsValid returns true if ImageRefernce contains at least Name and ResourceGroup

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.20200825.1

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"
	// DefaultKubeProxyMode is the default KubeProxyMode value
	DefaultKubeProxyMode KubeProxyMode = KubeProxyModeIPTables
)

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) IsDisabled

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 KubernetesConfig

type KubernetesConfig struct {
	KubernetesImageBase               string            `json:"kubernetesImageBase,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"`
	ContainerdVersion                 string            `json:"containerdVersion,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"`
	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"`
	KubeletConfig                     map[string]string `json:"kubeletConfig,omitempty"`
	ContainerRuntimeConfig            map[string]string `json:"containerRuntimeConfig,omitempty"`
	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
	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"`
	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"`
}

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) 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) GetOrderedKubeletConfigStringForPowershell added in v0.20200819.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

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

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) IsIPMasqAgentDisabled

func (k *KubernetesConfig) IsIPMasqAgentDisabled() bool

IsIPMasqAgentDisabled checks if the ip-masq-agent addon is disabled

func (*KubernetesConfig) IsIPMasqAgentEnabled

func (k *KubernetesConfig) IsIPMasqAgentEnabled() bool

IsIPMasqAgentEnabled checks if the ip-masq-agent addon is enabled

func (*KubernetesConfig) IsRBACEnabled

func (k *KubernetesConfig) IsRBACEnabled() bool

IsRBACEnabled checks if RBAC is enabled

func (*KubernetesConfig) NeedsContainerd

func (k *KubernetesConfig) NeedsContainerd() bool

NeedsContainerd returns whether or not we need the containerd runtime configuration E.g., kata configuration requires containerd config

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.

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                  string `json:"kubernetesImageBase,omitempty"`
	TillerImageBase                      string `json:"tillerImageBase,omitempty"`
	ACIConnectorImageBase                string `json:"aciConnectorImageBase,omitempty"`
	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"`
}

LinuxProfile represents the linux parameters passed to the cluster

func (*LinuxProfile) HasCustomNodesDNS added in v0.20200819.0

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 added in v0.20200819.0

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"`
	ProximityPlacementGroupID string `json:"proximityPlacementGroupID,omitempty"`
}

MasterProfile represents the definition of the master cluster

func (*MasterProfile) GetCosmosEndPointURI added in v0.20200819.0

func (m *MasterProfile) GetCosmosEndPointURI() string

GetCosmosEndPointURI returns the URI string for the cosmos etcd endpoint

func (*MasterProfile) HasAvailabilityZones added in v0.20200819.0

func (m *MasterProfile) HasAvailabilityZones() bool

HasAvailabilityZones returns true if the master profile has availability zones

func (*MasterProfile) HasCosmosEtcd added in v0.20200819.0

func (m *MasterProfile) HasCosmosEtcd() bool

HasCosmosEtcd returns true if cosmos etcd configuration is enabled

func (*MasterProfile) HasMultipleNodes added in v0.20200819.0

func (m *MasterProfile) HasMultipleNodes() bool

HasMultipleNodes returns true if there are more than one master nodes

func (*MasterProfile) IsCustomVNET added in v0.20200819.0

func (m *MasterProfile) IsCustomVNET() bool

IsCustomVNET returns true if the customer brought their own VNET

func (*MasterProfile) IsUbuntu1804 added in v0.20200819.0

func (m *MasterProfile) IsUbuntu1804() bool

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

func (*MasterProfile) IsVHDDistro added in v0.20200819.0

func (m *MasterProfile) IsVHDDistro() bool

IsVHDDistro returns true if the distro uses VHD SKUs

func (*MasterProfile) IsVirtualMachineScaleSets added in v0.20200819.0

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    string            `json:"orchestratorType"`
	OrchestratorVersion string            `json:"orchestratorVersion"`
	KubernetesConfig    *KubernetesConfig `json:"kubernetesConfig,omitempty"`
}

OrchestratorProfile contains Orchestrator properties

func (*OrchestratorProfile) GetAPIServerEtcdAPIVersion added in v0.20200819.0

func (o *OrchestratorProfile) GetAPIServerEtcdAPIVersion() string

GetAPIServerEtcdAPIVersion Used to set apiserver's etcdapi version

func (*OrchestratorProfile) IsAzureCNI

func (o *OrchestratorProfile) IsAzureCNI() bool

IsAzureCNI returns true if Azure CNI network plugin is enabled

func (*OrchestratorProfile) IsKubernetes

func (o *OrchestratorProfile) IsKubernetes() bool

IsKubernetes returns true if this template is for Kubernetes orchestrator

func (*OrchestratorProfile) IsPrivateCluster added in v0.20200819.0

func (o *OrchestratorProfile) IsPrivateCluster() bool

IsPrivateCluster returns true if this deployment is a private cluster

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"`
	DiagnosticsProfile      *DiagnosticsProfile      `json:"diagnosticsProfile,omitempty"`
	ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
	CertificateProfile      *CertificateProfile      `json:"certificateProfile,omitempty"`
	AADProfile              *AADProfile              `json:"aadProfile,omitempty"`
	CustomProfile           *CustomProfile           `json:"customProfile,omitempty"`
	HostedMasterProfile     *HostedMasterProfile     `json:"hostedMasterProfile,omitempty"`
	AddonProfiles           map[string]AddonProfile  `json:"addonProfiles,omitempty"`
	FeatureFlags            *FeatureFlags            `json:"featureFlags,omitempty"`
	TelemetryProfile        *TelemetryProfile        `json:"telemetryProfile,omitempty"`
	CustomCloudEnv          *CustomCloudEnv          `json:"customCloudEnv,omitempty"`
}

Properties represents the AKS cluster definition

func GetK8sDefaultProperties

func GetK8sDefaultProperties(hasWindows bool) *Properties

GetK8sDefaultProperties returns a struct of type Properties for testing purposes.

func (*Properties) AnyAgentIsLinux added in v0.20200813.1

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) GetAgentVMPrefix added in v0.20200813.1

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

GetAgentVMPrefix returns the VM prefix for an agentpool.

func (*Properties) GetClusterID

func (p *Properties) GetClusterID() string

GetClusterID creates a unique 8 string cluster ID.

func (*Properties) GetCustomCloudName

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) GetCustomEnvironmentJSON

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

GetCustomEnvironmentJSON return the JSON format string for custom environment

func (*Properties) GetNSGName

func (p *Properties) GetNSGName() string

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

func (*Properties) GetPrimaryAvailabilitySetName

func (p *Properties) GetPrimaryAvailabilitySetName() string

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

func (*Properties) GetPrimaryScaleSetName added in v0.20200813.1

func (p *Properties) GetPrimaryScaleSetName() string

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

func (*Properties) GetResourcePrefix

func (p *Properties) GetResourcePrefix() string

GetResourcePrefix returns the prefix to use for naming cluster resources

func (*Properties) GetRouteTableName

func (p *Properties) GetRouteTableName() string

GetRouteTableName returns the route table name of the cluster.

func (*Properties) GetSubnetName

func (p *Properties) GetSubnetName() string

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

func (*Properties) GetVMType

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) HasAadProfile

func (p *Properties) HasAadProfile() bool

HasAadProfile returns true if the has aad profile

func (*Properties) HasAvailabilityZones added in v0.20200813.1

func (p *Properties) HasAvailabilityZones() bool

HasAvailabilityZones returns true if the cluster contains a profile with zones

func (*Properties) HasDCSeriesSKU

func (p *Properties) HasDCSeriesSKU() bool

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

func (*Properties) HasNSeriesSKU added in v0.20200813.1

func (p *Properties) HasNSeriesSKU() bool

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

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) IsAKSCustomCloud

func (p *Properties) IsAKSCustomCloud() bool

IsAKSCustomCloud checks if it's in AKS custom cloud

func (*Properties) IsHostedMasterProfile added in v0.20200813.1

func (p *Properties) IsHostedMasterProfile() bool

IsHostedMasterProfile returns true if the cluster has a hosted master

func (*Properties) IsIPMasqAgentDisabled

func (p *Properties) IsIPMasqAgentDisabled() bool

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

func (*Properties) IsIPMasqAgentEnabled

func (p *Properties) IsIPMasqAgentEnabled() bool

IsIPMasqAgentEnabled returns true if the cluster has a hosted master and IpMasqAgent is disabled

func (*Properties) IsVHDDistroForAllNodes

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) TotalNodes added in v0.20200813.1

func (p *Properties) TotalNodes() int

TotalNodes returns the total number of nodes in the cluster configuration

type ProvisioningState

type ProvisioningState string

ProvisioningState represents the current state of container service resource.

type PublicKey

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

PublicKey represents an SSH key for LinuxProfile

type ResourceIdentifiers

type ResourceIdentifiers struct {
	Graph               string `json:"graph,omitempty"`
	KeyVault            string `json:"keyVault,omitempty"`
	Datalake            string `json:"datalake,omitempty"`
	Batch               string `json:"batch,omitempty"`
	OperationalInsights string `json:"operationalInsights,omitempty"`
	Storage             string `json:"storage,omitempty"`
}

ResourceIdentifiers represents resource ids

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 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

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

type UserAssignedIdentity

type UserAssignedIdentity struct {
	ResourceID string `json:"resourceId,omitempty"`
	ClientID   string `json:"clientId,omitempty"`
	ObjectID   string `json:"objectId,omitempty"`
}

UserAssignedIdentity contains information that uniquely identifies an identity

type VMDiagnostics

type VMDiagnostics struct {
	Enabled bool `json:"enabled"`

	// Specifies storage account Uri where Boot Diagnostics (CRP &
	// VMSS BootDiagostics) and VM Diagnostics logs (using Linux
	// Diagnostics Extension) will be stored. Uri will be of standard
	// blob domain. i.e. https://storageaccount.blob.core.windows.net/
	// This field is readonly as ACS RP will create a storage account
	// for the customer.
	StorageURL *neturl.URL `json:"storageUrl"`
}

VMDiagnostics contains settings to on/off boot diagnostics collection in RD Host

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

WindowsProfile represents the windows parameters passed to the cluster

func (*WindowsProfile) GetSSHEnabled

func (w *WindowsProfile) GetSSHEnabled() bool

GetSSHEnabled gets it ssh should be enabled for Windows nodes

func (*WindowsProfile) GetWindowsDockerVersion

func (w *WindowsProfile) GetWindowsDockerVersion() string

GetWindowsDockerVersion gets the docker version specified or returns default value

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) HasImageRef

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

Jump to

Keyboard shortcuts

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