1
0
mirror of synced 2026-02-06 19:05:55 +00:00

Fix dry-run still loading kubeconfig issue

If this is implemented, it will not assume that access to a kubeconfig
is guaranteed even if just for retrieving configured namespace.

Signed-off-by: Soule BA <soule@weave.works>
This commit is contained in:
Soule BA
2022-12-17 00:29:10 +01:00
parent 49eb1c5444
commit 2c1085d9ce
6 changed files with 28 additions and 10 deletions

View File

@@ -139,6 +139,14 @@ func WithClientConfig(rcg *genericclioptions.ConfigFlags, clientOpts *runclient.
}
}
// WithNamespace sets the namespace
func WithNamespace(namespace string) BuilderOptionFunc {
return func(b *Builder) error {
b.namespace = namespace
return nil
}
}
// WithDryRun sets the dry-run flag
func WithDryRun(dryRun bool) BuilderOptionFunc {
return func(b *Builder) error {