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

Commit

Permalink
linux profile is optional and add the nodeRG (#2582)
Browse files Browse the repository at this point in the history
* linux profile is optional and add the nodeRG

* prune error message

* add auto gene public key to linux Profile when it's nil

* remove add auto-gene aah key when converting
  • Loading branch information
zqingqing1 authored and Cecile Robert-Michon committed Apr 4, 2018
1 parent 02c1aab commit b463cd0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/api/agentPoolOnlyApi/v20180331/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ type Properties struct {
DNSPrefix string `json:"dnsPrefix" validate:"required"`
FQDN string `json:"fqdn,omitempty"`
AgentPoolProfiles []*AgentPoolProfile `json:"agentPoolProfiles,omitempty" validate:"dive,required"`
LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty" validate:"required"`
LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"`
WindowsProfile *WindowsProfile `json:"windowsProfile,omitempty"`
ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
AccessProfiles map[string]AccessProfile `json:"accessProfiles,omitempty"`
AddonProfiles map[string]AddonProfile `json:"addonProfiles,omitempty"`
NodeResourceGroup string `json:"nodeResourceGroup,omitempty"`
}

// AddonProfile represents an addon for managed cluster
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/agentPoolOnlyApi/v20180331/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func handleValidationErrors(e validator.ValidationErrors) error {
ns := err.Namespace()
switch ns {
// TODO: Add more validation here
case "Properties.LinuxProfile", "Properties.ServicePrincipalProfile.ClientID",
case "Properties.ServicePrincipalProfile.ClientID",
"Properties.ServicePrincipalProfile.Secret", "Properties.WindowsProfile.AdminUsername",
"Properties.WindowsProfile.AdminPassword":
return fmt.Errorf("missing %s", ns)
Expand Down

0 comments on commit b463cd0

Please sign in to comment.