What problem are you facing?
As a user I expect function-kro to be able to access the pipeline context.
I see two gaps:
-
Reading context in templates.
Users who place function-kro after function-environment-configs (or any function that populates a context) cannot reference those values in their resource templates, includeWhen, readyWhen, or forEach expressions. They must instead copy environment data into the XR spec/status via an earlier function, creating unnecessary coupling.
-
Writing context for downstream functions.
function-kro may resolves values that downstream pipeline functions could use.
There is no mechanism to publish those values back to the context.
How could this Function help solve your problem?
Reading from context could look like the following snippet:
resources:
- id: bucket
template:
apiVersion: s3.aws.m.upbound.io/v1beta1
kind: Bucket
spec:
forProvider:
region: ${context["apiextensions.crossplane.io/environment"].region}
- id: logging
includeWhen:
- ${context["foo/bar"].enableLogging == true}
template: [...]
Writing to the context could look like a context field in the ResourceGraph spec:
apiVersion: kro.fn.crossplane.io/v1beta1
kind: ResourceGraph
context:
"foo/bar":
bucketArn: ${bucket.status.atProvider.arn}
resources:
- id: bucket
What problem are you facing?
As a user I expect
function-kroto be able to access the pipeline context.I see two gaps:
Reading context in templates.
Users who place
function-kroafter function-environment-configs (or any function that populates a context) cannot reference those values in their resource templates, includeWhen, readyWhen, or forEach expressions. They must instead copy environment data into the XR spec/status via an earlier function, creating unnecessary coupling.Writing context for downstream functions.
function-kromay resolves values that downstream pipeline functions could use.There is no mechanism to publish those values back to the context.
How could this Function help solve your problem?
Reading from context could look like the following snippet:
Writing to the context could look like a
contextfield in the ResourceGraph spec: