Fix after CR

Signed-off-by: Jakub Warczarek <jakub.warczarek@gmail.com>
pull/11226/head
Jakub Warczarek 3 years ago
parent f46ff131c2
commit 3d81ea22ac

@ -14,7 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
/*Package cli describes the operating environment for the Helm CLI. /*
Package cli describes the operating environment for the Helm CLI.
Helm's environment encapsulates all of the service dependencies Helm has. Helm's environment encapsulates all of the service dependencies Helm has.
These dependencies are expressed as interfaces so that alternate implementations These dependencies are expressed as interfaces so that alternate implementations
@ -121,6 +122,7 @@ func New() *EnvSettings {
config.Wrap(func(rt http.RoundTripper) http.RoundTripper { config.Wrap(func(rt http.RoundTripper) http.RoundTripper {
return &retryingRoundTripper{wrapped: rt} return &retryingRoundTripper{wrapped: rt}
}) })
config.UserAgent = version.GetUserAgent()
return config return config
}, },
} }
@ -231,9 +233,5 @@ func (s *EnvSettings) SetNamespace(namespace string) {
// RESTClientGetter gets the kubeconfig from EnvSettings // RESTClientGetter gets the kubeconfig from EnvSettings
func (s *EnvSettings) RESTClientGetter() genericclioptions.RESTClientGetter { func (s *EnvSettings) RESTClientGetter() genericclioptions.RESTClientGetter {
s.config.WrapConfigFn = func(c *rest.Config) *rest.Config {
c.UserAgent = version.GetUserAgent()
return c
}
return s.config return s.config
} }

@ -186,9 +186,9 @@ func (c *ChartDownloader) getOciURI(ref, version string, u *url.URL) (*url.URL,
// //
// - For fully qualified URLs, the version will be ignored (since URLs aren't versioned) // - For fully qualified URLs, the version will be ignored (since URLs aren't versioned)
// - For a chart reference // - For a chart reference
// - If version is non-empty, this will return the URL for that version // * If version is non-empty, this will return the URL for that version
// - If version is empty, this will return the URL for the latest version // * If version is empty, this will return the URL for the latest version
// - If no version can be found, an error is returned // * If no version can be found, an error is returned
func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, error) { func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, error) {
u, err := url.Parse(ref) u, err := url.Parse(ref)
if err != nil { if err != nil {

Loading…
Cancel
Save