Skip to content

Commit

Permalink
fix: backport helm#6901 to Helm 2
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
  • Loading branch information
technosophos committed Dec 10, 2019
1 parent 0ca9534 commit 33c0738
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 33c0738

Please sign in to comment.