Skip to content

Commit

Permalink
fix: backport #6901 to Helm 2 (#7196)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
(cherry picked from commit ab79732)
  • Loading branch information
technosophos authored and mattfarina committed Mar 23, 2020
1 parent 18ab2b9 commit 713ed84
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/tiller/release_server.go
Expand Up @@ -270,7 +270,9 @@ func capabilities(disc discovery.DiscoveryInterface) (*chartutil.Capabilities, e
// TODO(mattfarina): In Helm v3 merge with GetVersionSet
func GetAllVersionSet(client discovery.ServerResourcesInterface) (chartutil.VersionSet, error) {
groups, resources, err := client.ServerGroupsAndResources()
if err != nil {
// It is okay to silently swallow a GroupDiscoveryFailedError, which is actually just
// a warning. The 'groups' will still have all of the valid data.
if err != nil && !discovery.IsGroupDiscoveryFailedError(err) {
return chartutil.DefaultVersionSet, err
}

Expand Down Expand Up @@ -318,7 +320,9 @@ func GetAllVersionSet(client discovery.ServerResourcesInterface) (chartutil.Vers
// GetVersionSet retrieves a set of available k8s API versions
func GetVersionSet(client discovery.ServerGroupsInterface) (chartutil.VersionSet, error) {
groups, err := client.ServerGroups()
if err != nil {
// It is okay to silently swallow a GroupDiscoveryFailedError, which is actually just
// a warning. The 'groups' will still have all of the valid data.
if err != nil && !discovery.IsGroupDiscoveryFailedError(err) {
return chartutil.DefaultVersionSet, err
}

Expand Down

0 comments on commit 713ed84

Please sign in to comment.