Kubernetes Operators by Jason Dobies

Kubernetes Operators by Jason Dobies

Author:Jason Dobies
Language: eng
Format: epub
Publisher: O'Reilly Media
Published: 2020-01-12T16:00:00+00:00


err = c.Watch(&source.Kind{Type: &appsv1.Deployment{}}, &handler.EnqueueRequestForOwner{ IsController: true, OwnerType: &examplev1.VisitorsApp{}, }) if err != nil { return err } err = c.Watch(&source.Kind{Type: &corev1.Service{}}, &handler.EnqueueRequestForOwner{ IsController: true, OwnerType: &examplev1.VisitorsApp{}, }) if err != nil { return err }

For the watches created in this snippet, there are two areas of interest:

The value for Type in the constructor indicates the child resource type that Kubernetes watches. Each child resource type needs its own watch.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.