File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import (
35
35
sambaoperatorv1alpha1 "github.com/samba-in-kubernetes/samba-operator/api/v1alpha1"
36
36
"github.com/samba-in-kubernetes/samba-operator/controllers"
37
37
"github.com/samba-in-kubernetes/samba-operator/internal/conf"
38
+ pln "github.com/samba-in-kubernetes/samba-operator/internal/planner"
38
39
// +kubebuilder:scaffold:imports
39
40
)
40
41
@@ -97,6 +98,15 @@ func main() {
97
98
}
98
99
setupLog .Info ("loaded configuration successfully" , "config" , conf .Get ())
99
100
101
+ planner := pln .New (pln.InstanceConfiguration {
102
+ GlobalConfig : conf .Get (),
103
+ }, nil )
104
+ if _ , err := planner .NodeSelector (); err != nil {
105
+ setupLog .Error (err , "invalid node selector configuration value" ,
106
+ "note" , "value must be a JSON object containing strings" )
107
+ os .Exit (1 )
108
+ }
109
+
100
110
mgr , err := ctrl .NewManager (ctrl .GetConfigOrDie (), ctrl.Options {
101
111
Scheme : scheme ,
102
112
MetricsBindAddress : metricsAddr ,
You can’t perform that action at this time.
0 commit comments