Skip to content

Commit af24f3b

Browse files
authored
Merge pull request kubernetes-sigs#1244 from christopherhein/chore/alias-forconfigfile
✨ ComponentConfig alias for cfg.File()
2 parents 582b82e + 94c570c commit af24f3b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

alias.go

+6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"k8s.io/apimachinery/pkg/runtime/schema"
2222
"sigs.k8s.io/controller-runtime/pkg/builder"
2323
"sigs.k8s.io/controller-runtime/pkg/client/config"
24+
cfg "sigs.k8s.io/controller-runtime/pkg/config"
2425
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
2526
"sigs.k8s.io/controller-runtime/pkg/log"
2627
"sigs.k8s.io/controller-runtime/pkg/manager"
@@ -91,6 +92,11 @@ var (
9192
// * $HOME/.kube/config if exists
9293
GetConfig = config.GetConfig
9394

95+
// ConfigFile returns the cfg.File function for deferred config file loading,
96+
// this is passed into Options{}.From() to populate the Options fields for
97+
// the manager.
98+
ConfigFile = cfg.File
99+
94100
// NewControllerManagedBy returns a new controller builder that will be started by the provided Manager
95101
NewControllerManagedBy = builder.ControllerManagedBy
96102

0 commit comments

Comments
 (0)