@@ -59,7 +59,6 @@ metadata:
5959spec :
6060 package : ghcr.io/fortra/function-pythonic:v0.0.7
6161` ` `
62-
6362## Composed Resource Dependencies
6463
6564function-pythonic automatically handles dependencies between composed resources.
@@ -270,17 +269,27 @@ Each resource in the list is the following RequiredResource class:
270269The `conditions` field is a map of the resource's status conditions array, with
271270the map key being the condition type.
272271
273- | Field | Description |
274- | ----- | ----------- |
275- | Condition.type | The condtion type |
276- | Condition.status | RequiredResource.observed | Low level direct access to the observed required resource |
277- | RequiredResource.apiVersion | The required resource apiVersion |
278- | RequiredResource.kind | The required resource kind |
279- | RequiredResource.metadata | The required resource metadata |
280- | RequiredResource.spec | The required resource spec |
281- | RequiredResource.data | The required resource data |
282- | RequiredResource.status | The required resource status |
283- | RequiredResource.conditions | The required resource conditions |
272+ | Field | Type | Description |
273+ | ----- | ---- | ----------- |
274+ | Condition.type | String | The condtion type, or name |
275+ | Condition.status | Boolean | The condition status |
276+ | Condition.reason | String | PascalCase, machine-readable reason for this condition |
277+ | Condition.message | String | Human-readable details about the condition |
278+ | Condition.claim | Boolean | Also pply the condition the claim |
279+
280+ # ## Events
281+
282+ The `events` field is a list of events to apply to the Composite and
283+ optionally to the Claim.
284+
285+ | Field | Type | Description |
286+ | ----- | ---- | ----------- |
287+ | Event.info | Boolean | Normal informational event |
288+ | Event.warning | Boolean | Warning level event |
289+ | Event.fatal | Boolean | Fatal events also terminate composing the Composite |
290+ | Event.reason | String | PascalCase, machine-readable reason for this event |
291+ | Event.message | String | Human-readable details about the event |
292+ | Event.claim | Boolean | Also apply the event to the claim |
284293
285294# # Single use Composites
286295
@@ -301,6 +310,85 @@ spec:
301310 self.status.composite = 'Hello, World!'
302311` ` `
303312
313+ # # Quick Start Development
314+
315+ The following example demonstrates how to locally render function-python
316+ compositions. First, install the `crossplane-function-pythonic` python
317+ package into the python environment :
318+ ` ` ` shell
319+ $ pip install crossplane-function-pythonic
320+ ` ` `
321+ Then create the following files :
322+ # ### xr.yaml
323+ ` ` ` yaml
324+ apiVersion: pythonic.fortra.com/v1alpha1
325+ kind: Hello
326+ metadata:
327+ name: world
328+ spec:
329+ who: World
330+ ` ` `
331+ # ### composition.yaml
332+ ` ` ` yaml
333+ apiVersion: apiextensions.crossplane.io/v1
334+ kind: Composition
335+ metadata:
336+ name: hellos.pythonic.fortra.com
337+ spec:
338+ compositeTypeRef:
339+ apiVersion: pythonic.fortra.com/v1alpha1
340+ kind: Hello
341+ mode: Pipeline
342+ pipeline:
343+ - step: pythonic
344+ functionRef:
345+ name: function-pythonic
346+ input:
347+ apiVersion: pythonic.fn.fortra.com/v1alpha1
348+ kind: Composite
349+ composite: |
350+ class Composite(BaseComposite):
351+ def compose(self):
352+ self.status.greeting = f"Hello, {self.spec.who}!"
353+ ` ` `
354+ # ### functions.yaml
355+ ` ` ` yaml
356+ apiVersion: pkg.crossplane.io/v1beta1
357+ kind: Function
358+ metadata:
359+ name: function-pythonic
360+ annotations:
361+ render.crossplane.io/runtime: Development
362+ spec:
363+ package: ghcr.io/fortra/function-pythonic:v0.0.7
364+ ` ` `
365+ In one terminal session, run function-pythonic :
366+ ` ` ` shell
367+ $ function-pythonic --insecure --debug
368+ [2025-08-21 15:32:37.966] grpc._cython.cygrpc [DEBUG ] Using AsyncIOEngine.POLLER as I/O engine
369+ ` ` `
370+ In other terminal session, render the Composite :
371+ ` ` ` shell
372+ $ crossplane render xr.yaml composition.yaml functions.yaml
373+ ---
374+ apiVersion: pythonic.fortra.com/v1alpha1
375+ kind: Hello
376+ metadata:
377+ name: world
378+ status:
379+ conditions:
380+ - lastTransitionTime: "2024-01-01T00:00:00Z"
381+ reason: Available
382+ status: "True"
383+ type: Ready
384+ - lastTransitionTime: "2024-01-01T00:00:00Z"
385+ message: All resources are composed
386+ reason: AllComposed
387+ status: "True"
388+ type: ResourcesComposed
389+ greeting: Hello, World!
390+ ` ` `
391+
304392# # ConfigMap Packages
305393
306394ConfigMap based python packages are enable using the `--packages` and
0 commit comments