Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2c7771e

Browse files
committed
AWS: Support default for ExternalHost on AWS
Fix #33563
1 parent 3e3ff44 commit 2c7771e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/genericapiserver/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,14 +503,14 @@ func DefaultAndValidateRunOptions(options *options.ServerRunOptions) {
503503
// Set default value for ExternalHost if not specified.
504504
if len(options.ExternalHost) == 0 {
505505
// TODO: extend for other providers
506-
if options.CloudProvider == "gce" {
506+
if options.CloudProvider == "gce" || options.CloudProvider == "aws" {
507507
cloud, err := cloudprovider.InitCloudProvider(options.CloudProvider, options.CloudConfigFile)
508508
if err != nil {
509509
glog.Fatalf("Cloud provider could not be initialized: %v", err)
510510
}
511511
instances, supported := cloud.Instances()
512512
if !supported {
513-
glog.Fatalf("GCE cloud provider has no instances. this shouldn't happen. exiting.")
513+
glog.Fatalf("%q cloud provider has no instances. this shouldn't happen. exiting.", options.CloudProvider)
514514
}
515515
hostname, err := os.Hostname()
516516
if err != nil {

0 commit comments

Comments
 (0)