crossplane-function-pythonic 0.2.0__tar.gz → 0.3.0__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.2.0 → crossplane_function_pythonic-0.3.0}/.gitignore +1 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/PKG-INFO +48 -14
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/README.md +46 -12
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/crossplane/pythonic/__about__.py +1 -1
- crossplane_function_pythonic-0.3.0/crossplane/pythonic/auto_ready.py +153 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/crossplane/pythonic/command.py +5 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/crossplane/pythonic/composite.py +245 -63
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/crossplane/pythonic/function.py +33 -23
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/crossplane/pythonic/grpc.py +6 -1
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/crossplane/pythonic/protobuf.py +125 -32
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/crossplane/pythonic/render.py +73 -43
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/.dev/functions.yaml +1 -1
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/aks-cluster/cluster-function-pythonic.yaml +1 -1
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/aks-cluster/functions.yaml +1 -1
- crossplane_function_pythonic-0.3.0/examples/connection-details-composition/access-keys.yaml +30 -0
- crossplane_function_pythonic-0.3.0/examples/connection-details-composition/composition.yaml +30 -0
- crossplane_function_pythonic-0.3.0/examples/connection-details-composition/definition.yaml +26 -0
- {crossplane_function_pythonic-0.2.0/examples/single-purpose → crossplane_function_pythonic-0.3.0/examples/connection-details-composition}/functions.yaml +1 -1
- crossplane_function_pythonic-0.3.0/examples/connection-details-composition/render.sh +8 -0
- crossplane_function_pythonic-0.3.0/examples/connection-details-composition/secrets.yaml +18 -0
- crossplane_function_pythonic-0.3.0/examples/connection-details-composition/user.yaml +18 -0
- crossplane_function_pythonic-0.3.0/examples/connection-details-composition/xr.yaml +8 -0
- crossplane_function_pythonic-0.3.0/examples/connections/composite-connection.yaml +8 -0
- crossplane_function_pythonic-0.3.0/examples/connections/composition.yaml +39 -0
- crossplane_function_pythonic-0.3.0/examples/connections/rds-connection.yaml +8 -0
- crossplane_function_pythonic-0.3.0/examples/connections/rds-observed.yaml +21 -0
- crossplane_function_pythonic-0.3.0/examples/connections/render.sh +9 -0
- crossplane_function_pythonic-0.3.0/examples/connections/step-credential.yaml +8 -0
- crossplane_function_pythonic-0.3.0/examples/connections/xr.yaml +8 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/eks-cluster/functions.yaml +1 -1
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/filing-system/function.yaml +1 -1
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/conditions/functions.yaml +1 -1
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/context/functions.yaml +1 -1
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/context/render.sh +1 -1
- {crossplane_function_pythonic-0.2.0/examples/function-go-templating/functions/getComposedResource → crossplane_function_pythonic-0.3.0/examples/function-go-templating/functions/fromYaml}/functions.yaml +1 -1
- {crossplane_function_pythonic-0.2.0/examples/function-go-templating/extra-resources → crossplane_function_pythonic-0.3.0/examples/function-go-templating/functions/getComposedResource}/functions.yaml +1 -1
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/getCompositeResource/functions.yaml +1 -1
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/getCredentialData/composition.yaml +5 -5
- {crossplane_function_pythonic-0.2.0/examples/function-go-templating/functions/fromYaml → crossplane_function_pythonic-0.3.0/examples/function-go-templating/functions/getCredentialData}/functions.yaml +1 -1
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/getCredentialData/render.sh +1 -1
- crossplane_function_pythonic-0.3.0/examples/function-go-templating/functions/getResourceCondition/functions.yaml +9 -0
- crossplane_function_pythonic-0.3.0/examples/function-go-templating/functions/include/functions.yaml +9 -0
- crossplane_function_pythonic-0.3.0/examples/function-go-templating/functions/toYaml/functions.yaml +9 -0
- crossplane_function_pythonic-0.3.0/examples/function-go-templating/inline/functions.yaml +9 -0
- crossplane_function_pythonic-0.3.0/examples/function-go-templating/recursive/functions.yaml +9 -0
- crossplane_function_pythonic-0.3.0/examples/function-go-templating/required-resources/functions.yaml +9 -0
- {crossplane_function_pythonic-0.2.0/examples/function-go-templating/extra-resources → crossplane_function_pythonic-0.3.0/examples/function-go-templating/required-resources}/render.sh +1 -1
- crossplane_function_pythonic-0.3.0/examples/function-sequencer/composition.yaml +48 -0
- {crossplane_function_pythonic-0.2.0/examples/get-started-app → crossplane_function_pythonic-0.3.0/examples/function-sequencer}/functions.yaml +1 -1
- crossplane_function_pythonic-0.3.0/examples/function-sequencer/observed.yaml +27 -0
- crossplane_function_pythonic-0.3.0/examples/function-sequencer/render.sh +12 -0
- crossplane_function_pythonic-0.3.0/examples/function-sequencer/sequencer.py +12 -0
- crossplane_function_pythonic-0.3.0/examples/function-sequencer/xr.yaml +6 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/get-started-app/composition.yaml +0 -2
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/get-started-app/definition.yaml +1 -1
- {crossplane_function_pythonic-0.2.0/examples/helm-copy-secret → crossplane_function_pythonic-0.3.0/examples/get-started-app}/functions.yaml +1 -1
- crossplane_function_pythonic-0.3.0/examples/get-started-app/render.sh +4 -0
- crossplane_function_pythonic-0.3.0/examples/helm-copy-secret/functions.yaml +8 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/import-existing-vpc/functions.yaml +1 -1
- crossplane_function_pythonic-0.3.0/examples/single-purpose/functions.yaml +8 -0
- crossplane_function_pythonic-0.3.0/examples/usages-extra/functions.yaml +9 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/usages-extra/render.sh +1 -1
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/pyproject.toml +1 -1
- crossplane_function_pythonic-0.2.0/examples/function-go-templating/functions/getCredentialData/functions.yaml +0 -9
- crossplane_function_pythonic-0.2.0/examples/function-go-templating/functions/getResourceCondition/functions.yaml +0 -9
- crossplane_function_pythonic-0.2.0/examples/function-go-templating/functions/include/functions.yaml +0 -9
- crossplane_function_pythonic-0.2.0/examples/function-go-templating/functions/toYaml/functions.yaml +0 -9
- crossplane_function_pythonic-0.2.0/examples/function-go-templating/inline/functions.yaml +0 -9
- crossplane_function_pythonic-0.2.0/examples/function-go-templating/recursive/functions.yaml +0 -9
- crossplane_function_pythonic-0.2.0/examples/get-started-app/render.sh +0 -4
- crossplane_function_pythonic-0.2.0/examples/usages-extra/functions.yaml +0 -9
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/LICENSE +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/crossplane/pythonic/__init__.py +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/crossplane/pythonic/__main__.py +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/crossplane/pythonic/main.py +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/crossplane/pythonic/packages.py +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/crossplane/pythonic/version.py +1 -1
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/aks-cluster/README.md +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/aks-cluster/aks/kubernetescluster.py +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/aks-cluster/aks/resourcegroup.py +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/aks-cluster/composition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/aks-cluster/definition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/aks-cluster/install.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/aks-cluster/kustomization.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/aks-cluster/providers.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/aks-cluster/render.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/aks-cluster/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/eks-cluster/composition-v2.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/eks-cluster/composition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/eks-cluster/definition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/eks-cluster/render-v2.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/eks-cluster/render.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/eks-cluster/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/filing-system/README.md +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/filing-system/composition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/filing-system/definition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/filing-system/kustomization.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/filing-system/runtime.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/filing-system/vcluster.py +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/filing-system/vcluster.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/conditions/composition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/conditions/render.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/conditions/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/conditions/xrd.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/context/composition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/context/environmentConfigs.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/context/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/context/xrd.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/fromYaml/composition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/fromYaml/render.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/fromYaml/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/getComposedResource/composition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/getComposedResource/observed.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/getComposedResource/render.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/getComposedResource/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/getCompositeResource/composition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/getCompositeResource/render.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/getCompositeResource/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/getCredentialData/credentials.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/getCredentialData/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/getResourceCondition/composition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/getResourceCondition/observed.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/getResourceCondition/render.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/getResourceCondition/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/include/composition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/include/render.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/include/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/toYaml/composition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/toYaml/render.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/functions/toYaml/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/inline/composition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/inline/render.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/inline/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/recursive/composition-real.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/recursive/composition-wrapper.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/recursive/render.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/function-go-templating/recursive/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0/examples/function-go-templating/extra-resources → crossplane_function_pythonic-0.3.0/examples/function-go-templating/required-resources}/composition.yaml +0 -0
- /crossplane_function_pythonic-0.2.0/examples/function-go-templating/extra-resources/extraResources.yaml → /crossplane_function_pythonic-0.3.0/examples/function-go-templating/required-resources/required-resources.yaml +0 -0
- {crossplane_function_pythonic-0.2.0/examples/function-go-templating/extra-resources → crossplane_function_pythonic-0.3.0/examples/function-go-templating/required-resources}/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/get-started-app/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/helm-copy-secret/composition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/helm-copy-secret/kustomization.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/helm-copy-secret/render.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/helm-copy-secret/run-function.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/helm-copy-secret/vcluster.py +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/helm-copy-secret/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/helm-copy-secret/xrd.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/import-existing-vpc/README.md +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/import-existing-vpc/composition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/import-existing-vpc/definition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/import-existing-vpc/observed.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/import-existing-vpc/provider-ec2.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/import-existing-vpc/render.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/import-existing-vpc/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/single-purpose/render.sh +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/single-purpose/xr.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/usages-extra/composition.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/usages-extra/extraResources.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/usages-extra/observedResources.yaml +0 -0
- {crossplane_function_pythonic-0.2.0 → crossplane_function_pythonic-0.3.0}/examples/usages-extra/xr.yaml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crossplane-function-pythonic
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: A Python centric Crossplane Function
|
|
5
5
|
Project-URL: Documentation, https://github.com/crossplane-contrib/function-pythonic#readme
|
|
6
6
|
Project-URL: Issues, https://github.com/crossplane-contrib/function-pythonic/issues
|
|
@@ -17,7 +17,7 @@ Requires-Python: <3.15,>=3.12
|
|
|
17
17
|
Requires-Dist: crossplane-function-sdk-python==0.10.0
|
|
18
18
|
Requires-Dist: pyyaml==6.0.3
|
|
19
19
|
Provides-Extra: packages
|
|
20
|
-
Requires-Dist: kopf==1.
|
|
20
|
+
Requires-Dist: kopf==1.40.0; extra == 'packages'
|
|
21
21
|
Provides-Extra: pip-install
|
|
22
22
|
Requires-Dist: pip==25.3; extra == 'pip-install'
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
@@ -81,8 +81,39 @@ kind: Function
|
|
|
81
81
|
metadata:
|
|
82
82
|
name: function-pythonic
|
|
83
83
|
spec:
|
|
84
|
-
package: xpkg.upbound.io/crossplane-contrib/function-pythonic:v0.
|
|
84
|
+
package: xpkg.upbound.io/crossplane-contrib/function-pythonic:v0.3.0
|
|
85
85
|
```
|
|
86
|
+
|
|
87
|
+
### Crossplane V1
|
|
88
|
+
When running function-pythonic in Crossplane V1, the `--crossplane-v1` command line
|
|
89
|
+
option should be specified. This requires using a Crossplane DeploymentRuntimeConfig.
|
|
90
|
+
```yaml
|
|
91
|
+
apiVersion: pkg.crossplane.io/v1
|
|
92
|
+
kind: Function
|
|
93
|
+
metadata:
|
|
94
|
+
name: function-pythonic
|
|
95
|
+
spec:
|
|
96
|
+
package: xpkg.upbound.io/crossplane-contrib/function-pythonic:v0.3.0
|
|
97
|
+
runtimeConfigRef:
|
|
98
|
+
name: function-pythonic
|
|
99
|
+
--
|
|
100
|
+
apiVersion: pkg.crossplane.io/v1beta1
|
|
101
|
+
kind: DeploymentRuntimeConfig
|
|
102
|
+
metadata:
|
|
103
|
+
name: function-pythonic
|
|
104
|
+
spec:
|
|
105
|
+
deploymentTemplate:
|
|
106
|
+
spec:
|
|
107
|
+
selector: {}
|
|
108
|
+
template:
|
|
109
|
+
spec:
|
|
110
|
+
containers:
|
|
111
|
+
- name: package-runtime
|
|
112
|
+
args:
|
|
113
|
+
- --debug
|
|
114
|
+
- --crossplane-v1
|
|
115
|
+
```
|
|
116
|
+
|
|
86
117
|
## Composed Resource Dependencies
|
|
87
118
|
|
|
88
119
|
function-pythonic automatically handles dependencies between composed resources.
|
|
@@ -228,7 +259,9 @@ The BaseComposite class provides the following fields for manipulating the Compo
|
|
|
228
259
|
| self.status | Map | The composite desired and observed status, read from observed if not in desired |
|
|
229
260
|
| self.conditions | Conditions | The composite desired and observed conditions, read from observed if not in desired |
|
|
230
261
|
| self.results | Results | Returned results applied to the Composite and optionally on the Claim |
|
|
231
|
-
| self.
|
|
262
|
+
| self.connectionSecret | Map | The name, namespace, and resourceName to use when generating the connection secret in Crossplane v2 |
|
|
263
|
+
| self.connection | Map | The composite desired connection detials |
|
|
264
|
+
| self.connection.observed | Map | The composite observed connection detials |
|
|
232
265
|
| self.ready | Boolean | The composite desired ready state |
|
|
233
266
|
|
|
234
267
|
The BaseComposite also provides access to the following Crossplane Function level features:
|
|
@@ -270,13 +303,13 @@ Resource class:
|
|
|
270
303
|
| Resource.data | Map | The resource data |
|
|
271
304
|
| Resource.status | Map | The resource status |
|
|
272
305
|
| Resource.conditions | Conditions | The resource conditions |
|
|
273
|
-
| Resource.connection |
|
|
306
|
+
| Resource.connection | Map | The resource observed connection details |
|
|
274
307
|
| Resource.ready | Boolean | The resource ready state |
|
|
275
308
|
| Resource.unknownsFatal | Boolean | Terminate the composition if this resource has been created and is assigned unknown values, default is Composite.unknownsFatal |
|
|
276
309
|
| Resource.usages | Boolean | Generate Crossplane Usages for this resource, default is Composite.autoReady |
|
|
277
310
|
| Resource.autoReady | Boolean | Perform auto ready processing on this resource, default is Composite.autoReady |
|
|
278
311
|
|
|
279
|
-
### Required Resources
|
|
312
|
+
### Required Resources
|
|
280
313
|
|
|
281
314
|
Creating and accessing required resources is performed using the `BaseComposite.requireds` field.
|
|
282
315
|
`BaseComposite.requireds` is a dictionary of the required resources whose key is the required
|
|
@@ -310,6 +343,7 @@ Each resource in the list is the following RequiredResource class:
|
|
|
310
343
|
| RequiredResource.data | Map | The required resource data |
|
|
311
344
|
| RequiredResource.status | Map | The required resource status |
|
|
312
345
|
| RequiredResource.conditions | Map | The required resource conditions |
|
|
346
|
+
| RequiredResource.connection | Map | The required resource connection details |
|
|
313
347
|
|
|
314
348
|
### Conditions
|
|
315
349
|
|
|
@@ -372,11 +406,11 @@ $ pip install crossplane-function-pythonic
|
|
|
372
406
|
Then to render function-pythonic Compositions, use the `function-pythonic render ...`
|
|
373
407
|
command.
|
|
374
408
|
```shell
|
|
375
|
-
$ function-pythonic render
|
|
409
|
+
$ function-pythonic render -h
|
|
376
410
|
usage: Crossplane Function Pythonic render [-h] [--debug] [--log-name-width WIDTH] [--python-path DIRECTORY] [--render-unknowns]
|
|
377
411
|
[--allow-oversize-protos] [--context-files KEY=PATH] [--context-values KEY=VALUE]
|
|
378
|
-
[--observed-resources PATH] [--
|
|
379
|
-
[--
|
|
412
|
+
[--observed-resources PATH] [--required-resources PATH] [--secret-store PATH] [--include-full-xr]
|
|
413
|
+
[--include-connection-xr] [--include-function-results] [--include-context]
|
|
380
414
|
PATH [PATH/CLASS]
|
|
381
415
|
|
|
382
416
|
positional arguments:
|
|
@@ -400,14 +434,14 @@ options:
|
|
|
400
434
|
Context key-value pairs to pass to the Function pipeline. Values must be YAML/JSON. Keys take precedence over --context-files.
|
|
401
435
|
--observed-resources, -o PATH
|
|
402
436
|
A YAML file or directory of YAML files specifying the observed state of composed resources.
|
|
403
|
-
--extra-resources PATH
|
|
404
|
-
A YAML file or directory of YAML files specifying required resources (deprecated, use --required-resources).
|
|
405
437
|
--required-resources, -e PATH
|
|
406
438
|
A YAML file or directory of YAML files specifying required resources to pass to the Function pipeline.
|
|
407
|
-
--
|
|
408
|
-
A YAML file or directory of YAML files specifying
|
|
439
|
+
--secret-store, -s PATH
|
|
440
|
+
A YAML file or directory of YAML files specifying Secrets to use to resolve connections and credentials.
|
|
409
441
|
--include-full-xr, -x
|
|
410
442
|
Include a direct copy of the input XR's spedc and metadata fields in the rendered output.
|
|
443
|
+
--include-connection-xr
|
|
444
|
+
Include the Composite connection values in the rendered output as a resource of kind: Connection.
|
|
411
445
|
--include-function-results, -r
|
|
412
446
|
Include informational and warning messages from Functions in the rendered output as resources of kind: Result..
|
|
413
447
|
--include-context, -c
|
|
@@ -545,7 +579,7 @@ kind: Function
|
|
|
545
579
|
metadata:
|
|
546
580
|
name: function-pythonic
|
|
547
581
|
spec:
|
|
548
|
-
package: xpkg.upbound.io/crossplane-contrib/function-pythonic:v0.
|
|
582
|
+
package: xpkg.upbound.io/crossplane-contrib/function-pythonic:v0.3.0
|
|
549
583
|
runtimeConfigRef:
|
|
550
584
|
name: function-pythonic
|
|
551
585
|
---
|
|
@@ -57,8 +57,39 @@ kind: Function
|
|
|
57
57
|
metadata:
|
|
58
58
|
name: function-pythonic
|
|
59
59
|
spec:
|
|
60
|
-
package: xpkg.upbound.io/crossplane-contrib/function-pythonic:v0.
|
|
60
|
+
package: xpkg.upbound.io/crossplane-contrib/function-pythonic:v0.3.0
|
|
61
61
|
```
|
|
62
|
+
|
|
63
|
+
### Crossplane V1
|
|
64
|
+
When running function-pythonic in Crossplane V1, the `--crossplane-v1` command line
|
|
65
|
+
option should be specified. This requires using a Crossplane DeploymentRuntimeConfig.
|
|
66
|
+
```yaml
|
|
67
|
+
apiVersion: pkg.crossplane.io/v1
|
|
68
|
+
kind: Function
|
|
69
|
+
metadata:
|
|
70
|
+
name: function-pythonic
|
|
71
|
+
spec:
|
|
72
|
+
package: xpkg.upbound.io/crossplane-contrib/function-pythonic:v0.3.0
|
|
73
|
+
runtimeConfigRef:
|
|
74
|
+
name: function-pythonic
|
|
75
|
+
--
|
|
76
|
+
apiVersion: pkg.crossplane.io/v1beta1
|
|
77
|
+
kind: DeploymentRuntimeConfig
|
|
78
|
+
metadata:
|
|
79
|
+
name: function-pythonic
|
|
80
|
+
spec:
|
|
81
|
+
deploymentTemplate:
|
|
82
|
+
spec:
|
|
83
|
+
selector: {}
|
|
84
|
+
template:
|
|
85
|
+
spec:
|
|
86
|
+
containers:
|
|
87
|
+
- name: package-runtime
|
|
88
|
+
args:
|
|
89
|
+
- --debug
|
|
90
|
+
- --crossplane-v1
|
|
91
|
+
```
|
|
92
|
+
|
|
62
93
|
## Composed Resource Dependencies
|
|
63
94
|
|
|
64
95
|
function-pythonic automatically handles dependencies between composed resources.
|
|
@@ -204,7 +235,9 @@ The BaseComposite class provides the following fields for manipulating the Compo
|
|
|
204
235
|
| self.status | Map | The composite desired and observed status, read from observed if not in desired |
|
|
205
236
|
| self.conditions | Conditions | The composite desired and observed conditions, read from observed if not in desired |
|
|
206
237
|
| self.results | Results | Returned results applied to the Composite and optionally on the Claim |
|
|
207
|
-
| self.
|
|
238
|
+
| self.connectionSecret | Map | The name, namespace, and resourceName to use when generating the connection secret in Crossplane v2 |
|
|
239
|
+
| self.connection | Map | The composite desired connection detials |
|
|
240
|
+
| self.connection.observed | Map | The composite observed connection detials |
|
|
208
241
|
| self.ready | Boolean | The composite desired ready state |
|
|
209
242
|
|
|
210
243
|
The BaseComposite also provides access to the following Crossplane Function level features:
|
|
@@ -246,13 +279,13 @@ Resource class:
|
|
|
246
279
|
| Resource.data | Map | The resource data |
|
|
247
280
|
| Resource.status | Map | The resource status |
|
|
248
281
|
| Resource.conditions | Conditions | The resource conditions |
|
|
249
|
-
| Resource.connection |
|
|
282
|
+
| Resource.connection | Map | The resource observed connection details |
|
|
250
283
|
| Resource.ready | Boolean | The resource ready state |
|
|
251
284
|
| Resource.unknownsFatal | Boolean | Terminate the composition if this resource has been created and is assigned unknown values, default is Composite.unknownsFatal |
|
|
252
285
|
| Resource.usages | Boolean | Generate Crossplane Usages for this resource, default is Composite.autoReady |
|
|
253
286
|
| Resource.autoReady | Boolean | Perform auto ready processing on this resource, default is Composite.autoReady |
|
|
254
287
|
|
|
255
|
-
### Required Resources
|
|
288
|
+
### Required Resources
|
|
256
289
|
|
|
257
290
|
Creating and accessing required resources is performed using the `BaseComposite.requireds` field.
|
|
258
291
|
`BaseComposite.requireds` is a dictionary of the required resources whose key is the required
|
|
@@ -286,6 +319,7 @@ Each resource in the list is the following RequiredResource class:
|
|
|
286
319
|
| RequiredResource.data | Map | The required resource data |
|
|
287
320
|
| RequiredResource.status | Map | The required resource status |
|
|
288
321
|
| RequiredResource.conditions | Map | The required resource conditions |
|
|
322
|
+
| RequiredResource.connection | Map | The required resource connection details |
|
|
289
323
|
|
|
290
324
|
### Conditions
|
|
291
325
|
|
|
@@ -348,11 +382,11 @@ $ pip install crossplane-function-pythonic
|
|
|
348
382
|
Then to render function-pythonic Compositions, use the `function-pythonic render ...`
|
|
349
383
|
command.
|
|
350
384
|
```shell
|
|
351
|
-
$ function-pythonic render
|
|
385
|
+
$ function-pythonic render -h
|
|
352
386
|
usage: Crossplane Function Pythonic render [-h] [--debug] [--log-name-width WIDTH] [--python-path DIRECTORY] [--render-unknowns]
|
|
353
387
|
[--allow-oversize-protos] [--context-files KEY=PATH] [--context-values KEY=VALUE]
|
|
354
|
-
[--observed-resources PATH] [--
|
|
355
|
-
[--
|
|
388
|
+
[--observed-resources PATH] [--required-resources PATH] [--secret-store PATH] [--include-full-xr]
|
|
389
|
+
[--include-connection-xr] [--include-function-results] [--include-context]
|
|
356
390
|
PATH [PATH/CLASS]
|
|
357
391
|
|
|
358
392
|
positional arguments:
|
|
@@ -376,14 +410,14 @@ options:
|
|
|
376
410
|
Context key-value pairs to pass to the Function pipeline. Values must be YAML/JSON. Keys take precedence over --context-files.
|
|
377
411
|
--observed-resources, -o PATH
|
|
378
412
|
A YAML file or directory of YAML files specifying the observed state of composed resources.
|
|
379
|
-
--extra-resources PATH
|
|
380
|
-
A YAML file or directory of YAML files specifying required resources (deprecated, use --required-resources).
|
|
381
413
|
--required-resources, -e PATH
|
|
382
414
|
A YAML file or directory of YAML files specifying required resources to pass to the Function pipeline.
|
|
383
|
-
--
|
|
384
|
-
A YAML file or directory of YAML files specifying
|
|
415
|
+
--secret-store, -s PATH
|
|
416
|
+
A YAML file or directory of YAML files specifying Secrets to use to resolve connections and credentials.
|
|
385
417
|
--include-full-xr, -x
|
|
386
418
|
Include a direct copy of the input XR's spedc and metadata fields in the rendered output.
|
|
419
|
+
--include-connection-xr
|
|
420
|
+
Include the Composite connection values in the rendered output as a resource of kind: Connection.
|
|
387
421
|
--include-function-results, -r
|
|
388
422
|
Include informational and warning messages from Functions in the rendered output as resources of kind: Result..
|
|
389
423
|
--include-context, -c
|
|
@@ -521,7 +555,7 @@ kind: Function
|
|
|
521
555
|
metadata:
|
|
522
556
|
name: function-pythonic
|
|
523
557
|
spec:
|
|
524
|
-
package: xpkg.upbound.io/crossplane-contrib/function-pythonic:v0.
|
|
558
|
+
package: xpkg.upbound.io/crossplane-contrib/function-pythonic:v0.3.0
|
|
525
559
|
runtimeConfigRef:
|
|
526
560
|
name: function-pythonic
|
|
527
561
|
---
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# This is set at build time, using "hatch version"
|
|
2
|
-
__version__ = "0.
|
|
2
|
+
__version__ = "0.3.0"
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
def process(composite):
|
|
4
|
+
for name, resource in composite.resources:
|
|
5
|
+
if resource.observed:
|
|
6
|
+
if resource.autoReady or (resource.autoReady is None and composite.autoReady):
|
|
7
|
+
if resource.ready is None:
|
|
8
|
+
if _checks.get((resource.apiVersion, resource.kind), _check_default).ready(resource):
|
|
9
|
+
resource.ready = True
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ConditionReady:
|
|
13
|
+
def ready(self, resource):
|
|
14
|
+
return bool(resource.conditions.Ready.status)
|
|
15
|
+
|
|
16
|
+
_checks = {}
|
|
17
|
+
_check_default = ConditionReady()
|
|
18
|
+
|
|
19
|
+
class Check:
|
|
20
|
+
@classmethod
|
|
21
|
+
def __init_subclass__(cls, **kwargs):
|
|
22
|
+
super().__init_subclass__(**kwargs)
|
|
23
|
+
if hasattr(cls, 'apiVersion'):
|
|
24
|
+
_checks[(cls.apiVersion, cls.__name__)] = cls()
|
|
25
|
+
|
|
26
|
+
def ready(self, resource):
|
|
27
|
+
raise NotImplementedError()
|
|
28
|
+
|
|
29
|
+
class AlwaysReady(Check):
|
|
30
|
+
def ready(self, resource):
|
|
31
|
+
return True
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class ClusterRole(AlwaysReady):
|
|
35
|
+
apiVersion = 'rbac.authorization.k8s.io/v1'
|
|
36
|
+
|
|
37
|
+
class ClusterRoleBinding(AlwaysReady):
|
|
38
|
+
apiVersion = 'rbac.authorization.k8s.io/v1'
|
|
39
|
+
|
|
40
|
+
class ConfigMap(AlwaysReady):
|
|
41
|
+
apiVersion = 'v1'
|
|
42
|
+
|
|
43
|
+
class CronJob(Check):
|
|
44
|
+
apiVersion = 'batch/v1'
|
|
45
|
+
def ready(self, resource):
|
|
46
|
+
if resource.observed.spec.suspend and len(resource.observed.spec.suspend):
|
|
47
|
+
return True
|
|
48
|
+
if not resource.status.lastScheduleTime:
|
|
49
|
+
return False
|
|
50
|
+
if resource.status.active:
|
|
51
|
+
return True
|
|
52
|
+
if not resource.status.lastSuccessfulTime:
|
|
53
|
+
return False
|
|
54
|
+
return str(resource.status.lastSuccessfulTime) >= str(resource.status.lastScheduleTime)
|
|
55
|
+
|
|
56
|
+
class DaemonSet(Check):
|
|
57
|
+
apiVersion = 'apps/v1'
|
|
58
|
+
def ready(self, resource):
|
|
59
|
+
if not resource.status.desiredNumberScheduled:
|
|
60
|
+
return False
|
|
61
|
+
scheduled = resource.status.desiredNumberScheduled
|
|
62
|
+
return (scheduled == resource.status.numberReady and
|
|
63
|
+
scheduled == resource.status.updatedNumberScheduled and
|
|
64
|
+
scheduled == resource.status.numberAvailable
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
class Deployment(Check):
|
|
68
|
+
apiVersion = 'apps/v1'
|
|
69
|
+
def ready(self, resource):
|
|
70
|
+
replicas = resource.observed.spec.replicas or 1
|
|
71
|
+
if resource.status.updatedReplicas != replicas or resource.status.availableReplicas != replicas:
|
|
72
|
+
return False
|
|
73
|
+
return bool(resource.conditions.Available.status)
|
|
74
|
+
|
|
75
|
+
class HorizontalPodAutoscaler(Check):
|
|
76
|
+
apiVersion = 'autoscaling/v2'
|
|
77
|
+
def ready(self, resource):
|
|
78
|
+
for type in ('FailedGetScale', 'FailedUpdateScale', 'FailedGetResourceMetric', 'InvalidSelector'):
|
|
79
|
+
if resource.conditions[type].status:
|
|
80
|
+
return False
|
|
81
|
+
for type in ('ScalingActive', 'ScalingLimited'):
|
|
82
|
+
if resource.conditions[type].status:
|
|
83
|
+
return True
|
|
84
|
+
return False
|
|
85
|
+
|
|
86
|
+
class Ingress(Check):
|
|
87
|
+
apiVersion = 'networking.k8s.io/v1'
|
|
88
|
+
def ready(self, resource):
|
|
89
|
+
return len(resource.status.loadBalancer.ingress) > 0
|
|
90
|
+
|
|
91
|
+
class Job(Check):
|
|
92
|
+
apiVersion = 'batch/v1'
|
|
93
|
+
def ready(self, resource):
|
|
94
|
+
for type in ('Failed', 'Suspended'):
|
|
95
|
+
if resource.conditions[type].status:
|
|
96
|
+
return False
|
|
97
|
+
return bool(resource.conditions.Complete.status)
|
|
98
|
+
|
|
99
|
+
class Namespace(AlwaysReady):
|
|
100
|
+
apiVersion = 'v1'
|
|
101
|
+
|
|
102
|
+
class PersistentVolumeClaim(Check):
|
|
103
|
+
apiVersion = 'v1'
|
|
104
|
+
def ready(self, resource):
|
|
105
|
+
return resource.status.phase == 'Bound'
|
|
106
|
+
|
|
107
|
+
class Pod(Check):
|
|
108
|
+
apiVersion = 'v1'
|
|
109
|
+
def ready(self, resource):
|
|
110
|
+
if resource.status.phase == 'Succeeded':
|
|
111
|
+
return True
|
|
112
|
+
if resource.status.phase == 'Running':
|
|
113
|
+
if resource.observed.spec.restartPolicy == 'Always':
|
|
114
|
+
if resource.conditions.Ready.status:
|
|
115
|
+
return True
|
|
116
|
+
return False
|
|
117
|
+
|
|
118
|
+
class ReplicaSet(Check):
|
|
119
|
+
apiVersion = 'v1'
|
|
120
|
+
def ready(self, resource):
|
|
121
|
+
if int(resource.status.observedGeneration) < int(resource.observed.metadata.generation):
|
|
122
|
+
return False
|
|
123
|
+
if resource.conditions.ReplicaFailure.status:
|
|
124
|
+
return False
|
|
125
|
+
return int(resource.status.availableReplicas) >= int(resource.observed.spec.replicas or 1)
|
|
126
|
+
|
|
127
|
+
class Role(AlwaysReady):
|
|
128
|
+
apiVersion = 'rbac.authorization.k8s.io/v1'
|
|
129
|
+
|
|
130
|
+
class RoleBinding(AlwaysReady):
|
|
131
|
+
apiVersion = 'rbac.authorization.k8s.io/v1'
|
|
132
|
+
|
|
133
|
+
class Secret(AlwaysReady):
|
|
134
|
+
apiVersion = 'v1'
|
|
135
|
+
|
|
136
|
+
class Service(Check):
|
|
137
|
+
apiVersion = 'v1'
|
|
138
|
+
def ready(self, resource):
|
|
139
|
+
if resource.observed.spec.type != 'LoadBalancer':
|
|
140
|
+
return True
|
|
141
|
+
return len(resource.status.loadBalancer.ingress) > 0
|
|
142
|
+
|
|
143
|
+
class ServiceAccount(AlwaysReady):
|
|
144
|
+
apiVersion = 'v1'
|
|
145
|
+
|
|
146
|
+
class StatefulSet(Check):
|
|
147
|
+
apiVersion = 'apps/v1'
|
|
148
|
+
def ready(self, resource):
|
|
149
|
+
replicas = resource.observed.spec.replicas or 1
|
|
150
|
+
return (resource.status.readyReplicas == replicas and
|
|
151
|
+
resource.status.currentReplicas == replicas and
|
|
152
|
+
resource.status.currentRevision == resource.status.updateRevision
|
|
153
|
+
)
|
|
@@ -50,6 +50,11 @@ class Command:
|
|
|
50
50
|
action='store_true',
|
|
51
51
|
help='Allow oversized protobuf messages',
|
|
52
52
|
)
|
|
53
|
+
parser.add_argument(
|
|
54
|
+
'--crossplane-v1',
|
|
55
|
+
action='store_true',
|
|
56
|
+
help='Enable Crossplane V1 compatibility mode',
|
|
57
|
+
)
|
|
53
58
|
|
|
54
59
|
def __init__(self, args):
|
|
55
60
|
self.args = args
|