Skip to content

Commit

Permalink
Merge pull request #93 from opskumu/opskumu
Browse files Browse the repository at this point in the history
fix: list realease with all_namespaces bug fix
  • Loading branch information
opskumu authored Aug 14, 2023
2 parents 866a908 + f29f2dd commit 4797aaf
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions releases.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import (
"fmt"
"io"
"net/url"
"os"
"strconv"
"strings"
"time"

"github.com/gin-gonic/gin"
"github.com/golang/glog"
"github.com/pkg/errors"
"helm.sh/helm/v3/pkg/action"
"helm.sh/helm/v3/pkg/chart"
Expand Down Expand Up @@ -610,6 +608,9 @@ func listReleases(c *gin.Context) {
respErr(c, err)
return
}
if options.AllNamespaces {
namespace = ""
}
actionConfig, err := actionConfigInit(InitKubeInformation(namespace, kubeContext, kubeConfig))
if err != nil {
respErr(c, err)
Expand All @@ -621,13 +622,6 @@ func listReleases(c *gin.Context) {
// merge list options
client.All = options.All
client.AllNamespaces = options.AllNamespaces
if client.AllNamespaces {
err = actionConfig.Init(settings.RESTClientGetter(), "", os.Getenv("HELM_DRIVER"), glog.Infof)
if err != nil {
respErr(c, err)
return
}
}
client.ByDate = options.ByDate
client.SortReverse = options.SortReverse
client.Limit = options.Limit
Expand Down

0 comments on commit 4797aaf

Please sign in to comment.