Skip to content

upbound/function-event-filter

Repository files navigation

function-event-filter

CI Slack

A Crossplane function that can be used in a function pipeline to gate further progress within the pipeline based on supplied Event details.

Example usage

apiVersion: ops.crossplane.io/v1alpha1
kind: WatchOperation
metadata:
  name: analyze-events
spec:
  watch:
    apiVersion: v1
    kind: Event
    namespace: crossplane-system
  concurrencyPolicy: Forbid
  successfulHistoryLimit: 2
  failedHistoryLimit: 1
  operationTemplate:
    spec:
      mode: Pipeline
      pipeline:
      # Filter events to only pass those of type "Warning".
      - step: filter-noisy-events
        functionRef:
          name: function-event-filter
        input:
          apiVersion: filter.event.fn.upbound.io/v1alpha1
          kind: Input
          type: Warning

Development

This template uses Go, Docker, and the [Crossplane CLI][cli] to build functions.

# Run code generation - see input/generate.go
$ go generate ./...

# Run tests - see fn_test.go
$ go test ./...

# Build the function's runtime image - see Dockerfile
$ docker build . --tag=runtime

# Build a function package - see package/crossplane.yaml
$ crossplane xpkg build -f package --embed-runtime-image=runtime

About

function-event-filter works in conjunction with Crossplane Operations to help filter events

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published