Documentation ¶
Index ¶
- Constants
- Variables
- func CidrFirstIP(cidr net.IP) net.IP
- func CidrStringFirstIP(ip string) (net.IP, error)
- func GetAllSupportedKubernetesVersions() []string
- func GetAllSupportedKubernetesVersionsWindows() []string
- func GetLatestPatchVersion(majorMinor string, versionsList []string) (version string)
- func GetSupportedKubernetesVersion(version string) string
- func GetSupportedVersions(orchType string, hasWindows bool) (versions []string, defaultVersion string)
- func GetValidPatchVersion(orchType, orchVer string) string
- func HandleValidationErrors(e validator.ValidationErrors) error
- func IP4BroadcastAddress(n *net.IPNet) net.IP
- func IsKubernetesVersionGe(actualVersion, version string) bool
- func RationalizeReleaseAndVersion(orchType, orchRel, orchVer string, hasWindows bool) (version string)
Constants ¶
const ( // Mesos is the string constant for MESOS orchestrator type Mesos string = "Mesos" // DCOS is the string constant for DCOS orchestrator type and defaults to DCOS188 DCOS string = "DCOS" // Swarm is the string constant for the Swarm orchestrator type Swarm string = "Swarm" // Kubernetes is the string constant for the Kubernetes orchestrator type Kubernetes string = "Kubernetes" // SwarmMode is the string constant for the Swarm Mode orchestrator type SwarmMode string = "SwarmMode" )
the orchestrators supported
const ( // MinAgentCount are the minimum number of agents per agent pool MinAgentCount = 1 // MaxAgentCount are the maximum number of agents per agent pool MaxAgentCount = 100 // MinPort specifies the minimum tcp port to open MinPort = 1 // MaxPort specifies the maximum tcp port to open MaxPort = 65535 // MaxDisks specifies the maximum attached disks to add to the cluster MaxDisks = 4 // MinDiskSizeGB specifies the minimum attached disk size MinDiskSizeGB = 1 // MaxDiskSizeGB specifies the maximum attached disk size MaxDiskSizeGB = 1023 // MinIPAddressCount specifies the minimum number of IP addresses per network interface MinIPAddressCount = 1 // MaxIPAddressCount specifies the maximum number of IP addresses per network interface MaxIPAddressCount = 256 )
validation values
const ( // AvailabilitySet means that the vms are in an availability set AvailabilitySet = "AvailabilitySet" // VirtualMachineScaleSets means that the vms are in a virtual machine scaleset VirtualMachineScaleSets = "VirtualMachineScaleSets" )
Availability profiles
const ( // StorageAccount means that the nodes use raw storage accounts for their os and attached volumes StorageAccount = "StorageAccount" // ManagedDisks means that the nodes use managed disks for their os and attached volumes ManagedDisks = "ManagedDisks" )
storage profiles
const ( // KubernetesVersion1Dot10Dot0RC1 is the string for kubernetes 1.10.0-rc.1 KubernetesVersion1Dot10Dot0RC1 string = "1.10.0-rc.1" // KubernetesVersion1Dot10Dot0Beta2 is the string for kubernetes 1.10.0-beta.2 KubernetesVersion1Dot10Dot0Beta2 string = "1.10.0-beta.2" // KubernetesVersion1Dot10Dot0Beta4 is the string for kubernetes 1.10.0-beta.4 KubernetesVersion1Dot10Dot0Beta4 string = "1.10.0-beta.4" // KubernetesVersion1Dot9Dot0 is the major.minor.patch string for the 1.9.0 version of kubernetes KubernetesVersion1Dot9Dot0 string = "1.9.0" // KubernetesVersion1Dot9Dot1 is the major.minor.patch string for the 1.9.1 version of kubernetes KubernetesVersion1Dot9Dot1 string = "1.9.1" // KubernetesVersion1Dot9Dot2 is the major.minor.patch string for the 1.9.2 version of kubernetes KubernetesVersion1Dot9Dot2 string = "1.9.2" // KubernetesVersion1Dot9Dot3 is the major.minor.patch string for the 1.9.3 version of kubernetes KubernetesVersion1Dot9Dot3 string = "1.9.3" // KubernetesVersion1Dot9Dot4 is the major.minor.patch string for the 1.9.4 version of kubernetes KubernetesVersion1Dot9Dot4 string = "1.9.4" // KubernetesVersion1Dot9Dot5 is the major.minor.patch string for the 1.9.5 version of kubernetes KubernetesVersion1Dot9Dot5 string = "1.9.5" // KubernetesVersion1Dot8Dot0 is the major.minor.patch string for the 1.8.0 version of kubernetes KubernetesVersion1Dot8Dot0 string = "1.8.0" // KubernetesVersion1Dot8Dot1 is the major.minor.patch string for the 1.8.1 version of kubernetes KubernetesVersion1Dot8Dot1 string = "1.8.1" // KubernetesVersion1Dot8Dot2 is the major.minor.patch string for the 1.8.2 version of kubernetes KubernetesVersion1Dot8Dot2 string = "1.8.2" // KubernetesVersion1Dot8Dot4 is the major.minor.patch string for the 1.8.4 version of kubernetes KubernetesVersion1Dot8Dot4 string = "1.8.4" // KubernetesVersion1Dot8Dot6 is the major.minor.patch string for the 1.8.6 version of kubernetes KubernetesVersion1Dot8Dot6 string = "1.8.6" // KubernetesVersion1Dot8Dot7 is the major.minor.patch string for the 1.8.7 version of kubernetes KubernetesVersion1Dot8Dot7 string = "1.8.7" // KubernetesVersion1Dot8Dot8 is the major.minor.patch string for the 1.8.8 version of kubernetes KubernetesVersion1Dot8Dot8 string = "1.8.8" // KubernetesVersion1Dot8Dot9 is the major.minor.patch string for the 1.8.9 version of kubernetes KubernetesVersion1Dot8Dot9 string = "1.8.9" // KubernetesVersion1Dot8Dot10 is the major.minor.patch string for the 1.8.10 version of kubernetes KubernetesVersion1Dot8Dot10 string = "1.8.10" // KubernetesVersion1Dot7Dot0 is the major.minor.patch string for the 1.7.0 version of kubernetes KubernetesVersion1Dot7Dot0 string = "1.7.0" // KubernetesVersion1Dot7Dot1 is the major.minor.patch string for the 1.7.1 version of kubernetes KubernetesVersion1Dot7Dot1 string = "1.7.1" // KubernetesVersion1Dot7Dot2 is the major.minor.patch string for the 1.7.2 version of kubernetes KubernetesVersion1Dot7Dot2 string = "1.7.2" // KubernetesVersion1Dot7Dot4 is the major.minor.patch string for the 1.7.4 version of kubernetes KubernetesVersion1Dot7Dot4 string = "1.7.4" // KubernetesVersion1Dot7Dot5 is the major.minor.patch string for the 1.7.5 version of kubernetes KubernetesVersion1Dot7Dot5 string = "1.7.5" // KubernetesVersion1Dot7Dot7 is the major.minor.patch string for the 1.7.7 version of kubernetes KubernetesVersion1Dot7Dot7 string = "1.7.7" // KubernetesVersion1Dot7Dot9 is the major.minor.patch string for the 1.7.9 version of kubernetes KubernetesVersion1Dot7Dot9 string = "1.7.9" // KubernetesVersion1Dot7Dot10 is the major.minor.patch string for the 1.7.10 version of kubernetes KubernetesVersion1Dot7Dot10 string = "1.7.10" // KubernetesVersion1Dot7Dot12 is the major.minor.patch string for the 1.7.12 version of kubernetes KubernetesVersion1Dot7Dot12 string = "1.7.12" // KubernetesVersion1Dot7Dot13 is the major.minor.patch string for the 1.7.13 version of kubernetes KubernetesVersion1Dot7Dot13 string = "1.7.13" // KubernetesVersion1Dot7Dot14 is the major.minor.patch string for the 1.7.14 version of kubernetes KubernetesVersion1Dot7Dot14 string = "1.7.14" // KubernetesVersion1Dot7Dot15 is the major.minor.patch string for the 1.7.15 version of kubernetes KubernetesVersion1Dot7Dot15 string = "1.7.15" // KubernetesVersion1Dot6Dot6 is the major.minor.patch string for the 1.6.6 version of kubernetes KubernetesVersion1Dot6Dot6 string = "1.6.6" // KubernetesVersion1Dot6Dot9 is the major.minor.patch string for the 1.6.9 version of kubernetes KubernetesVersion1Dot6Dot9 string = "1.6.9" // KubernetesVersion1Dot6Dot11 is the major.minor.patch string for the 1.6.11 version of kubernetes KubernetesVersion1Dot6Dot11 string = "1.6.11" // KubernetesVersion1Dot6Dot12 is the major.minor.patch string for the 1.6.12 version of kubernetes KubernetesVersion1Dot6Dot12 string = "1.6.12" // KubernetesVersion1Dot6Dot13 is the major.minor.patch string for the 1.6.13 version of kubernetes KubernetesVersion1Dot6Dot13 string = "1.6.13" // KubernetesDefaultVersion is the default major.minor.patch version for kubernetes KubernetesDefaultVersion string = KubernetesVersion1Dot8Dot9 )
const ( // DCOSVersion1Dot10Dot0 is the major.minor.patch string for 1.10.0 versions of DCOS DCOSVersion1Dot10Dot0 string = "1.10.0" // DCOSVersion1Dot9Dot0 is the major.minor.patch string for 1.9.0 versions of DCOS DCOSVersion1Dot9Dot0 string = "1.9.0" // DCOSVersion1Dot8Dot8 is the major.minor.patch string for 1.8.8 versions of DCOS DCOSVersion1Dot8Dot8 string = "1.8.8" // DCOSDefaultVersion is the default major.minor.patch version for DCOS DCOSDefaultVersion string = DCOSVersion1Dot9Dot0 )
Variables ¶
var AllDCOSSupportedVersions = []string{ DCOSVersion1Dot10Dot0, DCOSVersion1Dot9Dot0, DCOSVersion1Dot8Dot8, }
AllDCOSSupportedVersions maintain a list of available dcos versions in acs-engine
var AllKubernetesSupportedVersions = map[string]bool{ KubernetesVersion1Dot6Dot6: true, KubernetesVersion1Dot6Dot9: true, KubernetesVersion1Dot6Dot11: true, KubernetesVersion1Dot6Dot12: true, KubernetesVersion1Dot6Dot13: true, KubernetesVersion1Dot7Dot0: true, KubernetesVersion1Dot7Dot1: true, KubernetesVersion1Dot7Dot2: true, KubernetesVersion1Dot7Dot4: true, KubernetesVersion1Dot7Dot5: true, KubernetesVersion1Dot7Dot7: true, KubernetesVersion1Dot7Dot9: true, KubernetesVersion1Dot7Dot10: true, KubernetesVersion1Dot7Dot12: true, KubernetesVersion1Dot7Dot13: true, KubernetesVersion1Dot7Dot14: true, KubernetesVersion1Dot7Dot15: true, KubernetesVersion1Dot8Dot0: true, KubernetesVersion1Dot8Dot1: true, KubernetesVersion1Dot8Dot2: true, KubernetesVersion1Dot8Dot4: true, KubernetesVersion1Dot8Dot6: true, KubernetesVersion1Dot8Dot7: true, KubernetesVersion1Dot8Dot8: true, KubernetesVersion1Dot8Dot9: true, KubernetesVersion1Dot8Dot10: true, KubernetesVersion1Dot9Dot0: true, KubernetesVersion1Dot9Dot1: true, KubernetesVersion1Dot9Dot2: true, KubernetesVersion1Dot9Dot3: true, KubernetesVersion1Dot9Dot4: true, KubernetesVersion1Dot9Dot5: true, KubernetesVersion1Dot10Dot0Beta2: true, KubernetesVersion1Dot10Dot0Beta4: true, KubernetesVersion1Dot10Dot0RC1: true, }
AllKubernetesSupportedVersions is a whitelist map of supported Kubernetes version strings
var AllKubernetesWindowsSupportedVersions = map[string]bool{ KubernetesVersion1Dot7Dot2: true, KubernetesVersion1Dot7Dot4: true, KubernetesVersion1Dot7Dot5: true, KubernetesVersion1Dot7Dot7: true, KubernetesVersion1Dot7Dot9: true, KubernetesVersion1Dot7Dot10: true, KubernetesVersion1Dot7Dot12: true, KubernetesVersion1Dot7Dot13: true, KubernetesVersion1Dot7Dot14: true, KubernetesVersion1Dot7Dot15: true, KubernetesVersion1Dot8Dot0: true, KubernetesVersion1Dot8Dot1: true, KubernetesVersion1Dot8Dot2: true, KubernetesVersion1Dot8Dot4: true, KubernetesVersion1Dot8Dot6: true, KubernetesVersion1Dot8Dot7: true, KubernetesVersion1Dot8Dot8: true, KubernetesVersion1Dot8Dot9: true, KubernetesVersion1Dot8Dot10: true, KubernetesVersion1Dot9Dot0: true, KubernetesVersion1Dot9Dot1: true, KubernetesVersion1Dot9Dot2: true, KubernetesVersion1Dot9Dot3: true, KubernetesVersion1Dot9Dot4: true, KubernetesVersion1Dot9Dot5: true, KubernetesVersion1Dot10Dot0Beta2: false, KubernetesVersion1Dot10Dot0Beta4: false, KubernetesVersion1Dot10Dot0RC1: false, }
AllKubernetesWindowsSupportedVersions maintain a set of available k8s Windows versions in acs-engine
Functions ¶
func CidrFirstIP ¶ added in v0.6.0
CidrFirstIP returns the first IP of the provided subnet.
func CidrStringFirstIP ¶ added in v0.6.0
CidrStringFirstIP returns the first IP of the provided subnet string. Returns an error if the string cannot be parsed.
func GetAllSupportedKubernetesVersions ¶ added in v0.9.0
func GetAllSupportedKubernetesVersions() []string
GetAllSupportedKubernetesVersions returns a slice of all supported Kubernetes versions
func GetAllSupportedKubernetesVersionsWindows ¶ added in v0.14.0
func GetAllSupportedKubernetesVersionsWindows() []string
GetAllSupportedKubernetesVersionsWindows returns a slice of all supported Kubernetes versions on Windows
func GetLatestPatchVersion ¶ added in v0.14.0
GetLatestPatchVersion gets the most recent patch version from a list of semver versions given a major.minor string
func GetSupportedKubernetesVersion ¶ added in v0.9.0
GetSupportedKubernetesVersion verifies that a passed-in version string is supported, or returns a default version string if not
func GetSupportedVersions ¶ added in v0.9.0
func GetSupportedVersions(orchType string, hasWindows bool) (versions []string, defaultVersion string)
GetSupportedVersions get supported version list for a certain orchestrator
func GetValidPatchVersion ¶ added in v0.9.0
GetValidPatchVersion gets the current valid patch version for the minor version of the passed in version
func HandleValidationErrors ¶
func HandleValidationErrors(e validator.ValidationErrors) error
HandleValidationErrors is the helper function to catch validator.ValidationError based on Namespace of the error, and return customized error message.
func IP4BroadcastAddress ¶ added in v0.6.0
IP4BroadcastAddress returns the broadcast address for the given IP subnet.
func IsKubernetesVersionGe ¶ added in v0.14.0
IsKubernetesVersionGe returns if a semver string is >= to a compare-against semver string (suppport "-" suffixes)
func RationalizeReleaseAndVersion ¶ added in v0.9.0
func RationalizeReleaseAndVersion(orchType, orchRel, orchVer string, hasWindows bool) (version string)
RationalizeReleaseAndVersion return a version when it can be rationalized from the input, otherwise ""
Types ¶
This section is empty.