crossplane-function-pythonic 0.6.1__tar.gz → 0.6.2__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.
Files changed (134) hide show
  1. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/PKG-INFO +7 -6
  2. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/README.md +1 -0
  3. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/__about__.py +1 -1
  4. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/composite.py +1 -0
  5. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/function.py +23 -10
  6. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/packages.py +14 -10
  7. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/render.py +6 -2
  8. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/pyproject.toml +4 -4
  9. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/.gitignore +0 -0
  10. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/LICENSE +0 -0
  11. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/__init__.py +0 -0
  12. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/__main__.py +0 -0
  13. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/auto_ready.py +0 -0
  14. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/command.py +0 -0
  15. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/grpc.py +0 -0
  16. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/main.py +0 -0
  17. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/proto/v1/run_function.proto +0 -0
  18. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/proto/v1/run_function_pb2.py +0 -0
  19. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/proto/v1/run_function_pb2.pyi +0 -0
  20. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/proto/v1/run_function_pb2_grpc.py +0 -0
  21. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/protobuf.py +0 -0
  22. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/crossplane/pythonic/version.py +0 -0
  23. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/aks-cluster/README.md +0 -0
  24. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/aks-cluster/aks/kubernetescluster.py +0 -0
  25. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/aks-cluster/aks/resourcegroup.py +0 -0
  26. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/aks-cluster/cluster-function-pythonic.yaml +0 -0
  27. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/aks-cluster/composition.yaml +0 -0
  28. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/aks-cluster/definition.yaml +0 -0
  29. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/aks-cluster/install.sh +0 -0
  30. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/aks-cluster/kustomization.yaml +0 -0
  31. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/aks-cluster/providers.yaml +0 -0
  32. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/aks-cluster/render.sh +0 -0
  33. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/aks-cluster/xr.yaml +0 -0
  34. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/connection-details-composition/composition.yaml +0 -0
  35. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/connection-details-composition/definition.yaml +0 -0
  36. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/connection-details-composition/observed.yaml +0 -0
  37. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/connection-details-composition/render.sh +0 -0
  38. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/connection-details-composition/resources.yaml +0 -0
  39. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/connection-details-composition/xr.yaml +0 -0
  40. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/connections/composition.yaml +0 -0
  41. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/connections/observed.yaml +0 -0
  42. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/connections/render.sh +0 -0
  43. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/connections/resources.yaml +0 -0
  44. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/connections/xr.yaml +0 -0
  45. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/eks-cluster/composition-v2.yaml +0 -0
  46. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/eks-cluster/composition.yaml +0 -0
  47. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/eks-cluster/definition.yaml +0 -0
  48. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/eks-cluster/render-v2.sh +0 -0
  49. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/eks-cluster/render.sh +0 -0
  50. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/eks-cluster/xr.yaml +0 -0
  51. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/filing-system/README.md +0 -0
  52. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/filing-system/composition.yaml +0 -0
  53. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/filing-system/definition.yaml +0 -0
  54. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/filing-system/kustomization.yaml +0 -0
  55. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/filing-system/runtime.yaml +0 -0
  56. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/filing-system/vcluster.py +0 -0
  57. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/filing-system/vcluster.yaml +0 -0
  58. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/conditions/composition.yaml +0 -0
  59. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/conditions/render.sh +0 -0
  60. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/conditions/xr.yaml +0 -0
  61. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/conditions/xrd.yaml +0 -0
  62. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/context/composition.yaml +0 -0
  63. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/context/render.sh +0 -0
  64. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/context/resources.yaml +0 -0
  65. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/context/xr.yaml +0 -0
  66. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/context/xrd.yaml +0 -0
  67. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/fromYaml/composition.yaml +0 -0
  68. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/fromYaml/render.sh +0 -0
  69. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/fromYaml/xr.yaml +0 -0
  70. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/getComposedResource/composition.yaml +0 -0
  71. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/getComposedResource/observed.yaml +0 -0
  72. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/getComposedResource/render.sh +0 -0
  73. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/getComposedResource/xr.yaml +0 -0
  74. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/getCompositeResource/composition.yaml +0 -0
  75. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/getCompositeResource/render.sh +0 -0
  76. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/getCompositeResource/xr.yaml +0 -0
  77. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/getCredentialData/composition.yaml +0 -0
  78. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/getCredentialData/render.sh +0 -0
  79. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/getCredentialData/resources.yaml +0 -0
  80. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/getCredentialData/xr.yaml +0 -0
  81. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/getResourceCondition/composition.yaml +0 -0
  82. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/getResourceCondition/observed.yaml +0 -0
  83. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/getResourceCondition/render.sh +0 -0
  84. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/getResourceCondition/xr.yaml +0 -0
  85. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/include/composition.yaml +0 -0
  86. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/include/render.sh +0 -0
  87. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/include/xr.yaml +0 -0
  88. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/toYaml/composition.yaml +0 -0
  89. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/toYaml/render.sh +0 -0
  90. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/functions/toYaml/xr.yaml +0 -0
  91. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/inline/composition.yaml +0 -0
  92. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/inline/render.sh +0 -0
  93. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/inline/xr.yaml +0 -0
  94. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/recursive/composition-real.yaml +0 -0
  95. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/recursive/composition.yaml +0 -0
  96. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/recursive/render.sh +0 -0
  97. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/recursive/xr.yaml +0 -0
  98. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/required-resources/composition.yaml +0 -0
  99. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/required-resources/render.sh +0 -0
  100. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/required-resources/resources.yaml +0 -0
  101. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-go-templating/required-resources/xr.yaml +0 -0
  102. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-sequencer/composition.yaml +0 -0
  103. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-sequencer/observed.yaml +0 -0
  104. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-sequencer/render.sh +0 -0
  105. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-sequencer/sequencer.py +0 -0
  106. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/function-sequencer/xr.yaml +0 -0
  107. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/get-started-app/composition.yaml +0 -0
  108. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/get-started-app/definition.yaml +0 -0
  109. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/get-started-app/observed.yaml +0 -0
  110. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/get-started-app/render.sh +0 -0
  111. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/get-started-app/xr.yaml +0 -0
  112. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/helm-copy-secret/composition.yaml +0 -0
  113. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/helm-copy-secret/kustomization.yaml +0 -0
  114. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/helm-copy-secret/render.sh +0 -0
  115. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/helm-copy-secret/vcluster.py +0 -0
  116. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/helm-copy-secret/xr.yaml +0 -0
  117. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/helm-copy-secret/xrd.yaml +0 -0
  118. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/import-existing-vpc/README.md +0 -0
  119. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/import-existing-vpc/composition.yaml +0 -0
  120. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/import-existing-vpc/definition.yaml +0 -0
  121. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/import-existing-vpc/observed.yaml +0 -0
  122. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/import-existing-vpc/provider-ec2.yaml +0 -0
  123. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/import-existing-vpc/render.sh +0 -0
  124. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/import-existing-vpc/xr.yaml +0 -0
  125. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/inlined/composition.yaml +0 -0
  126. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/inlined/definition.yaml +0 -0
  127. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/inlined/render.sh +0 -0
  128. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/inlined/xr.yaml +0 -0
  129. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/run-all.sh +0 -0
  130. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/usages-extra/composition.yaml +0 -0
  131. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/usages-extra/observed.yaml +0 -0
  132. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/usages-extra/render.sh +0 -0
  133. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/usages-extra/resources.yaml +0 -0
  134. {crossplane_function_pythonic-0.6.1 → crossplane_function_pythonic-0.6.2}/examples/usages-extra/xr.yaml +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: crossplane-function-pythonic
3
- Version: 0.6.1
3
+ Version: 0.6.2
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
@@ -14,15 +14,15 @@ Classifier: Programming Language :: Python :: 3.12
14
14
  Classifier: Programming Language :: Python :: 3.13
15
15
  Classifier: Programming Language :: Python :: 3.14
16
16
  Requires-Python: <3.15,>=3.12
17
- Requires-Dist: grpcio==1.80.0
17
+ Requires-Dist: grpcio==1.83.0
18
18
  Requires-Dist: inflect==7.5.0
19
19
  Requires-Dist: kr8s==0.20.15
20
- Requires-Dist: protobuf==7.35.0
20
+ Requires-Dist: protobuf==7.35.1
21
21
  Requires-Dist: pyyaml==6.0.3
22
22
  Provides-Extra: packages
23
- Requires-Dist: kopf==1.44.5; extra == 'packages'
23
+ Requires-Dist: kopf==1.44.6; extra == 'packages'
24
24
  Provides-Extra: pip-install
25
- Requires-Dist: pip==26.1.1; extra == 'pip-install'
25
+ Requires-Dist: pip==26.2.1; extra == 'pip-install'
26
26
  Description-Content-Type: text/markdown
27
27
 
28
28
  # function-pythonic
@@ -315,6 +315,7 @@ The BaseComposite also provides access to the following Crossplane Function leve
315
315
  | self.context | Map | The response context, initialized from the request context |
316
316
  | self.environment | Map | The response environment, initialized from the request context environment |
317
317
  | self.requireds | Requireds | Request and read additional local Kubernetes resources |
318
+ | self.watched | RequiredResource | THe WatchOperation's changed resource |
318
319
  | self.schemas | Schemas | Request and read CustomResourceDefinition schemas |
319
320
  | self.resources | Resources | Define and process composed resources |
320
321
  | self.usages| Boolean | Generate Crossplane Usages for resource dependencies, default False |
@@ -288,6 +288,7 @@ The BaseComposite also provides access to the following Crossplane Function leve
288
288
  | self.context | Map | The response context, initialized from the request context |
289
289
  | self.environment | Map | The response environment, initialized from the request context environment |
290
290
  | self.requireds | Requireds | Request and read additional local Kubernetes resources |
291
+ | self.watched | RequiredResource | THe WatchOperation's changed resource |
291
292
  | self.schemas | Schemas | Request and read CustomResourceDefinition schemas |
292
293
  | self.resources | Resources | Define and process composed resources |
293
294
  | self.usages| Boolean | Generate Crossplane Usages for resource dependencies, default False |
@@ -1,2 +1,2 @@
1
1
  # This is set at build time, using "hatch version"
2
- __version__ = "0.6.1"
2
+ __version__ = "0.6.2"
@@ -112,6 +112,7 @@ class BaseComposite:
112
112
  self.context = self.response.context
113
113
  self.environment = self.context['apiextensions.crossplane.io/environment']
114
114
  self.requireds = Requireds(self)
115
+ self.watched = self.requireds['ops.crossplane.io/watched-resource'][0]
115
116
  self.schemas = Schemas(self)
116
117
  self.resources = Resources(self)
117
118
  self.autoReady = True
@@ -43,19 +43,26 @@ class FunctionRunner(grpcv1.FunctionRunnerService):
43
43
 
44
44
  async def run_function(self, request):
45
45
  composite = request.observed.composite.resource
46
- name = list(reversed(composite['apiVersion'].split('/')[0].split('.')))
47
- name.append(composite['kind'])
48
- name.append(composite['metadata']['name'])
49
- logger = logging.getLogger('.'.join(name))
50
-
51
- if 'inlined' in request.input and request.input['inlined']:
52
- if 'spec' not in composite or request.input['inlined'] not in composite['spec']:
53
- return self.fatal(request, logger, f"Missing inlined spec.{request.input['inlined']}")
54
- composite = composite['spec'][request.input['inlined']]
46
+ if composite and composite.fields:
47
+ name = list(reversed(composite['apiVersion'].split('/')[0].split('.')))
48
+ name.append(composite['kind'])
49
+ name.append(composite['metadata']['name'])
50
+ logger = logging.getLogger('.'.join(name))
51
+ if 'inlined' in request.input and request.input['inlined']:
52
+ if 'spec' not in composite or request.input['inlined'] not in composite['spec']:
53
+ return self.fatal(request, logger, f"Missing inlined spec.{request.input['inlined']}")
54
+ composite = composite['spec'][request.input['inlined']]
55
+ else:
56
+ if 'composite' not in request.input:
57
+ return self.fatal(request, logger, 'Missing composition input "composite"')
58
+ composite = request.input['composite']
59
+ operation = False
55
60
  else:
61
+ logger = logging.getLogger('operation')
56
62
  if 'composite' not in request.input:
57
- return self.fatal(request, logger, 'Missing input "composite"')
63
+ return self.fatal(request, logger, 'Missing operation input "composite"')
58
64
  composite = request.input['composite']
65
+ operation = True
59
66
 
60
67
  # Ideally this is something the Function API provides
61
68
  if 'step' in request.input:
@@ -97,6 +104,12 @@ class FunctionRunner(grpcv1.FunctionRunnerService):
97
104
  return self.fatal(request, logger, f"{composite} is not a subclass of BaseComposite")
98
105
  self.clazzes[composite] = clazz
99
106
 
107
+ if operation:
108
+ if '\n' in composite:
109
+ logger = logging.getLogger(f"operation.{clazz.__name__}")
110
+ else:
111
+ logger = logging.getLogger(f"operation.{composite}")
112
+
100
113
  try:
101
114
  composite = clazz(self.crossplane_v1, request, logger)
102
115
  except Exception as e:
@@ -158,19 +158,23 @@ def package_delete(action, package_dir, package, logger):
158
158
 
159
159
  def validate_entry(name, value, logger):
160
160
  if isinstance(value, str):
161
- if not name.endswith('.py'):
162
- if '.' in name or '/' in name:
163
- logger.error(f"Python package file name is not valid: {name}")
161
+ if name.endswith('.py'):
162
+ name = name[:-3]
163
+ if not name.isidentifier():
164
+ logger.error(f"Python module name is not an identifier: {name}")
164
165
  return False
165
- return True
166
- name = name[:-3]
167
- elif not isinstance(value, dict):
166
+ else:
167
+ if '/' in name:
168
+ logger.error(f"Python file name is not valid: {name}")
169
+ return False
170
+ elif isinstance(value, dict):
171
+ if not name.isidentifier():
172
+ logger.error(f"Python package name is not an identifier: {name}")
173
+ return False
174
+ else:
168
175
  logger.error(f"Python package \"{name}\" value is not a valid type: {value.__class__}")
169
176
  return False
170
- if name.isidentifier():
171
- return True
172
- logger.error(f"Python package name is not an identifier: {name}")
173
- return False
177
+ return True
174
178
 
175
179
 
176
180
  def package_file_name(package_name):
@@ -287,7 +287,7 @@ class Command(command.Command):
287
287
  context[key_value[0]] = protobuf.Yaml(key_value[1])
288
288
  return context
289
289
 
290
- async def render(self, composite, observed=[], composition=None, resources=[], schemas=[], context=None, api=None, render_unknowns=False, crossplane_v1=False, composite_observeds=True):
290
+ async def render(self, composite, observed=[], composition=None, resources=[], schemas=[], context=None, api=None, render_unknowns=False, crossplane_v1=False, composite_observeds=False):
291
291
  # Create the request used when running Composition steps.
292
292
  request = protobuf.Message(None, 'request', fnv1.RunFunctionRequest.DESCRIPTOR, fnv1.RunFunctionRequest())
293
293
  if context is not None:
@@ -491,7 +491,7 @@ class Command(command.Command):
491
491
  for condition in conditions:
492
492
  composite.status.conditions[protobuf.append] = condition
493
493
 
494
- return protobuf.Map(
494
+ response = protobuf.Map(
495
495
  composite=composite,
496
496
  connection=protobuf.Map(
497
497
  apiVersion='render.crossplane.io/v1beta1',
@@ -506,6 +506,10 @@ class Command(command.Command):
506
506
  values=request.context,
507
507
  ),
508
508
  )
509
+ if composite_observeds:
510
+ for name, resource in request.observed.resources:
511
+ response.observed[name] = resource.resource
512
+ return response
509
513
 
510
514
  async def get_composite_ref(self, composite, ref, request, resources, api):
511
515
  namespace = ref.namespace
@@ -21,16 +21,16 @@ classifiers = [
21
21
  dynamic = ["version"]
22
22
 
23
23
  dependencies = [
24
- "grpcio==1.80.0",
24
+ "grpcio==1.83.0",
25
25
  "inflect==7.5.0",
26
26
  "kr8s==0.20.15",
27
- "protobuf==7.35.0",
27
+ "protobuf==7.35.1",
28
28
  "pyyaml==6.0.3",
29
29
  ]
30
30
 
31
31
  [project.optional-dependencies]
32
- packages = ["kopf==1.44.5"]
33
- pip-install = ["pip==26.1.1"]
32
+ packages = ["kopf==1.44.6"]
33
+ pip-install = ["pip==26.2.1"]
34
34
 
35
35
  [project.urls]
36
36
  Documentation = "https://github.com/crossplane-contrib/function-pythonic#readme"