Documentation ¶
Index ¶
- func CreateMockAgentPoolProfile(agentPoolName, orchestratorVersion string, ...) *api.AgentPoolResource
- func GetClusterAutoscalerNodesConfig(addon api.KubernetesAddon, cs *ContainerService) string
- func GetK8sDefaultProperties(hasWindows bool) *api.Properties
- func GetMockPropertiesWithCustomCloudProfile(name string, ...) api.Properties
- func ToAksEngineContainerService(cs *ContainerService) *api.ContainerService
- type ContainerService
- func (cs *ContainerService) GetCloudSpecConfig() api.AzureEnvironmentSpecConfig
- func (cs *ContainerService) GetLocations() []string
- func (cs *ContainerService) IsAKSCustomCloud() bool
- func (cs *ContainerService) SetDefaultCerts(params api.DefaultCertParams) (bool, []net.IP, error)
- func (cs *ContainerService) SetPropertiesDefaults(params api.PropertiesDefaultsParams) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMockAgentPoolProfile ¶ added in v0.20200806.1
func CreateMockAgentPoolProfile(agentPoolName, orchestratorVersion string, provisioningState api.ProvisioningState, agentCount int) *api.AgentPoolResource
CreateMockAgentPoolProfile creates a mock AgentPoolResource for testing
func GetClusterAutoscalerNodesConfig ¶ added in v0.20200806.1
func GetClusterAutoscalerNodesConfig(addon api.KubernetesAddon, cs *ContainerService) string
GetClusterAutoscalerNodesConfig returns the cluster-autoscaler runtime configuration flag for a nodepool
func GetK8sDefaultProperties ¶
func GetK8sDefaultProperties(hasWindows bool) *api.Properties
GetK8sDefaultProperties returns a struct of type api.Properties for testing purposes.
func GetMockPropertiesWithCustomCloudProfile ¶ added in v0.20200806.1
func GetMockPropertiesWithCustomCloudProfile(name string, hasCustomCloudProfile, hasEnvironment, hasAzureEnvironmentSpecConfig bool) api.Properties
GetMockPropertiesWithCustomCloudProfile returns a Properties object w/ mock CustomCloudProfile data
func ToAksEngineContainerService ¶ added in v0.20200806.1
func ToAksEngineContainerService(cs *ContainerService) *api.ContainerService
ToAksEngineContainerService converts our ContainerService to aks-engine's ContainerService to our. This is temporarily needed until we have finished porting all aks-engine code that's used by us into our own code base.
Types ¶
type ContainerService ¶
type ContainerService struct { ID string `json:"id"` Location string `json:"location"` Name string `json:"name"` Plan *api.ResourcePurchasePlan `json:"plan,omitempty"` Tags map[string]string `json:"tags"` Type string `json:"type"` Properties *api.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 FromAksEngineContainerService ¶ added in v0.20200806.1
func FromAksEngineContainerService(aksEngineCS *api.ContainerService) *ContainerService
FromAksEngineContainerService converts aks-engine's ContainerService to our own ContainerService. This is temporarily needed while we are still using aks-engine's ApiLoader to load ContainerService from file. Once that code is ported into our code base, we'll be using our own datamodel consistently through out the code base and this conversion function won't be needed.
func (*ContainerService) GetCloudSpecConfig ¶ added in v0.20200806.1
func (cs *ContainerService) GetCloudSpecConfig() api.AzureEnvironmentSpecConfig
GetCloudSpecConfig returns the Kubernetes container images URL configurations based on the deploy target environment. for example: if the target is the public azure, then the default container image url should be k8s.gcr.io/... if the target is azure china, then the default container image should be mirror.azure.cn:5000/google_container/...
func (*ContainerService) GetLocations ¶
func (cs *ContainerService) GetLocations() []string
GetLocations returns all supported regions. If AzureStackCloud, GetLocations provides the location of container service If AzurePublicCloud, AzureChinaCloud,AzureGermanCloud or AzureUSGovernmentCloud, GetLocations provides all azure regions in prod.
func (*ContainerService) IsAKSCustomCloud ¶
func (cs *ContainerService) IsAKSCustomCloud() bool
IsAKSCustomCloud checks if it's in AKS custom cloud
func (*ContainerService) SetDefaultCerts ¶ added in v0.20200806.1
func (cs *ContainerService) SetDefaultCerts(params api.DefaultCertParams) (bool, []net.IP, error)
SetDefaultCerts generates and sets defaults for the container certificateProfile, returns true if certs are generated
func (*ContainerService) SetPropertiesDefaults ¶ added in v0.20200806.1
func (cs *ContainerService) SetPropertiesDefaults(params api.PropertiesDefaultsParams) (bool, error)
SetPropertiesDefaults for the container Properties, returns true if certs are generated