New 🌊 wave for @helm

Commit 92a9cabf

92a9cabfc62fMerged

Sviatoslav Dumchenko <[email protected]> · 3 years ago · 6 files · ~6 modified

Description

feat: add support for tracking generic resources

Details

Commit
92a9cabfc62f
Parent
73ace4ac25f0

pkg/action/flags.gomodifiedView file

@@ -2,7 +2,9 @@
22
33 import (
44 "fmt"
5+ "time"
56
7+ "github.com/helmwave/helmwave/pkg/kubedog"
68 "github.com/helmwave/helmwave/pkg/plan"
79 "github.com/helmwave/helmwave/pkg/template"
810 "github.com/urfave/cli/v2"
@@ -166,3 +168,50 @@
166168 Destination: v,
167169 }
168170 }
171+
172+func flagsKubedog(dog *kubedog.Config) []cli.Flag {
173+ return []cli.Flag{
174+ &cli.BoolFlag{
175+ Name: "kubedog",
176+ Usage: "enable/disable kubedog",
177+ Value: false,
178+ EnvVars: []string{"HELMWAVE_KUBEDOG_ENABLED", "HELMWAVE_KUBEDOG"},
179+ Destination: &dog.Enabled,
180+ },
181+ &cli.DurationFlag{
182+ Name: "kubedog-status-interval",
183+ Usage: "interval of kubedog status messages",
184+ Value: 5 * time.Second,
185+ EnvVars: []string{"HELMWAVE_KUBEDOG_STATUS_INTERVAL"},
186+ Destination: &dog.StatusInterval,
187+ },
188+ &cli.DurationFlag{
189+ Name: "kubedog-start-delay",
190+ Usage: "delay kubedog start, don't make it too late",
191+ Value: time.Second,
192+ EnvVars: []string{"HELMWAVE_KUBEDOG_START_DELAY"},
193+ Destination: &dog.StartDelay,
194+ },
195+ &cli.DurationFlag{
196+ Name: "kubedog-timeout",
197+ Usage: "timeout of kubedog multitrackers",
198+ Value: 5 * time.Minute,
199+ EnvVars: []string{"HELMWAVE_KUBEDOG_TIMEOUT"},
200+ Destination: &dog.Timeout,
201+ },
202+ &cli.IntFlag{
203+ Name: "kubedog-log-width",
204+ Usage: "set kubedog max log line width",
205+ Value: 140,
206+ EnvVars: []string{"HELMWAVE_KUBEDOG_LOG_WIDTH"},
207+ Destination: &dog.LogWidth,
208+ },
209+ &cli.BoolFlag{
210+ Name: "kubedog-track-all",
211+ Usage: "track almost all resources, experimental",
212+ Value: false,
213+ EnvVars: []string{"HELMWAVE_KUBEDOG_TRACK_ALL"},
214+ Destination: &dog.TrackGeneric,
215+ },
216+ }
217+}