Skip to content

Commit ec2b8e8

Browse files
committed
Start waiting for certs to be ready before sending data to the channel (kubeflow#2209)
Start waiting for certs to be ready before sending data to the channel Signed-off-by: Yuki Iwai <[email protected]>
1 parent bc5add9 commit ec2b8e8

File tree

1 file changed

+5
-4
lines changed
  • cmd/katib-controller/v1beta1

1 file changed

+5
-4
lines changed

cmd/katib-controller/v1beta1/main.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ func main() {
136136
ctx := signals.SetupSignalHandler()
137137
certsReady := make(chan struct{})
138138
defer close(certsReady)
139+
140+
// The setupControllers will register controllers to the manager
141+
// after generated certs for the admission webhooks.
142+
go setupControllers(mgr, certsReady, hookServer)
143+
139144
if initConfig.CertGeneratorConfig.Enable {
140145
if err = cert.AddToManager(mgr, initConfig.CertGeneratorConfig, certsReady); err != nil {
141146
log.Error(err, "Failed to set up cert-generator")
@@ -144,10 +149,6 @@ func main() {
144149
certsReady <- struct{}{}
145150
}
146151

147-
// The setupControllers will register controllers to the manager
148-
// after generated certs for the admission webhooks.
149-
go setupControllers(mgr, certsReady, hookServer)
150-
151152
log.Info("Setting up health checker.")
152153
if err := mgr.AddReadyzCheck("readyz", hookServer.StartedChecker()); err != nil {
153154
log.Error(err, "Unable to add readyz endpoint to the manager")

0 commit comments

Comments
 (0)