@@ -8,7 +8,6 @@ example is doing:
88
99* Create an MR named 'vpc' with apiVersion 'ec2.aws.crossplane.io/v1beta1' and kind 'VPC'
1010* Set the vpc region and cidr from the XR spec values
11- * Return if the vpc's vpcId is not yet assigned to it
1211* Set the XR status.vpcId to the created vpc id
1312
1413``` yaml
@@ -37,27 +36,12 @@ spec:
3736 self.status.vpcId = vpc.status.atProvider.vpcId
3837` ` `
3938
40- ## Single use Composites
41-
42- function-pythonic configures a ` Composite` CompositeResourceDefinition that enables
43- single purpose Composites. A common use case is a one time initialization task.
44- ` ` ` yaml
45- apiVersion: pythonic.fortra.com/v1alpha1
46- kind: Composite
47- metadata:
48- name: composite-example
49- spec:
50- composite: |
51- class Composite(BaseComposite):
52- def compose(self):
53- self.status.composite = 'Hello, World!'
54- ` ` `
55-
5639## Examples
5740
58- In the [examples](./examples) directory are most of the function-go-templating examples
59- implemented using function-pythonic. In addition, the [eks-cluster](./examples/eks-cluster/composition.yaml)
60- example is a complex example composing many resources.
41+ In the [examples](./examples) directory are many exemples, including all of the
42+ function-go-templating examples implemented using function-pythonic.
43+ The [eks-cluster](./examples/eks-cluster/composition.yaml) example is a good
44+ complex example creating the entire vpc structure needed for an EKS cluster.
6145
6246## Managed Resource Dependencies
6347
@@ -253,6 +237,25 @@ Each resource in the list is the following RequiredResource class:
253237| RequiredResource.status | The required resource status |
254238| RequiredResource.conditions | The required resource conditions |
255239
240+ ## Single use Composites
241+
242+ Tired of creating a CompositeResourceDefinition, a Composition, and a Composite
243+ just to run that Composition once in a single use or initialize task?
244+
245+ function-pythonic installs a ` Composite ` CompositeResourceDefinition that enables
246+ creating such tasks using a single Composite resource:
247+ ``` yaml
248+ apiVersion : pythonic.fortra.com/v1alpha1
249+ kind : Composite
250+ metadata :
251+ name : composite-example
252+ spec :
253+ composite : |
254+ class Composite(BaseComposite):
255+ def compose(self):
256+ self.status.composite = 'Hello, World!'
257+ ` ` `
258+
256259## Installing Python Packages
257260
258261function-pythonic supports a ` --pip-install` command line option which will run pip install
0 commit comments