Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
openshift and agentpool fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis committed Oct 4, 2018
1 parent ac70fc0 commit ea07008
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pkg/acsengine/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ func setMasterProfileDefaults(a *api.Properties, isUpgrade bool) {
if a.MasterProfile.Distro == "" {
if a.OrchestratorProfile.IsKubernetes() {
a.MasterProfile.Distro = api.AKS
} else {
} else if !a.OrchestratorProfile.IsOpenShift() {
a.MasterProfile.Distro = api.Ubuntu
}
}
Expand Down Expand Up @@ -647,14 +647,14 @@ func setAgentProfileDefaults(a *api.Properties, isUpgrade, isScale bool) {
profile.AcceleratedNetworkingEnabled = helpers.PointerToBool(!isUpgrade && !isScale && helpers.AcceleratedNetworkingSupported(profile.VMSize))
}

if a.MasterProfile.Distro == "" {
if profile.Distro == "" {
if a.OrchestratorProfile.IsKubernetes() {
if profile.OSDiskSizeGB != 0 && profile.OSDiskSizeGB < api.VHDDiskSizeAKS {
profile.Distro = api.Ubuntu
} else {
profile.Distro = api.AKS
}
} else {
} else if !a.OrchestratorProfile.IsOpenShift() {
profile.Distro = api.Ubuntu
}
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/acsengine/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -652,14 +652,14 @@ func TestSetComponentsNetworkDefaults(t *testing.T) {
expectedDistro api.Distro // expected result default disto to be used
}{
{
"ubuntu_kubernetes",
"default_kubernetes",
api.OrchestratorProfile{
OrchestratorType: api.Kubernetes,
},
api.AKS,
},
{
"rhel_openshift",
"default_openshift",
api.OrchestratorProfile{
OrchestratorType: api.OpenShift,
},
Expand Down

0 comments on commit ea07008

Please sign in to comment.