changes to resources and take action on them This command assists in building scripted reactions to changes that occur in Kubernetes or OpenShift resources. This is frequently referred to as a 'controller' in Kubernetes and acts to ensure particular conditions are maintained. On startup, observe will list all of the resources of a particular type and execute the provided script on each one. Observe watches the server for changes, and will reexecute the script for each update. Observe works best for problems of the form "for every resource X, make sure Y is true". Some examples of ways observe can be used include: * Ensure every namespace has a quota or limit range object * Ensure every service is registered in DNS by making calls to a DNS API * Send an email alert whenever a node reports 'NotReady' * Watch for the 'FailedScheduling' event and write an IRC message * Dynamically provision persistent volumes when a new PVC is created * Delete pods that have reached successful completion after a period of time. The simplest pattern is maintaining an invariant on an object - for instance, "every namespace should have an annotation that indicates its owner". If the object is deleted no reaction is necessary. A variation on that pattern is creating another object: "every namespace should have a quota object based on the resources allowed for an owner". $ cat set_owner.sh #!/bin/sh