Skip to content

Commit

Permalink
fixes 'ipName and zone are being written to app.yaml even when no pla…
Browse files Browse the repository at this point in the history
…tform is specified' (kubeflow#2774)
  • Loading branch information
kkasravi authored and k8s-ci-robot committed Mar 22, 2019
1 parent 7ef79bb commit 54fd247
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bootstrap/cmd/kfctl/cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func init() {
}

// platform gcp
generateCmd.Flags().String(string(kftypes.ZONE), kftypes.DefaultZone,
generateCmd.Flags().String(string(kftypes.ZONE), "",
string(kftypes.ZONE)+" if '--platform gcp'")
bindErr = generateCfg.BindPFlag(string(kftypes.ZONE), generateCmd.Flags().Lookup(string(kftypes.ZONE)))
if bindErr != nil {
Expand Down
4 changes: 2 additions & 2 deletions bootstrap/pkg/kfapp/coordinator/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func LoadKfApp(options map[string]interface{}) (kftypes.KfApp, error) {
}
if options[string(kftypes.IPNAME)] != nil && options[string(kftypes.IPNAME)].(string) != "" {
kfdef.Spec.IpName = options[string(kftypes.IPNAME)].(string)
} else if kfdef.Name != "" {
} else if kfdef.Spec.Platform == kftypes.GCP && kfdef.Name != "" {
kfdef.Spec.IpName = kfdef.Name + "-ip"
}
if options[string(kftypes.PROJECT)] != nil && options[string(kftypes.PROJECT)].(string) != "" {
Expand All @@ -312,7 +312,7 @@ func LoadKfApp(options map[string]interface{}) (kftypes.KfApp, error) {
}
if options[string(kftypes.ZONE)] != nil && options[string(kftypes.ZONE)].(string) != "" {
kfdef.Spec.Zone = options[string(kftypes.ZONE)].(string)
} else {
} else if kfdef.Spec.Platform == kftypes.GCP {
kfdef.Spec.Zone = kftypes.DefaultZone
}
if options[string(kftypes.USE_BASIC_AUTH)] != nil {
Expand Down

0 comments on commit 54fd247

Please sign in to comment.