Skip to content

Shutdown manager if webhook & metrics server cert-watchers fail #3413

@sbueringer

Description

@sbueringer

Just recently noticed that the webhook & metrics server are starting certWatchers like this

		go func() {
			if err := certWatcher.Start(ctx); err != nil {
				log.Error(err, "certificate watcher error")
			}
		}()

If the cert-watcher is failing we only log this error and that's it. As soon as the certs are rotated again the servers will use outdated certificates.
If this is somehow covered by a livenessProbe the manager will restart otherwise it won't.

I think we should look into how we can shutdown the manager / restart the binary if one of these cert-watchers fail.

One option might be to ensure the Start func of the servers return an error when the cert-watcher fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions