command
module
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Feb 28, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 12
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
function-cel-filter

A composition function that filters matching composed
resources using CEL expressions.
Each filter:
- Matches composed resources by name using a regular expression.
- Specifies whether resources should be included using a CEL expression.
If a filter's CEL expression evaluates to true, Crossplane creates the matching
composed resources.
Filters only apply to matching composed resources. The function doesn't filter
composed resources that don't match a filter.
apiVersion: apiextensions.crossplane.io/v1
kind: Composition
metadata:
name: function-template-go
spec:
compositeTypeRef:
apiVersion: example.crossplane.io/v1
kind: NoSQL
mode: Pipeline
pipeline:
- step: patch-and-transform
functionRef:
name: function-patch-and-transform
input:
apiVersion: pt.fn.crossplane.io/v1beta1
kind: Resources
resources:
- name: table
base:
apiVersion: dynamodb.aws.upbound.io/v1beta1
kind: Table
metadata:
name: crossplane-quickstart-database
spec:
forProvider:
region: "us-east-2"
writeCapacity: 1
readCapacity: 1
attribute:
- name: S3ID
type: S
hashKey: S3ID
- name: bucket
base:
apiVersion: s3.aws.upbound.io/v1beta1
kind: Bucket
spec:
forProvider:
region: us-east-2
- step: filter-composed-resources
functionRef:
name: function-cel-filter
input:
apiVersion: cel.fn.crossplane.io/v1beta1
kind: Filters
filters:
# Only create the bucket if the XR's spec.export field is set to "S3".
- name: bucket
expression: observed.composite.resource.spec.export == "S3"
Documentation
¶
Package main implements a Composition Function.
Source Files
¶
Directories
¶
input
|
|
v1beta1
Package v1beta1 contains the input type for this Function +kubebuilder:object:generate=true +groupName=cel.fn.crossplane.io +versionName=v1beta1
|
Package v1beta1 contains the input type for this Function +kubebuilder:object:generate=true +groupName=cel.fn.crossplane.io +versionName=v1beta1 |
Click to show internal directories.
Click to hide internal directories.