Skip to main content

Crate crossplane_forge

Crate crossplane_forge 

Source
Expand description

Crossplane CRD generator from IaC forge IR.

Implements iac_forge::Backend to produce Kubernetes CustomResourceDefinition YAML from the iac-forge intermediate representation. Each IacResource becomes a namespaced CRD with forProvider (input) and atProvider (output) specs, plus standard Crossplane conditions and printer columns.

Re-exports§

pub use backend::CrossplaneBackend;
pub use controller_gen::ControllerConfig;
pub use controller_gen::render_controller;
pub use error::CrdError;
pub use go_spec::GoFieldSpec;
pub use go_spec::GoFuncBodySpec;
pub use go_spec::GoFuncSpec;
pub use go_spec::GoImportSpec;
pub use go_spec::GoItemSpec;
pub use go_spec::GoMarkerSpec;
pub use go_spec::GoParamSpec;
pub use go_spec::GoSpec;
pub use go_spec::GoStructSpec;
pub use go_spec::GoTagSpec;
pub use go_spec::GoTypeSpec;
pub use provider_gen::render_go_mod;
pub use provider_gen::render_helm_chart_yaml;
pub use provider_gen::render_helm_deployment_template;
pub use provider_gen::render_helm_rbac_template;
pub use provider_gen::render_helm_values_yaml;
pub use provider_gen::render_main_go;
pub use provider_gen::render_provider_config_types;
pub use provider_gen::render_provider_groupversion_info;
pub use provider_gen::render_setup_go;
pub use types_gen::render_groupversion_info;
pub use types_gen::render_resource_types;

Modules§

backend
Backend trait implementation and naming convention.
body_signatures
Schema-driven body-field signatures pulled from the OpenAPI spec. Drives M6.4 — build_request_body consults this to skip pushes where the IacAttribute disagrees with the SDK body’s field shape. Schema-driven body-field signatures pulled from an OpenAPI 3.x spec.
controller_gen
Crossplane controller Go-code emitter (per-resource ExternalClient impl). Crossplane controller emitter — produces a per-resource controller .go file implementing the crossplane-runtime ExternalClient interface (Observe / Create / Update / Delete) plus the manager- wiring Setup function and the connector that resolves a ProviderConfig into an external client.
crd
CRD YAML generation helpers.
deepcopy_gen
Per-package deepcopy emitter (zz_generated_deepcopy.go). zz_generated_deepcopy.go emitter — produces the DeepCopyObject / DeepCopy / DeepCopyInto trio every k8s.io/apimachinery/pkg/runtime.Object impl needs to satisfy controller-runtime’s scheme registration.
error
Typed errors for CRD generation.
go_spec
The Go macro-farm surface — typed, serde-serializable Go-codegen specs (go_spec::GoSpec) that lower to go_synthesizer::GoFile and render through go_synthesizer::print_file. The Go analog of tatara-rust-ast’s *DeriveSpec family. go_spec — the Go macro-farm surface.
managed_methods_gen
Per-Kind managed.Resource interface methods emitter (zz_generated_managed.go). zz_generated_managed.go emitter — produces the crossplane-runtime/pkg/resource.Managed interface methods that every Crossplane-managed Kind has to expose. All methods are mechanical delegations to the embedded xpv1.ResourceSpec / xpv1.ResourceStatus fields.
provider_gen
Provider-runtime scaffold emitter (ProviderConfig types, main.go, setup.go, go.mod, Helm chart files). Provider-runtime scaffold emitter.
types_gen
Crossplane managed-resource Go-types emitter. Crossplane-managed-resource Go-types emitter.