@@ -24,20 +24,24 @@ import (
24
24
"k8s.io/apimachinery/pkg/runtime"
25
25
"k8s.io/apimachinery/pkg/runtime/serializer"
26
26
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
28
28
)
29
29
30
30
// ControllerManagerConfiguration defines the functions necessary to parse a config file
31
31
// 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.
32
34
type ControllerManagerConfiguration interface {
33
35
runtime.Object
34
36
35
37
// Complete returns the versioned configuration
36
- Complete () (v1alpha1.ControllerManagerConfigurationSpec , error )
38
+ Complete () (v1alpha1.ControllerManagerConfigurationSpec , error ) //nolint:staticcheck
37
39
}
38
40
39
41
// DeferredFileLoader is used to configure the decoder for loading controller
40
42
// runtime component config types.
43
+ //
44
+ // Deprecated: This package has been deprecated and will be removed in a future release.
41
45
type DeferredFileLoader struct {
42
46
ControllerManagerConfiguration
43
47
path string
@@ -52,6 +56,8 @@ type DeferredFileLoader struct {
52
56
// Defaults:
53
57
// * Path: "./config.yaml"
54
58
// * Kind: GenericControllerManagerConfiguration
59
+ //
60
+ // Deprecated: This package has been deprecated and will be removed in a future release.
55
61
func File () * DeferredFileLoader {
56
62
scheme := runtime .NewScheme ()
57
63
utilruntime .Must (v1alpha1 .AddToScheme (scheme ))
@@ -63,6 +69,8 @@ func File() *DeferredFileLoader {
63
69
}
64
70
65
71
// 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.
66
74
func (d * DeferredFileLoader ) Complete () (v1alpha1.ControllerManagerConfigurationSpec , error ) {
67
75
d .once .Do (d .loadFile )
68
76
if d .err != nil {
@@ -71,25 +79,33 @@ func (d *DeferredFileLoader) Complete() (v1alpha1.ControllerManagerConfiguration
71
79
return d .ControllerManagerConfiguration .Complete ()
72
80
}
73
81
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.
75
85
func (d * DeferredFileLoader ) AtPath (path string ) * DeferredFileLoader {
76
86
d .path = path
77
87
return d
78
88
}
79
89
80
90
// 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.
81
93
func (d * DeferredFileLoader ) OfKind (obj ControllerManagerConfiguration ) * DeferredFileLoader {
82
94
d .ControllerManagerConfiguration = obj
83
95
return d
84
96
}
85
97
86
98
// 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.
87
101
func (d * DeferredFileLoader ) InjectScheme (scheme * runtime.Scheme ) error {
88
102
d .scheme = scheme
89
103
return nil
90
104
}
91
105
92
106
// 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.
93
109
func (d * DeferredFileLoader ) loadFile () {
94
110
if d .scheme == nil {
95
111
d .err = fmt .Errorf ("scheme not supplied to controller configuration loader" )
0 commit comments