Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add ComponentConfig helper alias #1243

Closed
christopherhein opened this issue Nov 3, 2020 · 3 comments · Fixed by #1244
Closed

Add ComponentConfig helper alias #1243

christopherhein opened this issue Nov 3, 2020 · 3 comments · Fixed by #1244
Assignees

Comments

@christopherhein
Copy link
Member

When implementing kubernetes-sigs/kubebuilder#722 I'm noticing that it would help to reduce the amount of dependencies that need to be imported to mutate main.go to support scaffolding.

// alias.go

import (
         // ... other imports
	cfg "sigs.k8s.io/controller-runtime/pkg/config"
)

var (
         // ... other aliases

  	// ConfigFile returns the cfg.File function for deferred config file loading,
	// this is passed into Options{}.From() to populate the Options fields for
	// the manager.
	ConfigFile = cfg.File
)

Ref #895

@christopherhein
Copy link
Member Author

/cc @vincepri

@christopherhein
Copy link
Member Author

/assign

@vincepri
Copy link
Member

vincepri commented Nov 4, 2020

+1 having the helper, seems it could be useful to reduce the amount of imports

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants