Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/katib-controller/v1beta1/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ func main() {

ctx := signals.SetupSignalHandler()
certsReady := make(chan struct{})

defer close(certsReady)
if initConfig.CertGeneratorConfig.Enable {
if err = cert.AddToManager(mgr, initConfig.CertGeneratorConfig, certsReady); err != nil {
log.Error(err, "Failed to set up cert-generator")
}
} else {
close(certsReady)
certsReady <- struct{}{}
}

// The setupControllers will register controllers to the manager
Expand Down
3 changes: 3 additions & 0 deletions docs/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ Once the `cert-generator` finished, the Katib controller starts to register cont

You can find the `cert-generator` source code [here](../pkg/certgenerator/v1beta1).

NOTE: the Katib also supports the [cert-manager](https://cert-manager.io/) to generate certs for the admission webhooks instead of using cert-generator.
You can find the installation with the cert-manager [here](../manifests/v1beta1/installs/katib-cert-manager).

## Implement a new algorithm and use it in Katib

Please see [new-algorithm-service.md](./new-algorithm-service.md).
Expand Down
4 changes: 2 additions & 2 deletions pkg/certgenerator/v1beta1/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ func (c *CertGenerator) Start(ctx context.Context) error {
if err := c.generate(ctx); err != nil {
return err
}
// Close a certsReady means start to register controllers to the manager.
close(c.certsReady)
// Sending an empty data to a certsReady means it starts to register controllers to the manager.
c.certsReady <- struct{}{}
return nil
}

Expand Down