@@ -24,20 +24,24 @@ import (
2424 "k8s.io/apimachinery/pkg/runtime"
2525 "k8s.io/apimachinery/pkg/runtime/serializer"
2626 utilruntime "k8s.io/apimachinery/pkg/util/runtime"
27- "sigs.k8s.io/controller-runtime/pkg/config/v1alpha1"
27+ "sigs.k8s.io/controller-runtime/pkg/config/v1alpha1" //nolint:staticcheck
2828)
2929
3030// ControllerManagerConfiguration defines the functions necessary to parse a config file
3131// and to configure the Options struct for the ctrl.Manager.
32+ //
33+ // Deprecated: This package has been deprecated and will be removed in a future release.
3234type ControllerManagerConfiguration interface {
3335 runtime.Object
3436
3537 // Complete returns the versioned configuration
36- Complete () (v1alpha1.ControllerManagerConfigurationSpec , error )
38+ Complete () (v1alpha1.ControllerManagerConfigurationSpec , error ) //nolint:staticcheck
3739}
3840
3941// DeferredFileLoader is used to configure the decoder for loading controller
4042// runtime component config types.
43+ //
44+ // Deprecated: This package has been deprecated and will be removed in a future release.
4145type DeferredFileLoader struct {
4246 ControllerManagerConfiguration
4347 path string
@@ -52,6 +56,8 @@ type DeferredFileLoader struct {
5256// Defaults:
5357// * Path: "./config.yaml"
5458// * Kind: GenericControllerManagerConfiguration
59+ //
60+ // Deprecated: This package has been deprecated and will be removed in a future release.
5561func File () * DeferredFileLoader {
5662 scheme := runtime .NewScheme ()
5763 utilruntime .Must (v1alpha1 .AddToScheme (scheme ))
@@ -63,6 +69,8 @@ func File() *DeferredFileLoader {
6369}
6470
6571// Complete will use sync.Once to set the scheme.
72+ //
73+ // Deprecated: This package has been deprecated and will be removed in a future release.
6674func (d * DeferredFileLoader ) Complete () (v1alpha1.ControllerManagerConfigurationSpec , error ) {
6775 d .once .Do (d .loadFile )
6876 if d .err != nil {
@@ -71,25 +79,33 @@ func (d *DeferredFileLoader) Complete() (v1alpha1.ControllerManagerConfiguration
7179 return d .ControllerManagerConfiguration .Complete ()
7280}
7381
74- // AtPath will set the path to load the file for the decoder.
82+ // AtPath will set the path to load the file for the decoder
83+ //
84+ // Deprecated: This package has been deprecated and will be removed in a future release.
7585func (d * DeferredFileLoader ) AtPath (path string ) * DeferredFileLoader {
7686 d .path = path
7787 return d
7888}
7989
8090// OfKind will set the type to be used for decoding the file into.
91+ //
92+ // Deprecated: This package has been deprecated and will be removed in a future release.
8193func (d * DeferredFileLoader ) OfKind (obj ControllerManagerConfiguration ) * DeferredFileLoader {
8294 d .ControllerManagerConfiguration = obj
8395 return d
8496}
8597
8698// InjectScheme will configure the scheme to be used for decoding the file.
99+ //
100+ // Deprecated: This package has been deprecated and will be removed in a future release.
87101func (d * DeferredFileLoader ) InjectScheme (scheme * runtime.Scheme ) error {
88102 d .scheme = scheme
89103 return nil
90104}
91105
92106// loadFile is used from the mutex.Once to load the file.
107+ //
108+ // Deprecated: This package has been deprecated and will be removed in a future release.
93109func (d * DeferredFileLoader ) loadFile () {
94110 if d .scheme == nil {
95111 d .err = fmt .Errorf ("scheme not supplied to controller configuration loader" )
0 commit comments