Skip to content

v0.9.1

Choose a tag to compare

@github-actions github-actions released this 25 Apr 22:40
· 68 commits to main since this release

Added

  • docs/export-to-kro-crossplane/ — third worked-example POC: kro RGD targeting Crossplane provider-aws managed resources. Hybrid of the other two POCs — kro's CEL substitution + lifecycle for the RGD shape, Upbound's provider-aws CRDs (eks.aws.upbound.io/v1beta1, iam.aws.upbound.io/v1beta1, …) for the managed resources. Useful when you want kro's CEL flexibility (string concat, json.marshal, .map() iteration) over Crossplane's narrower transforms vocabulary, but you want the Crossplane provider-aws CRD catalogue (much wider AWS coverage than ACK's). 95% identical to the kro+ACK POC — only deltas are the CROSSPLANE_MAPPING table (Upbound apiVersions + Terraform-style camelCase attribute names: roleArn not roleARN, assumeRolePolicy not assumeRolePolicyDocument), the CROSSPLANE_ARN_PATH = "status.atProvider.arn" constant (Upbound puts every status field under atProvider, mirroring the forProvider/atProvider Crossplane convention), and one extra dict-level wrap to put resource fields under spec.forProvider. That isolation is itself a useful finding: the export schema is structured so per-target deltas live in a small mapping table + a couple of constants, not in the generator's overall shape. The bundled README contrasts kro+ACK vs kro+Crossplane vs Crossplane Compositions on every translation axis.

  • docs/export-to-crossplane/ — second worked-example POC for the export prototype. Sibling to the existing kro/ACK POC: same input fixture, different target. Consumes the export JSON to emit a Crossplane Composition + CompositeResourceDefinition (XRD) targeting the Upbound provider-aws managed resources. ~350 LOC of stdlib-only Python translates: Terraform variables → XRD spec.parameters schema; variable refs → declarative patches with fromFieldPath; format("%s-y", var.X) → patch with a string transform; nested blocks → spec.forProvider.<camelCased> recursively; static jsonencode round-trips to a literal JSON string in the resource base. Cross-resource refs (e.g. aws_iam_role.cluster.arn) are deliberately TODO'd — Crossplane has several ref mechanisms (named ResourceRef, MatchControllerRef, external-name annotations) and picking wrong silently produces working-looking-but-incorrect output. Dynamic blocks point at Composition Functions (function-go-templating / function-patch-and-transform) since classic Compositions can't iterate. The bundled README contrasts kro vs Crossplane on every translation axis (variable-substitution CEL vs declarative patches, ref-via-traversal vs explicit-policy refs, function calls via CEL vs a transforms vocabulary, iteration via .map() vs Composition Functions) — the side-by-side validates that the export schema is target-portable rather than implicitly kro-shaped.