crossplane-function-pythonic 0.1.2__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/PKG-INFO +42 -6
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/README.md +41 -5
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/crossplane/pythonic/composite.py +36 -38
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/crossplane/pythonic/function.py +9 -8
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/crossplane/pythonic/protobuf.py +17 -9
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/.dev/functions.yaml +1 -1
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/aks-cluster/cluster-function-pythonic.yaml +1 -1
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/aks-cluster/functions.yaml +1 -1
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/eks-cluster/functions.yaml +1 -1
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/filing-system/function.yaml +1 -1
- {crossplane_function_pythonic-0.1.2/examples/function-go-templating/context → crossplane_function_pythonic-0.1.4/examples/function-go-templating/conditions}/functions.yaml +1 -1
- {crossplane_function_pythonic-0.1.2/examples/function-go-templating/conditions → crossplane_function_pythonic-0.1.4/examples/function-go-templating/context}/functions.yaml +1 -1
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/extra-resources/functions.yaml +1 -1
- {crossplane_function_pythonic-0.1.2/examples/function-go-templating/functions/getComposedResource → crossplane_function_pythonic-0.1.4/examples/function-go-templating/functions/fromYaml}/functions.yaml +1 -1
- {crossplane_function_pythonic-0.1.2/examples/function-go-templating/functions/getCompositeResource → crossplane_function_pythonic-0.1.4/examples/function-go-templating/functions/getComposedResource}/functions.yaml +1 -1
- {crossplane_function_pythonic-0.1.2/examples/function-go-templating/functions/fromYaml → crossplane_function_pythonic-0.1.4/examples/function-go-templating/functions/getCompositeResource}/functions.yaml +1 -1
- crossplane_function_pythonic-0.1.4/examples/function-go-templating/functions/getResourceCondition/functions.yaml +9 -0
- crossplane_function_pythonic-0.1.4/examples/function-go-templating/functions/include/functions.yaml +9 -0
- crossplane_function_pythonic-0.1.4/examples/function-go-templating/functions/toYaml/functions.yaml +9 -0
- crossplane_function_pythonic-0.1.4/examples/function-go-templating/inline/functions.yaml +9 -0
- crossplane_function_pythonic-0.1.4/examples/function-go-templating/recursive/functions.yaml +9 -0
- {crossplane_function_pythonic-0.1.2/examples/single-purpose → crossplane_function_pythonic-0.1.4/examples/get-started-app}/functions.yaml +1 -1
- {crossplane_function_pythonic-0.1.2/examples/get-started-app → crossplane_function_pythonic-0.1.4/examples/helm-copy-secret}/functions.yaml +1 -1
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/import-existing-vpc/composition.yaml +1 -6
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/import-existing-vpc/functions.yaml +1 -1
- {crossplane_function_pythonic-0.1.2/examples/helm-copy-secret → crossplane_function_pythonic-0.1.4/examples/single-purpose}/functions.yaml +1 -1
- crossplane_function_pythonic-0.1.4/examples/usages-extra/functions.yaml +9 -0
- crossplane_function_pythonic-0.1.2/examples/function-go-templating/functions/getResourceCondition/functions.yaml +0 -9
- crossplane_function_pythonic-0.1.2/examples/function-go-templating/functions/include/functions.yaml +0 -9
- crossplane_function_pythonic-0.1.2/examples/function-go-templating/functions/toYaml/functions.yaml +0 -9
- crossplane_function_pythonic-0.1.2/examples/function-go-templating/inline/functions.yaml +0 -9
- crossplane_function_pythonic-0.1.2/examples/function-go-templating/recursive/functions.yaml +0 -9
- crossplane_function_pythonic-0.1.2/examples/usages-extra/functions.yaml +0 -9
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/.gitignore +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/LICENSE +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/crossplane/pythonic/__init__.py +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/crossplane/pythonic/main.py +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/crossplane/pythonic/packages.py +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/aks-cluster/README.md +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/aks-cluster/aks/kubernetescluster.py +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/aks-cluster/aks/resourcegroup.py +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/aks-cluster/composition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/aks-cluster/definition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/aks-cluster/install.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/aks-cluster/kustomization.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/aks-cluster/providers.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/aks-cluster/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/aks-cluster/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/eks-cluster/composition-v2.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/eks-cluster/composition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/eks-cluster/definition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/eks-cluster/render-v2.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/eks-cluster/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/eks-cluster/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/filing-system/README.md +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/filing-system/composition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/filing-system/definition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/filing-system/kustomization.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/filing-system/runtime.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/filing-system/vcluster.py +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/filing-system/vcluster.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/conditions/composition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/conditions/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/conditions/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/conditions/xrd.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/context/composition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/context/environmentConfigs.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/context/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/context/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/context/xrd.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/extra-resources/composition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/extra-resources/extraResources.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/extra-resources/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/extra-resources/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/fromYaml/composition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/fromYaml/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/fromYaml/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/getComposedResource/composition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/getComposedResource/observed.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/getComposedResource/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/getComposedResource/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/getCompositeResource/composition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/getCompositeResource/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/getCompositeResource/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/getResourceCondition/composition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/getResourceCondition/observed.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/getResourceCondition/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/getResourceCondition/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/include/composition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/include/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/include/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/toYaml/composition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/toYaml/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/functions/toYaml/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/inline/composition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/inline/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/inline/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/recursive/composition-real.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/recursive/composition-wrapper.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/recursive/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/function-go-templating/recursive/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/get-started-app/composition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/get-started-app/definition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/get-started-app/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/get-started-app/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/helm-copy-secret/composition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/helm-copy-secret/kustomization.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/helm-copy-secret/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/helm-copy-secret/run-function.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/helm-copy-secret/vcluster.py +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/helm-copy-secret/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/helm-copy-secret/xrd.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/import-existing-vpc/README.md +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/import-existing-vpc/definition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/import-existing-vpc/observed.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/import-existing-vpc/provider-ec2.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/import-existing-vpc/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/import-existing-vpc/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/single-purpose/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/single-purpose/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/usages-extra/composition.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/usages-extra/extraResources.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/usages-extra/observedResources.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/usages-extra/render.sh +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/examples/usages-extra/xr.yaml +0 -0
- {crossplane_function_pythonic-0.1.2 → crossplane_function_pythonic-0.1.4}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crossplane-function-pythonic
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: A Python centric Crossplane Function
|
|
5
5
|
Project-URL: Documentation, https://github.com/fortra/function-pythonic#readme
|
|
6
6
|
Project-URL: Issues, https://github.com/fortra/function-pythonic/issues
|
|
@@ -49,7 +49,7 @@ spec:
|
|
|
49
49
|
functionRef:
|
|
50
50
|
name: function-pythonic
|
|
51
51
|
input:
|
|
52
|
-
apiVersion: pythonic.fn.
|
|
52
|
+
apiVersion: pythonic.fn.fortra.com/v1alpha1
|
|
53
53
|
kind: Composite
|
|
54
54
|
composite: |
|
|
55
55
|
class VpcComposite(BaseComposite):
|
|
@@ -81,7 +81,7 @@ kind: Function
|
|
|
81
81
|
metadata:
|
|
82
82
|
name: function-pythonic
|
|
83
83
|
spec:
|
|
84
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.
|
|
84
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.3
|
|
85
85
|
```
|
|
86
86
|
## Composed Resource Dependencies
|
|
87
87
|
|
|
@@ -227,8 +227,8 @@ The BaseComposite class provides the following fields for manipulating the Compo
|
|
|
227
227
|
| self.spec | Map | The composite observed spec |
|
|
228
228
|
| self.status | Map | The composite desired and observed status, read from observed if not in desired |
|
|
229
229
|
| self.conditions | Conditions | The composite desired and observed conditions, read from observed if not in desired |
|
|
230
|
-
| self.connection | Connection | The composite desired and observed connection detials, read from observed if not in desired |
|
|
231
230
|
| self.events | Events | Returned events against the Composite and optionally on the Claim |
|
|
231
|
+
| self.connection | Connection | The composite desired and observed connection detials, read from observed if not in desired |
|
|
232
232
|
| self.ready | Boolean | The composite desired ready state |
|
|
233
233
|
|
|
234
234
|
The BaseComposite also provides access to the following Crossplane Function level features:
|
|
@@ -238,6 +238,7 @@ The BaseComposite also provides access to the following Crossplane Function leve
|
|
|
238
238
|
| self.request | Message | Low level direct access to the RunFunctionRequest message |
|
|
239
239
|
| self.response | Message | Low level direct access to the RunFunctionResponse message |
|
|
240
240
|
| self.logger | Logger | Python logger to log messages to the running function stdout |
|
|
241
|
+
| self.parameters | Map | The configured step parameters |
|
|
241
242
|
| self.ttl | Integer | Get or set the response TTL, in seconds |
|
|
242
243
|
| self.credentials | Credentials | The request credentials |
|
|
243
244
|
| self.context | Map | The response context, initialized from the request context |
|
|
@@ -408,7 +409,7 @@ metadata:
|
|
|
408
409
|
annotations:
|
|
409
410
|
render.crossplane.io/runtime: Development
|
|
410
411
|
spec:
|
|
411
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.
|
|
412
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.3
|
|
412
413
|
```
|
|
413
414
|
In one terminal session, run function-pythonic:
|
|
414
415
|
```shell
|
|
@@ -510,7 +511,7 @@ kind: Function
|
|
|
510
511
|
metadata:
|
|
511
512
|
name: function-pythonic
|
|
512
513
|
spec:
|
|
513
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.
|
|
514
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.3
|
|
514
515
|
runtimeConfigRef:
|
|
515
516
|
name: function-pythonic
|
|
516
517
|
---
|
|
@@ -576,6 +577,41 @@ Secrets can also be used in an identical manner as ConfigMaps by enabling the
|
|
|
576
577
|
`--packages-secrets` command line option. Secrets permissions need to be
|
|
577
578
|
added to the above RBAC configuration.
|
|
578
579
|
|
|
580
|
+
## Step Parameters
|
|
581
|
+
|
|
582
|
+
Step specific parameters can be configured to be used by the composite
|
|
583
|
+
implementation. This is useful when setting the composite to the python class.
|
|
584
|
+
For example:
|
|
585
|
+
```yaml
|
|
586
|
+
apiVersion: v1
|
|
587
|
+
kind: ConfigMap
|
|
588
|
+
metadata:
|
|
589
|
+
namespace: crossplane-system
|
|
590
|
+
name: example-pythonic
|
|
591
|
+
labels:
|
|
592
|
+
function-pythonic.package: example.pythonic
|
|
593
|
+
data:
|
|
594
|
+
features.py: |
|
|
595
|
+
from crossplane.pythonic import BaseComposite
|
|
596
|
+
class GreetingComposite(BaseComposite):
|
|
597
|
+
def compose(self):
|
|
598
|
+
cm = self.resources.ConfigMap('v1', 'ConfigMap')
|
|
599
|
+
cm.data.greeting = f"Hello, {self.parameters.who}!"
|
|
600
|
+
```
|
|
601
|
+
```yaml
|
|
602
|
+
...
|
|
603
|
+
- step: pythonic
|
|
604
|
+
functionRef:
|
|
605
|
+
name: function-pythonic
|
|
606
|
+
input:
|
|
607
|
+
apiVersion: pythonic.fn.fortra.com/v1alpha1
|
|
608
|
+
kind: Composite
|
|
609
|
+
parameters:
|
|
610
|
+
who: World
|
|
611
|
+
composite: example.pythonic.features.GreetingComposite
|
|
612
|
+
...
|
|
613
|
+
```
|
|
614
|
+
|
|
579
615
|
## Filing System Packages
|
|
580
616
|
|
|
581
617
|
Composition Composite implementations can be coded in a stand alone python files
|
|
@@ -25,7 +25,7 @@ spec:
|
|
|
25
25
|
functionRef:
|
|
26
26
|
name: function-pythonic
|
|
27
27
|
input:
|
|
28
|
-
apiVersion: pythonic.fn.
|
|
28
|
+
apiVersion: pythonic.fn.fortra.com/v1alpha1
|
|
29
29
|
kind: Composite
|
|
30
30
|
composite: |
|
|
31
31
|
class VpcComposite(BaseComposite):
|
|
@@ -57,7 +57,7 @@ kind: Function
|
|
|
57
57
|
metadata:
|
|
58
58
|
name: function-pythonic
|
|
59
59
|
spec:
|
|
60
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.
|
|
60
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.3
|
|
61
61
|
```
|
|
62
62
|
## Composed Resource Dependencies
|
|
63
63
|
|
|
@@ -203,8 +203,8 @@ The BaseComposite class provides the following fields for manipulating the Compo
|
|
|
203
203
|
| self.spec | Map | The composite observed spec |
|
|
204
204
|
| self.status | Map | The composite desired and observed status, read from observed if not in desired |
|
|
205
205
|
| self.conditions | Conditions | The composite desired and observed conditions, read from observed if not in desired |
|
|
206
|
-
| self.connection | Connection | The composite desired and observed connection detials, read from observed if not in desired |
|
|
207
206
|
| self.events | Events | Returned events against the Composite and optionally on the Claim |
|
|
207
|
+
| self.connection | Connection | The composite desired and observed connection detials, read from observed if not in desired |
|
|
208
208
|
| self.ready | Boolean | The composite desired ready state |
|
|
209
209
|
|
|
210
210
|
The BaseComposite also provides access to the following Crossplane Function level features:
|
|
@@ -214,6 +214,7 @@ The BaseComposite also provides access to the following Crossplane Function leve
|
|
|
214
214
|
| self.request | Message | Low level direct access to the RunFunctionRequest message |
|
|
215
215
|
| self.response | Message | Low level direct access to the RunFunctionResponse message |
|
|
216
216
|
| self.logger | Logger | Python logger to log messages to the running function stdout |
|
|
217
|
+
| self.parameters | Map | The configured step parameters |
|
|
217
218
|
| self.ttl | Integer | Get or set the response TTL, in seconds |
|
|
218
219
|
| self.credentials | Credentials | The request credentials |
|
|
219
220
|
| self.context | Map | The response context, initialized from the request context |
|
|
@@ -384,7 +385,7 @@ metadata:
|
|
|
384
385
|
annotations:
|
|
385
386
|
render.crossplane.io/runtime: Development
|
|
386
387
|
spec:
|
|
387
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.
|
|
388
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.3
|
|
388
389
|
```
|
|
389
390
|
In one terminal session, run function-pythonic:
|
|
390
391
|
```shell
|
|
@@ -486,7 +487,7 @@ kind: Function
|
|
|
486
487
|
metadata:
|
|
487
488
|
name: function-pythonic
|
|
488
489
|
spec:
|
|
489
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.
|
|
490
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.3
|
|
490
491
|
runtimeConfigRef:
|
|
491
492
|
name: function-pythonic
|
|
492
493
|
---
|
|
@@ -552,6 +553,41 @@ Secrets can also be used in an identical manner as ConfigMaps by enabling the
|
|
|
552
553
|
`--packages-secrets` command line option. Secrets permissions need to be
|
|
553
554
|
added to the above RBAC configuration.
|
|
554
555
|
|
|
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
|
+
|
|
555
591
|
## Filing System Packages
|
|
556
592
|
|
|
557
593
|
Composition Composite implementations can be coded in a stand alone python files
|
|
@@ -10,7 +10,7 @@ _notset = object()
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class BaseComposite:
|
|
13
|
-
def __init__(self, request, logger):
|
|
13
|
+
def __init__(self, request, single_use, logger):
|
|
14
14
|
self.request = protobuf.Message(None, 'request', request.DESCRIPTOR, request, 'Function Request')
|
|
15
15
|
response = fnv1.RunFunctionResponse(
|
|
16
16
|
meta=fnv1.ResponseMeta(
|
|
@@ -24,6 +24,10 @@ class BaseComposite:
|
|
|
24
24
|
)
|
|
25
25
|
self.response = protobuf.Message(None, 'response', response.DESCRIPTOR, response)
|
|
26
26
|
self.logger = logger
|
|
27
|
+
if single_use:
|
|
28
|
+
self.parameters = self.request.observed.composite.resource.spec.parameters
|
|
29
|
+
else:
|
|
30
|
+
self.parameters = self.request.input.parameters
|
|
27
31
|
self.credentials = Credentials(self.request)
|
|
28
32
|
self.context = self.response.context
|
|
29
33
|
self.environment = self.context['apiextensions.crossplane.io/environment']
|
|
@@ -43,7 +47,6 @@ class BaseComposite:
|
|
|
43
47
|
self.spec = self.observed.spec
|
|
44
48
|
self.status = self.desired.status
|
|
45
49
|
self.conditions = Conditions(observed, self.response)
|
|
46
|
-
self.connection = Connection(observed, desired)
|
|
47
50
|
self.events = Events(self.response)
|
|
48
51
|
|
|
49
52
|
@property
|
|
@@ -66,6 +69,16 @@ class BaseComposite:
|
|
|
66
69
|
else:
|
|
67
70
|
raise ValueError('ttl must be an int or float')
|
|
68
71
|
|
|
72
|
+
@property
|
|
73
|
+
def connection(self):
|
|
74
|
+
return self.response.desired.composite.connection_details
|
|
75
|
+
|
|
76
|
+
@connection.setter
|
|
77
|
+
def connection(self, connection):
|
|
78
|
+
self.response.desired.composite.connection_details()
|
|
79
|
+
for key, value in connection:
|
|
80
|
+
self.response.desired.composite.connection_details[key] = value
|
|
81
|
+
|
|
69
82
|
@property
|
|
70
83
|
def ready(self):
|
|
71
84
|
ready = self.desired._parent.ready
|
|
@@ -140,12 +153,17 @@ class Credential:
|
|
|
140
153
|
class Resources:
|
|
141
154
|
def __init__(self, composite):
|
|
142
155
|
self.__dict__['_composite'] = composite
|
|
156
|
+
self.__dict__['_cache'] = {}
|
|
143
157
|
|
|
144
158
|
def __getattr__(self, key):
|
|
145
159
|
return self[key]
|
|
146
160
|
|
|
147
161
|
def __getitem__(self, key):
|
|
148
|
-
|
|
162
|
+
resource = self._cache.get(key)
|
|
163
|
+
if not resource:
|
|
164
|
+
resource = Resource(self._composite, key)
|
|
165
|
+
self._cache[key] = resource
|
|
166
|
+
return resource
|
|
149
167
|
|
|
150
168
|
def __bool__(self):
|
|
151
169
|
return bool(self._composite.response.desired.resources)
|
|
@@ -165,6 +183,7 @@ class Resources:
|
|
|
165
183
|
|
|
166
184
|
def __setitem__(self, key, resource):
|
|
167
185
|
self._composite.response.desired.resources[key].resource = resource
|
|
186
|
+
self._cache.pop(key, None)
|
|
168
187
|
|
|
169
188
|
def __delattr__(self, key):
|
|
170
189
|
del self[key]
|
|
@@ -172,6 +191,7 @@ class Resources:
|
|
|
172
191
|
def __delitem__(self, key):
|
|
173
192
|
if key in self._composite.response.desired.resources:
|
|
174
193
|
del self._composite.response.desired.resources[key]
|
|
194
|
+
self._cache.pop(key, None)
|
|
175
195
|
|
|
176
196
|
|
|
177
197
|
class Resource:
|
|
@@ -182,7 +202,7 @@ class Resource:
|
|
|
182
202
|
self.observed = observed.resource
|
|
183
203
|
self.desired = desired.resource
|
|
184
204
|
self.conditions = Conditions(observed)
|
|
185
|
-
self.connection =
|
|
205
|
+
self.connection = observed.connection_details
|
|
186
206
|
self.unknownsFatal = None
|
|
187
207
|
self.autoReady = None
|
|
188
208
|
self.usages = None
|
|
@@ -276,12 +296,17 @@ class Resource:
|
|
|
276
296
|
class Requireds:
|
|
277
297
|
def __init__(self, composite):
|
|
278
298
|
self._composite = composite
|
|
299
|
+
self._cache = {}
|
|
279
300
|
|
|
280
301
|
def __getattr__(self, key):
|
|
281
302
|
return self[key]
|
|
282
303
|
|
|
283
304
|
def __getitem__(self, key):
|
|
284
|
-
|
|
305
|
+
required = self._cache.get(key)
|
|
306
|
+
if not required:
|
|
307
|
+
required = RequiredResources(self._composite, key)
|
|
308
|
+
self._cache[key] = required
|
|
309
|
+
return required
|
|
285
310
|
|
|
286
311
|
def __bool__(self):
|
|
287
312
|
return bool(len(self))
|
|
@@ -316,6 +341,7 @@ class RequiredResources:
|
|
|
316
341
|
self.name = name
|
|
317
342
|
self._selector = composite.response.requirements.extra_resources[name]
|
|
318
343
|
self._resources = composite.request.extra_resources[name]
|
|
344
|
+
self._cache = {}
|
|
319
345
|
|
|
320
346
|
def __call__(self, apiVersion=_notset, kind=_notset, namespace=_notset, name=_notset, labels=_notset):
|
|
321
347
|
self._selector()
|
|
@@ -378,7 +404,11 @@ class RequiredResources:
|
|
|
378
404
|
self._selector.match_labels.labels[entry[0]] = entry[1]
|
|
379
405
|
|
|
380
406
|
def __getitem__(self, ix):
|
|
381
|
-
|
|
407
|
+
resource = self._cache.get(ix)
|
|
408
|
+
if not resource:
|
|
409
|
+
resource = RequiredResource(self.name, ix, self._resources.items[ix])
|
|
410
|
+
self._cache[ix] = resource
|
|
411
|
+
return resource
|
|
382
412
|
|
|
383
413
|
def __bool__(self):
|
|
384
414
|
return bool(self._resources.items)
|
|
@@ -537,38 +567,6 @@ class Condition(protobuf.ProtobufValue):
|
|
|
537
567
|
return self._conditions._response.conditions.append(condition)
|
|
538
568
|
|
|
539
569
|
|
|
540
|
-
class Connection:
|
|
541
|
-
def __init__(self, observed, desired=None):
|
|
542
|
-
self.__dict__['_observed'] = observed
|
|
543
|
-
self.__dict__['_desired'] = desired
|
|
544
|
-
|
|
545
|
-
def __bool__(self):
|
|
546
|
-
if self._desired is not None and len(self._desired.connection_details) > 0:
|
|
547
|
-
return True
|
|
548
|
-
if self._observed is not None and len(self._observed.connection_details) > 0:
|
|
549
|
-
return True
|
|
550
|
-
return False
|
|
551
|
-
|
|
552
|
-
def __getattr__(self, key):
|
|
553
|
-
return self[key]
|
|
554
|
-
|
|
555
|
-
def __getitem__(self, key):
|
|
556
|
-
value = None
|
|
557
|
-
if self._desired is not None and key in self._desired.connection_details:
|
|
558
|
-
value = self._desired.connection_details[key]
|
|
559
|
-
if value is None and key in self._observed.connection_details:
|
|
560
|
-
value = self._observed.connection_details[key]
|
|
561
|
-
return value
|
|
562
|
-
|
|
563
|
-
def __setattr__(self, key, value):
|
|
564
|
-
self[key] = value
|
|
565
|
-
|
|
566
|
-
def __setitem__(self, key, value):
|
|
567
|
-
if self._desired is None:
|
|
568
|
-
raise ValueError('Connection is read only')
|
|
569
|
-
self._desired.connection_details[key] = value
|
|
570
|
-
|
|
571
|
-
|
|
572
570
|
class Events:
|
|
573
571
|
def __init__(self, response):
|
|
574
572
|
self._results = response.results
|
|
@@ -47,10 +47,12 @@ class FunctionRunner(grpcv1.FunctionRunnerService):
|
|
|
47
47
|
if composite['apiVersion'] == 'pythonic.fortra.com/v1alpha1' and composite['kind'] == 'Composite':
|
|
48
48
|
if 'spec' not in composite or 'composite' not in composite['spec']:
|
|
49
49
|
return self.fatal(request, logger, 'Missing spec "composite"')
|
|
50
|
+
single_use = True
|
|
50
51
|
composite = composite['spec']['composite']
|
|
51
52
|
else:
|
|
52
53
|
if 'composite' not in request.input:
|
|
53
54
|
return self.fatal(request, logger, 'Missing input "composite"')
|
|
55
|
+
single_use = False
|
|
54
56
|
composite = request.input['composite']
|
|
55
57
|
|
|
56
58
|
# Ideally this is something the Function API provides
|
|
@@ -94,7 +96,7 @@ class FunctionRunner(grpcv1.FunctionRunnerService):
|
|
|
94
96
|
self.clazzes[composite] = clazz
|
|
95
97
|
|
|
96
98
|
try:
|
|
97
|
-
composite = clazz(request, logger)
|
|
99
|
+
composite = clazz(request, single_use, logger)
|
|
98
100
|
except Exception as e:
|
|
99
101
|
return self.fatal(request, logger, 'Instantiate', e)
|
|
100
102
|
|
|
@@ -123,7 +125,7 @@ class FunctionRunner(grpcv1.FunctionRunnerService):
|
|
|
123
125
|
|
|
124
126
|
def fatal(self, request, logger, message, exception=None):
|
|
125
127
|
if exception:
|
|
126
|
-
message += '
|
|
128
|
+
message += ' exception'
|
|
127
129
|
logger.exception(message)
|
|
128
130
|
m = str(exception)
|
|
129
131
|
if not m:
|
|
@@ -169,13 +171,14 @@ class FunctionRunner(grpcv1.FunctionRunnerService):
|
|
|
169
171
|
source = self.trimFullName(source)
|
|
170
172
|
composite.logger.debug(f"Dependency: {destination} = {source}")
|
|
171
173
|
if resource.usages or (resource.usages is None and composite.usages):
|
|
174
|
+
apiVersion = 'protection.crossplane.io/v1beta1' if composite.metadata.namespace else 'apiextensions.crossplane.io/v1beta1'
|
|
172
175
|
resources = {}
|
|
173
176
|
requireds = {}
|
|
174
177
|
for destination, source in sorted(dependencies.items()):
|
|
175
178
|
name = source.split('.')
|
|
176
179
|
if (len(name) > 5 and
|
|
177
|
-
name[0]
|
|
178
|
-
name[1]
|
|
180
|
+
name[0] in ('request', 'response') and
|
|
181
|
+
name[1] in ('observed', 'desired') and
|
|
179
182
|
name[2] == 'resources' and
|
|
180
183
|
name[4] == 'resource'
|
|
181
184
|
):
|
|
@@ -198,8 +201,7 @@ class FunctionRunner(grpcv1.FunctionRunnerService):
|
|
|
198
201
|
if source.metadata.namespace:
|
|
199
202
|
name.append(str(source.metadata.namespace))
|
|
200
203
|
name.append(str(source.observed.metadata.name))
|
|
201
|
-
usage = composite.resources['_'.join(name)](
|
|
202
|
-
#usage = composite.resources['_'.join(name)]('protection.crossplane.io/v1beta1', 'Usage')
|
|
204
|
+
usage = composite.resources['_'.join(name)](apiVersion, 'Usage')
|
|
203
205
|
if resource.metadata.namespace:
|
|
204
206
|
usage.metadata.namespace = resource.metadata.namespace
|
|
205
207
|
usage.spec.reason = '\n'.join(dependencies)
|
|
@@ -218,8 +220,7 @@ class FunctionRunner(grpcv1.FunctionRunnerService):
|
|
|
218
220
|
if source.metadata.namespace:
|
|
219
221
|
name.append(str(source.metadata.namespace))
|
|
220
222
|
name.append(str(source.metadata.name))
|
|
221
|
-
usage = composite.resources['_'.join(name)](
|
|
222
|
-
#usage = composite.resources['_'.join(name)]('protection.crossplane.io/v1beta1', 'Usage')
|
|
223
|
+
usage = composite.resources['_'.join(name)](apiVersion, 'Usage')
|
|
223
224
|
if resource.metadata.namespace:
|
|
224
225
|
usage.metadata.namespace = resource.metadata.namespace
|
|
225
226
|
usage.spec.reason = '\n'.join(dependencies)
|
|
@@ -336,9 +336,12 @@ class MapMessage:
|
|
|
336
336
|
message = message._value
|
|
337
337
|
elif isinstance(message, Value):
|
|
338
338
|
message = message._raw
|
|
339
|
-
if
|
|
340
|
-
|
|
341
|
-
|
|
339
|
+
if message is _Unknown:
|
|
340
|
+
self._messages.pop(key, None)
|
|
341
|
+
else:
|
|
342
|
+
if self._field.type == self._field.TYPE_BYTES and isinstance(message, str):
|
|
343
|
+
message = message.encode('utf-8')
|
|
344
|
+
self._messages[key] = message
|
|
342
345
|
self._cache.pop(key, None)
|
|
343
346
|
|
|
344
347
|
def __delattr__(self, key):
|
|
@@ -477,13 +480,18 @@ class RepeatedMessage:
|
|
|
477
480
|
message = message._value
|
|
478
481
|
elif isinstance(message, Value):
|
|
479
482
|
message = message._raw
|
|
480
|
-
if
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
483
|
+
if message is _Unknown:
|
|
484
|
+
if key < len(self._messages):
|
|
485
|
+
self._messages.pop(key)
|
|
486
|
+
self._cache.clear()
|
|
484
487
|
else:
|
|
485
|
-
self.
|
|
486
|
-
|
|
488
|
+
if self._field.type == self._field.TYPE_BYTES and isinstance(message, str):
|
|
489
|
+
message = message.encode('utf-8')
|
|
490
|
+
if key >= len(self._messages):
|
|
491
|
+
self._messages.append(message)
|
|
492
|
+
else:
|
|
493
|
+
self._messages[key] = message
|
|
494
|
+
self._cache.pop(key, None)
|
|
487
495
|
|
|
488
496
|
def __delitem__(self, key):
|
|
489
497
|
if self._readOnly:
|
|
@@ -15,7 +15,7 @@ metadata:
|
|
|
15
15
|
# This tells crossplane beta render to connect to the function locally.
|
|
16
16
|
render.crossplane.io/runtime: Development
|
|
17
17
|
spec:
|
|
18
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.
|
|
18
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.3
|
|
19
19
|
---
|
|
20
20
|
apiVersion: pkg.crossplane.io/v1beta1
|
|
21
21
|
kind: Function
|
|
@@ -15,7 +15,7 @@ metadata:
|
|
|
15
15
|
# This tells crossplane beta render to connect to the function locally.
|
|
16
16
|
render.crossplane.io/runtime: Development
|
|
17
17
|
spec:
|
|
18
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.
|
|
18
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.3
|
|
19
19
|
---
|
|
20
20
|
apiVersion: pkg.crossplane.io/v1beta1
|
|
21
21
|
kind: Function
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
apiVersion: pkg.crossplane.io/v1beta1
|
|
2
|
+
kind: Function
|
|
3
|
+
metadata:
|
|
4
|
+
name: function-pythonic
|
|
5
|
+
annotations:
|
|
6
|
+
# This tells crossplane beta render to connect to the function locally.
|
|
7
|
+
render.crossplane.io/runtime: Development
|
|
8
|
+
spec:
|
|
9
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.3
|
crossplane_function_pythonic-0.1.4/examples/function-go-templating/functions/include/functions.yaml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
apiVersion: pkg.crossplane.io/v1beta1
|
|
2
|
+
kind: Function
|
|
3
|
+
metadata:
|
|
4
|
+
name: function-pythonic
|
|
5
|
+
annotations:
|
|
6
|
+
# This tells crossplane beta render to connect to the function locally.
|
|
7
|
+
render.crossplane.io/runtime: Development
|
|
8
|
+
spec:
|
|
9
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.3
|
crossplane_function_pythonic-0.1.4/examples/function-go-templating/functions/toYaml/functions.yaml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
apiVersion: pkg.crossplane.io/v1beta1
|
|
2
|
+
kind: Function
|
|
3
|
+
metadata:
|
|
4
|
+
name: function-pythonic
|
|
5
|
+
annotations:
|
|
6
|
+
# This tells crossplane beta render to connect to the function locally.
|
|
7
|
+
render.crossplane.io/runtime: Development
|
|
8
|
+
spec:
|
|
9
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.3
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
apiVersion: pkg.crossplane.io/v1beta1
|
|
2
|
+
kind: Function
|
|
3
|
+
metadata:
|
|
4
|
+
name: function-pythonic
|
|
5
|
+
annotations:
|
|
6
|
+
# This tells crossplane beta render to connect to the function locally.
|
|
7
|
+
render.crossplane.io/runtime: Development
|
|
8
|
+
spec:
|
|
9
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.3
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
apiVersion: pkg.crossplane.io/v1beta1
|
|
2
|
+
kind: Function
|
|
3
|
+
metadata:
|
|
4
|
+
name: function-pythonic
|
|
5
|
+
annotations:
|
|
6
|
+
# This tells crossplane beta render to connect to the function locally.
|
|
7
|
+
render.crossplane.io/runtime: Development
|
|
8
|
+
spec:
|
|
9
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.3
|
|
@@ -54,12 +54,7 @@ spec:
|
|
|
54
54
|
def aws_client(self, service):
|
|
55
55
|
if not self._aws_session:
|
|
56
56
|
self._aws_session = get_session()
|
|
57
|
-
|
|
58
|
-
client = self._aws_clients.get(service)
|
|
59
|
-
if not client:
|
|
60
|
-
client = self._aws_session.create_client(service, str(self.spec.region))
|
|
61
|
-
self._aws_clients[service] = client
|
|
62
|
-
return client
|
|
57
|
+
return self._aws_session.create_client(service, str(self.spec.region))
|
|
63
58
|
|
|
64
59
|
def tags(self, *args, **kwargs):
|
|
65
60
|
tags = {}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
apiVersion: pkg.crossplane.io/v1beta1
|
|
2
|
+
kind: Function
|
|
3
|
+
metadata:
|
|
4
|
+
name: function-pythonic
|
|
5
|
+
annotations:
|
|
6
|
+
# This tells crossplane beta render to connect to the function locally.
|
|
7
|
+
render.crossplane.io/runtime: Development
|
|
8
|
+
spec:
|
|
9
|
+
package: ghcr.io/fortra/function-pythonic:v0.1.3
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
apiVersion: pkg.crossplane.io/v1beta1
|
|
2
|
-
kind: Function
|
|
3
|
-
metadata:
|
|
4
|
-
name: function-pythonic
|
|
5
|
-
annotations:
|
|
6
|
-
# This tells crossplane beta render to connect to the function locally.
|
|
7
|
-
render.crossplane.io/runtime: Development
|
|
8
|
-
spec:
|
|
9
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.2
|
crossplane_function_pythonic-0.1.2/examples/function-go-templating/functions/include/functions.yaml
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
apiVersion: pkg.crossplane.io/v1beta1
|
|
2
|
-
kind: Function
|
|
3
|
-
metadata:
|
|
4
|
-
name: function-pythonic
|
|
5
|
-
annotations:
|
|
6
|
-
# This tells crossplane beta render to connect to the function locally.
|
|
7
|
-
render.crossplane.io/runtime: Development
|
|
8
|
-
spec:
|
|
9
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.2
|
crossplane_function_pythonic-0.1.2/examples/function-go-templating/functions/toYaml/functions.yaml
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
apiVersion: pkg.crossplane.io/v1beta1
|
|
2
|
-
kind: Function
|
|
3
|
-
metadata:
|
|
4
|
-
name: function-pythonic
|
|
5
|
-
annotations:
|
|
6
|
-
# This tells crossplane beta render to connect to the function locally.
|
|
7
|
-
render.crossplane.io/runtime: Development
|
|
8
|
-
spec:
|
|
9
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.2
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
apiVersion: pkg.crossplane.io/v1beta1
|
|
2
|
-
kind: Function
|
|
3
|
-
metadata:
|
|
4
|
-
name: function-pythonic
|
|
5
|
-
annotations:
|
|
6
|
-
# This tells crossplane beta render to connect to the function locally.
|
|
7
|
-
render.crossplane.io/runtime: Development
|
|
8
|
-
spec:
|
|
9
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.2
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
apiVersion: pkg.crossplane.io/v1beta1
|
|
2
|
-
kind: Function
|
|
3
|
-
metadata:
|
|
4
|
-
name: function-pythonic
|
|
5
|
-
annotations:
|
|
6
|
-
# This tells crossplane beta render to connect to the function locally.
|
|
7
|
-
render.crossplane.io/runtime: Development
|
|
8
|
-
spec:
|
|
9
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.2
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
apiVersion: pkg.crossplane.io/v1beta1
|
|
2
|
-
kind: Function
|
|
3
|
-
metadata:
|
|
4
|
-
name: function-pythonic
|
|
5
|
-
annotations:
|
|
6
|
-
# This tells crossplane beta render to connect to the function locally.
|
|
7
|
-
render.crossplane.io/runtime: Development
|
|
8
|
-
spec:
|
|
9
|
-
package: ghcr.io/fortra/function-pythonic:v0.1.2
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|