Skip to content
Watching Child Resources

Watching Child Resources

A resource’s internal/controllers/<version>/<kind>/controller.go is generated once and never rewritten, so it is yours to edit. It watches only the resource itself: a child resource your steps create is noticed at the next SUCCESS_CHECK_INTERVAL at the earliest. To react sooner, add Owns(&corev1.Secret{}) (or Watches(...)) in SetupWithManager; a commented example is in the file. The generation/annotation predicate is attached to the primary watch only, so it does not filter your child watches. See the Owns documentation.