Skip to content

Commit c0eaf56

Browse files
Revert "Add Authentication bootstrap for ingress (#1153)" (#1160)
This reverts commit 0e8069a.
1 parent a9d945b commit c0eaf56

File tree

6 files changed

+49
-391
lines changed

6 files changed

+49
-391
lines changed

cmd/main.go

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ func main() {
107107
opts.BindFlags(flag.CommandLine)
108108
flag.Parse()
109109

110-
ctrlLog := zap.New(zap.UseFlagOptions(&opts))
111-
ctrl.SetLogger(ctrlLog)
110+
ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))
112111

113112
watchNamespace, err := controllercommon.GetWatchNamespace()
114113
if err != nil {
@@ -174,20 +173,9 @@ func main() {
174173
os.Exit(1)
175174
}
176175

177-
var dc *discovery.DiscoveryClient
178-
dc, err = discovery.NewDiscoveryClientForConfig(mgr.GetConfig())
179-
if err != nil {
180-
setupLog.Error(err, "failed to get discovery client", "controller", "Authentication")
181-
os.Exit(1)
182-
}
183-
184176
if err = (&bootstrapcontrollers.BootstrapReconciler{
185-
Client: &controllercommon.FallbackClient{
186-
Client: mgr.GetClient(),
187-
Reader: mgr.GetAPIReader(),
188-
},
189-
DiscoveryClient: dc,
190-
}).SetupWithManager(mgr, ctrlLog); err != nil {
177+
Client: mgr.GetClient(),
178+
}).SetupWithManager(mgr); err != nil {
191179
setupLog.Error(err, "unable to create controller", "controller", "Authentication")
192180
os.Exit(1)
193181
}
@@ -213,6 +201,13 @@ func main() {
213201
setupLog.Error(err, "unable to create controller", "controller", "Client")
214202
os.Exit(1)
215203
}
204+
var dc *discovery.DiscoveryClient
205+
dc, err = discovery.NewDiscoveryClientForConfig(mgr.GetConfig())
206+
if err != nil {
207+
setupLog.Error(err, "failed to get discovery client", "controller", "Authentication")
208+
os.Exit(1)
209+
}
210+
216211
if err = (&operatorcontrollers.AuthenticationReconciler{
217212
Client: &controllercommon.FallbackClient{
218213
Client: mgr.GetClient(),

0 commit comments

Comments
 (0)