common

package
v0.19.5 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
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"
	// OpenShift is the string constant for the OpenShift orchestrator type
	OpenShift string = "OpenShift"
)

the orchestrators supported

View Source
const (
	// MinAgentCount are the minimum number of agents per agent pool
	MinAgentCount = 1
	// MaxAgentCount are the maximum number of agents per agent pool
	MaxAgentCount = 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

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

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

storage profiles

View Source
const (
	// KubernetesDefaultRelease is the default Kubernetes release
	KubernetesDefaultRelease string = "1.8"
	// KubernetesDefaultReleaseWindows is the default Kubernetes release
	KubernetesDefaultReleaseWindows string = "1.9"
)
View Source
const (
	// DCOSVersion1Dot11Dot2 is the major.minor.patch string for 1.11.0 versions of DCOS
	DCOSVersion1Dot11Dot2 string = "1.11.2"
	// DCOSVersion1Dot11Dot0 is the major.minor.patch string for 1.11.0 versions of DCOS
	DCOSVersion1Dot11Dot0 string = "1.11.0"
	// 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"
	// DCOSVersion1Dot9Dot8 is the major.minor.patch string for 1.9.8 versions of DCOS
	DCOSVersion1Dot9Dot8 string = "1.9.8"
	// 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 = DCOSVersion1Dot11Dot0
)
View Source
const (
	// OpenShiftVersion3Dot9Dot0 is the major.minor.patch string for the 3.9.0 version of OpenShift
	OpenShiftVersion3Dot9Dot0 string = "3.9.0"
	// OpenShiftVersionUnstable is used for development in acs-engine and should not be used by end-users.
	OpenShiftVersionUnstable string = "unstable"
	// OpenShiftDefaultVersion is the default major.minor.patch version for OpenShift
	OpenShiftDefaultVersion string = OpenShiftVersion3Dot9Dot0
)
View Source
const (
	// SwarmVersion is the Swarm orchestrator version
	SwarmVersion = "swarm:1.1.0"
	// DockerCEVersion is the DockerCE orchestrator version
	DockerCEVersion = "17.03.*"
)

Variables

AllDCOSSupportedVersions maintain a list of available dcos versions in acs-engine

View Source
var AllKubernetesSupportedVersions = map[string]bool{
	"1.6.6":          true,
	"1.6.9":          true,
	"1.6.11":         true,
	"1.6.12":         true,
	"1.6.13":         true,
	"1.7.0":          true,
	"1.7.1":          true,
	"1.7.2":          true,
	"1.7.4":          true,
	"1.7.5":          true,
	"1.7.7":          true,
	"1.7.9":          true,
	"1.7.10":         true,
	"1.7.12":         true,
	"1.7.13":         true,
	"1.7.14":         true,
	"1.7.15":         true,
	"1.7.16":         true,
	"1.8.0":          true,
	"1.8.1":          true,
	"1.8.2":          true,
	"1.8.4":          true,
	"1.8.6":          true,
	"1.8.7":          true,
	"1.8.8":          true,
	"1.8.9":          true,
	"1.8.10":         true,
	"1.8.11":         true,
	"1.8.12":         true,
	"1.8.13":         true,
	"1.8.14":         true,
	"1.8.15":         true,
	"1.9.0":          true,
	"1.9.1":          true,
	"1.9.2":          true,
	"1.9.3":          true,
	"1.9.4":          true,
	"1.9.5":          true,
	"1.9.6":          true,
	"1.9.7":          true,
	"1.9.8":          true,
	"1.9.9":          true,
	"1.10.0-beta.2":  true,
	"1.10.0-beta.4":  true,
	"1.10.0-rc.1":    true,
	"1.10.0":         true,
	"1.10.1":         true,
	"1.10.2":         true,
	"1.10.3":         true,
	"1.10.4":         true,
	"1.10.5":         true,
	"1.11.0-alpha.1": true,
	"1.11.0-alpha.2": true,
	"1.11.0-beta.1":  true,
	"1.11.0-beta.2":  true,
	"1.11.0-rc.1":    true,
	"1.11.0-rc.2":    true,
	"1.11.0-rc.3":    true,
	"1.11.0":         true,
	"1.11.1":         true,
}

AllKubernetesSupportedVersions is a whitelist map of supported Kubernetes version strings

View Source
var AllKubernetesWindowsSupportedVersions = getAllKubernetesWindowsSupportedVersionsMap()

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

Functions

func CidrFirstIP added in v0.6.0

func CidrFirstIP(cidr net.IP) net.IP

CidrFirstIP returns the first IP of the provided subnet.

func CidrStringFirstIP added in v0.6.0

func CidrStringFirstIP(ip string) (net.IP, error)

CidrStringFirstIP returns the first IP of the provided subnet string. Returns an error if the string cannot be parsed.

func GetAllSupportedDCOSVersions added in v0.19.0

func GetAllSupportedDCOSVersions() []string

GetAllSupportedDCOSVersions returns a slice of all supported DCOS versions.

func GetAllSupportedDockerCEVersions added in v0.19.0

func GetAllSupportedDockerCEVersions() []string

GetAllSupportedDockerCEVersions returns a slice of all supported Docker CE versions.

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

func GetAllSupportedOpenShiftVersions() []string

GetAllSupportedOpenShiftVersions returns a slice of all supported OpenShift versions.

func GetAllSupportedSwarmVersions added in v0.19.0

func GetAllSupportedSwarmVersions() []string

GetAllSupportedSwarmVersions returns a slice of all supported Swarm versions.

func GetDefaultKubernetesVersion added in v0.16.0

func GetDefaultKubernetesVersion() string

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

func GetDefaultKubernetesVersionWindows added in v0.17.0

func GetDefaultKubernetesVersionWindows() string

GetDefaultKubernetesVersionWindows returns the default Kubernetes version for Windows, that is the latest patch of the default release

func GetLatestPatchVersion added in v0.14.0

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

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

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

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

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

func GetValidPatchVersion added in v0.9.0

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

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

func GetVersionsBetween added in v0.14.5

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

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

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

func IP4BroadcastAddress(n *net.IPNet) net.IP

IP4BroadcastAddress returns the broadcast address for the given IP subnet.

func IsKubernetesVersionGe added in v0.14.0

func IsKubernetesVersionGe(actualVersion, version string) bool

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

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

func ValidateDNSPrefix added in v0.19.0

func ValidateDNSPrefix(dnsName string) error

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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