mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Added greater granularity for boolean environment variables (#511)
* Added greater granularity for boolean environment variables * Improved solution as reviewed
This commit is contained in:
@@ -3,7 +3,6 @@ package objects
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"os"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -11,6 +10,7 @@ import (
|
||||
"io"
|
||||
|
||||
"github.com/joomcode/errorx"
|
||||
"github.com/komodorio/helm-dashboard/pkg/dashboard/utils"
|
||||
"github.com/pkg/errors"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"helm.sh/helm/v3/pkg/action"
|
||||
@@ -193,7 +193,7 @@ func (d *DataLayer) nsForCtx(ctx string) string {
|
||||
}
|
||||
|
||||
func (d *DataLayer) PeriodicTasks(ctx context.Context) {
|
||||
if os.Getenv("HD_NO_AUTOUPDATE") == "" {
|
||||
if !utils.EnvAsBool("HD_NO_AUTOUPDATE", false) {
|
||||
// auto-update repos
|
||||
go d.loopUpdateRepos(ctx, 10*time.Minute) // TODO: parameterize interval?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user