@@ -214,6 +214,7 @@ The BaseComposite also provides access to the following Crossplane Function leve
214214| self.request | Message | Low level direct access to the RunFunctionRequest message |
215215| self.response | Message | Low level direct access to the RunFunctionResponse message |
216216| self.logger | Logger | Python logger to log messages to the running function stdout |
217+ | self.parameters | Map | The configured step parameters |
217218| self.ttl | Integer | Get or set the response TTL, in seconds |
218219| self.credentials | Credentials | The request credentials |
219220| self.context | Map | The response context, initialized from the request context |
@@ -552,6 +553,41 @@ Secrets can also be used in an identical manner as ConfigMaps by enabling the
552553` --packages-secrets` command line option. Secrets permissions need to be
553554added to the above RBAC configuration.
554555
556+ # # Step Parameters
557+
558+ Step specific parameters can be configured to be used by the composite
559+ implementation. This is useful when setting the composite to the python class.
560+ For example :
561+ ` ` ` yaml
562+ apiVersion: v1
563+ kind: ConfigMap
564+ metadata:
565+ namespace: crossplane-system
566+ name: example-pythonic
567+ labels:
568+ function-pythonic.package: example.pythonic
569+ data:
570+ features.py: |
571+ from crossplane.pythonic import BaseComposite
572+ class GreetingComposite(BaseComposite):
573+ def compose(self):
574+ cm = self.resources.ConfigMap('v1', 'ConfigMap')
575+ cm.data.greeting = f"Hello, {self.parameters.who}!"
576+ ` ` `
577+ ` ` ` yaml
578+ ...
579+ - step: pythonic
580+ functionRef:
581+ name: function-pythonic
582+ input:
583+ apiVersion: pythonic.fn.fortra.com/v1alpha1
584+ kind: Composite
585+ parameters:
586+ who: World
587+ composite: example.pythonic.features.GreetingComposite
588+ ...
589+ ` ` `
590+
555591# # Filing System Packages
556592
557593Composition Composite implementations can be coded in a stand alone python files
0 commit comments