Skip to content

Commit 8752653

Browse files
authored
Merge pull request #99 from ntnn/file-scheme
✨ Add file.Options.ClusterOptions
2 parents 3c7ca1f + 49f3dfb commit 8752653

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

providers/file/clusters.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func (p *Provider) fromContexts(kubeCtxs map[string]*rest.Config) map[string]clu
119119
c := make(map[string]cluster.Cluster, len(kubeCtxs))
120120

121121
for name, kubeCtx := range kubeCtxs {
122-
cl, err := cluster.New(kubeCtx)
122+
cl, err := cluster.New(kubeCtx, p.opts.ClusterOptions...)
123123
if err != nil {
124124
p.log.Error(err, "failed to create cluster", "context", name)
125125
continue

providers/file/provider.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ type Options struct {
6565
// "my-context" would result in a cluster name
6666
// "/a/b/c/kubeconfig.yaml+my-context".
6767
Separator string
68+
69+
// ClusterOptions is the list of options to pass to the cluster object.
70+
ClusterOptions []cluster.Option
6871
}
6972

7073
// DefaultKubeconfigGlobs are the default glob patterns when searching

0 commit comments

Comments
 (0)