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

Commit

Permalink
Add linux side custom bootstrap url to vlabs api
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce Campbell committed Dec 19, 2017
1 parent 82af0c1 commit 22148a6
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
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

0 comments on commit 22148a6

Please sign in to comment.