kubebb / core

A declarative component lifecycle management platform
https://kubebb.github.io/website
Apache License 2.0
8 stars 9 forks source link

@bjwswang Should an Event be output here? #205

Closed bjwswang closed 1 year ago

bjwswang commented 1 year ago
          @bjwswang Should an Event be output here?

I think the definition of IWatcher should be modified.

type IWatcher interface {
    Start() error
        ...
}

When the startup fails, an error is returned, and the error is fed back to the event of the resource.

How to create an event, refer to the following code. https://github.com/kubebb/core/blob/542ef80fde088f929800bcc15eb8ff7b695a4fb0/controllers/repository_controller.go#L178

_Originally posted by @0xff-dev in https://github.com/kubebb/core/pull/199#discussion_r1282037555_