Skip to content

Commit

Permalink
fix: use 'dns:///' instead of 'dns://' (flyteorg#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigobaron authored and robert-ulbrich-mercedes-benz committed Jul 2, 2024
1 parent 5c0a9d4 commit 3480a66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions flytectl/cmd/configuration/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var prompt = promptui.Select{
Items: []string{"S3", "GCS"},
}

var endpointPrefix = [3]string{"dns://", "http://", "https://"}
var endpointPrefix = [3]string{"dns:///", "http://", "https://"}

// CreateConfigCommand will return configuration command
func CreateConfigCommand() *cobra.Command {
Expand Down Expand Up @@ -95,7 +95,7 @@ func initFlytectlConfig(ctx context.Context, reader io.Reader) error {
if !validateEndpointName(trimHost) {
return errors.New("Please use a valid endpoint")
}
templateValues.Host = fmt.Sprintf("dns://%s", trimHost)
templateValues.Host = fmt.Sprintf("dns:///%s", trimHost)
templateValues.Insecure = initConfig.DefaultConfig.Insecure
templateStr = configutil.AdminConfigTemplate
if initConfig.DefaultConfig.Storage {
Expand Down
2 changes: 1 addition & 1 deletion flytectl/cmd/configuration/configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestSetupConfigFunc(t *testing.T) {
}

func TestTrimFunc(t *testing.T) {
assert.Equal(t, trimEndpoint("dns://localhost"), "localhost")
assert.Equal(t, trimEndpoint("dns:///localhost"), "localhost")
assert.Equal(t, trimEndpoint("http://localhost"), "localhost")
assert.Equal(t, trimEndpoint("https://localhost"), "localhost")
}
Expand Down

0 comments on commit 3480a66

Please sign in to comment.