Documentation ¶
Index ¶
- Constants
- func AreAllDependenciesResolved(sensor *v1alpha1.Sensor) bool
- func GetNodeByName(sensor *v1alpha1.Sensor, nodeName string) *v1alpha1.NodeStatus
- func InitializeNode(sensor *v1alpha1.Sensor, nodeName string, nodeType v1alpha1.NodeType, ...) *v1alpha1.NodeStatus
- func IsDependencyResolved(sensor *v1alpha1.Sensor, nodeName string) bool
- func MarkNodePhase(sensor *v1alpha1.Sensor, nodeName string, nodeType v1alpha1.NodeType, ...) *v1alpha1.NodeStatus
- func MarkResolvedAt(sensor *v1alpha1.Sensor, nodeName string) *v1alpha1.NodeStatus
- func MarkUpdatedAt(sensor *v1alpha1.Sensor, nodeName string) *v1alpha1.NodeStatus
- func PersistUpdates(client sensorclientset.Interface, sensorObj *v1alpha1.Sensor, ...) (*v1alpha1.Sensor, error)
- func ValidateSensor(s *v1alpha1.Sensor) error
- type Controller
- type ControllerConfig
Constants ¶
const ( //LabelControllerInstanceID is the label which allows to separate application among multiple running controllers. LabelControllerInstanceID = sensor.FullName + "/sensor-controller-instanceid" // LabelPhase is a label applied to sensors to indicate the current phase of the sensor (for filtering purposes) LabelPhase = sensor.FullName + "/phase" // LabelComplete is the label to mark sensors as complete LabelComplete = sensor.FullName + "/complete" )
Labels
Variables ¶
This section is empty.
Functions ¶
func AreAllDependenciesResolved ¶ added in v0.13.0
AreAllDependenciesResolved checks whether all event dependencies are resolved
func GetNodeByName ¶
func GetNodeByName(sensor *v1alpha1.Sensor, nodeName string) *v1alpha1.NodeStatus
GetNodeByName returns a copy of the node from this sensor for the nodename for events this node name should be the name of the event
func InitializeNode ¶
func InitializeNode(sensor *v1alpha1.Sensor, nodeName string, nodeType v1alpha1.NodeType, logger *logrus.Logger) *v1alpha1.NodeStatus
create a new node
func IsDependencyResolved ¶ added in v0.13.0
IsDependencyResolved checks whether a dependency is resolved.
func MarkNodePhase ¶
func MarkNodePhase(sensor *v1alpha1.Sensor, nodeName string, nodeType v1alpha1.NodeType, phase v1alpha1.NodePhase, event *v1alpha1.Event, logger *logrus.Logger, message string) *v1alpha1.NodeStatus
MarkNodePhase marks the node with a phase, returns the node
func MarkResolvedAt ¶ added in v0.13.0
func MarkResolvedAt(sensor *v1alpha1.Sensor, nodeName string) *v1alpha1.NodeStatus
func MarkUpdatedAt ¶ added in v0.13.0
func MarkUpdatedAt(sensor *v1alpha1.Sensor, nodeName string) *v1alpha1.NodeStatus
func PersistUpdates ¶
func PersistUpdates(client sensorclientset.Interface, sensorObj *v1alpha1.Sensor, log *logrus.Logger) (*v1alpha1.Sensor, error)
PersistUpdates persists the updates to the Sensor resource
func ValidateSensor ¶
ValidateSensor accepts a sensor and performs validation against it we return an error so that it can be logged as a message on the sensor status the error is ignored by the operation context as subsequent re-queues would produce the same error. Exporting this function so that external APIs can use this to validate sensor resource.
Types ¶
type Controller ¶ added in v0.13.0
type Controller struct { // ConfigMap is the name of the config map in which to derive configuration of the controller ConfigMap string // Namespace for controller Namespace string // Config is the controller'sensor configuration Config ControllerConfig // TemplateSpec is the default Sensor pod template spec TemplateSpec *corev1.PodTemplateSpec // contains filtered or unexported fields }
Controller listens for new sensors and hands off handling of each sensor on the queue to the operator
func NewController ¶ added in v0.13.0
func NewController(rest *rest.Config, configMap, namespace, sensorImage string) *Controller
NewController creates a new Controller
func (*Controller) ResyncConfig ¶ added in v0.13.0
func (controller *Controller) ResyncConfig(namespace string) error
ResyncConfig reloads the controller config from the configmap
type ControllerConfig ¶ added in v0.13.0
type ControllerConfig struct { // InstanceID is a label selector to limit the controller'sensor watch of sensor jobs to a specific instance. // If omitted, the controller watches sensors that *are not* labeled with an instance id. InstanceID string // Namespace is a label selector filter to limit controller'sensor watch to specific namespace Namespace string }
ControllerConfig contain the configuration settings for the controller