diff --git a/pkg/config/reader.go b/pkg/config/reader.go index e8824c75335b..c2c73e6f6f08 100644 --- a/pkg/config/reader.go +++ b/pkg/config/reader.go @@ -46,6 +46,11 @@ func (r *FileReader) Read() error { if configFile != "" { viper.SetConfigFile(configFile) + + // Assume YAML if the file has no extension. + if filepath.Ext(configFile) == "" { + viper.SetConfigType("yaml") + } } else { r.setupConfigFileSearch() }