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

Add linux side custom bootstrap url to vlabs api #1952

Merged
merged 1 commit into from
Dec 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/acsengine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,9 @@ func getParameters(cs *api.ContainerService, isClassicMode bool, generatorCode s
if properties.OrchestratorProfile.DcosConfig.DcosWindowsBootstrapURL != "" {
dcosWindowsBootstrapURL = properties.OrchestratorProfile.DcosConfig.DcosWindowsBootstrapURL
}
if properties.OrchestratorProfile.DcosConfig.DcosBootstrapURL != "" {
dcosBootstrapURL = properties.OrchestratorProfile.DcosConfig.DcosBootstrapURL
}
}

addValue(parametersMap, "dcosBootstrapURL", dcosBootstrapURL)
Expand Down
1 change: 1 addition & 0 deletions pkg/api/converterfromapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ func convertOrchestratorProfileToVLabs(api *OrchestratorProfile, o *vlabs.Orches
}

func convertDcosConfigToVLabs(api *DcosConfig, vlabs *vlabs.DcosConfig) {
vlabs.DcosBootstrapURL = api.DcosBootstrapURL
vlabs.DcosWindowsBootstrapURL = api.DcosWindowsBootstrapURL
}

Expand Down
1 change: 1 addition & 0 deletions pkg/api/convertertoapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ func convertVLabsOrchestratorProfile(vp *vlabs.Properties, api *OrchestratorProf
}

func convertVLabsDcosConfig(vlabs *vlabs.DcosConfig, api *DcosConfig) {
api.DcosBootstrapURL = vlabs.DcosBootstrapURL
api.DcosWindowsBootstrapURL = vlabs.DcosWindowsBootstrapURL
}

Expand Down
1 change: 1 addition & 0 deletions pkg/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ type KubernetesConfig struct {

// DcosConfig Configuration for DC/OS
type DcosConfig struct {
DcosBootstrapURL string `json:"dcosBootstrapURL,omitempty"`
DcosWindowsBootstrapURL string `json:"dcosWindowsBootstrapURL,omitempty"`
}

Expand Down
1 change: 1 addition & 0 deletions pkg/api/vlabs/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ type KubernetesConfig struct {

// DcosConfig Configuration for DC/OS
type DcosConfig struct {
DcosBootstrapURL string `json:"dcosBootstrapURL,omitempty"`
DcosWindowsBootstrapURL string `json:"dcosWindowsBootstrapURL,omitempty"`
}

Expand Down
5 changes: 5 additions & 0 deletions pkg/api/vlabs/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ func Test_OrchestratorProfile_Validate(t *testing.T) {
t.Errorf("should error when DcosConfig populated for non-Kubernetes OrchestratorType")
}

o.DcosConfig.DcosBootstrapURL = "http://www.microsoft.com"
if err := o.Validate(false); err == nil {
t.Errorf("should error when DcosConfig populated for non-Kubernetes OrchestratorType")
}

o = &OrchestratorProfile{
OrchestratorType: "Kubernetes",
OrchestratorVersion: "1.7.3",
Expand Down