Skip to content

Latest commit

 

History

History
304 lines (210 loc) · 11.4 KB

File metadata and controls

304 lines (210 loc) · 11.4 KB

Changelog

All notable changes to this project will be documented in this file.

[Unreleased]

[0.9.0] - 2026-04-07

Added

  • Add support to override kube crate (#1173).
  • Add support to provide #[versioned(crd(scale(...)))] argument to enable the /scale subresource (#1185).

[0.8.3] - 2025-10-23

Fixed

  • Fix inconsistent use of .into() functions in enum From impls with variant data (#1109).

[0.8.2] - 2025-09-09

Added

  • Add new #[versioned(hint)] argument to provide type hints for struct fields (#1089).
    • #[versioned(hint(option))] for fields wrapped in an Option. Generates .map(Into::into).
    • #[versioned(hint(vec))] for fields wrapped in an Vec. Generates .into_iter().map(Into::into).collect().

Fixed

  • Correctly emit enum variant fields in From impl blocks (#1086).

[0.8.1] - 2025-08-21

Fixed

  • Replace the hardcoded ::stackable_versioned path in the tracking_from function with the configurable crate override (#1079).

[0.8.0] - 2025-07-10

Added

  • Add support for conversion tracking (#1056).
    • Add new nested attribute which can be applied to struct fields to be able to track nested conversions in sub structs.
    • Re-introduce skip arguments: skip(from, object_from, merged_crd, try_convert). Consult the documentation for details about these flags and where they can be applied.
  • Add support for CRD conversions via ConversionReviews (#1050, #1061).
    • Add new try_convert function to convert objects received via a ConversionReview.
    • Add new enable_tracing option to #[versioned(k8s(options(...)))].
    • Add a <Object>Version enum with from_api_version, as_version_str and as_api_version_str functions.
  • Implement basic ground work for downgrading custom resources (#1033).
    • Emit From implementations to downgrade custom resource specs.
    • Emit a status struct to be able to track values required during downgrades and upgrades of custom resources. The generation of code for this feature is opt-in and must be enabled by adding the k8s(options(experimental_conversion_tracking)) flag.
    • Add versioned crate override to k8s(crates()) to specify a custom import path. This override will not be passed to the #[kube()] attribute, but will only be available to internal #[versioned] macro code.
  • Add kube_client crate override to k8s(crates()) to specify a custom import path. This override will not be passed to the #[kube()] attribute, but will only be available to internal #[versioned] macro code (#1038).

Changed

  • Introduce various breaking changed to the macro attribute interface (#1056).
    • BREAKING: The macro can only be applied to modules now.
    • BREAKING: Crate overrides are now done at the module level, not the container level.
    • BREAKING: Top-level CRD specs now use crd(...) instead of k8s(...).
  • BREAKING: The (optional) status of a CRD needs to implement Default (#1056).
  • BREAKING: The version enum used in merged_crd is now suffixed with Version (#1050).
  • BREAKING: The convert_with parameter of the changed() action was renamed and split into two parts to be able to control the conversion during upgrades and downgrades: upgrade_with and downgrade_with (#1033).

Fixed

  • Fix incorrectly generated match arms for the version enum (#1065).
  • Fix regression introduced in #1033. The #[kube(status = ...)] attribute is generated correctly again (#1046).
  • Correctly handle fields added in later versions (#1031).
  • BREAKING: Unsupported items in a versioned module now emit an error instead of silently being dropped (#1059).

Removed

  • BREAKING: The #[versioned(k8s(skip(merged_crd)))] flag has been removed (#1050).
  • BREAKING: Remove unused AsVersionStr trait (#1033).

Miscellaneous

  • Fix and add snapshot/compile tests for Kubernetes-specific features (#1033).
  • Combine snapshot and compile tests (#1041).

[0.7.1] - 2025-04-02

Fixed

  • Correctly emit generic type parameter defaults in enum/struct definition blocks (#991).

[0.7.0] - 2025-03-17

Changed

  • Change status field type to syn::Path in KubernetesArguments and KubernetesOptions (#982).

[0.6.0] - 2025-02-28

Added

  • Add support for re-emitting and merging modules defined in versioned modules (#971).
  • Add basic support for generic types in struct and enum definitions (#969).

Changed

  • BREAKING: Move preserve_module option into options to unify option interface (#961).

[0.5.1] - 2025-02-14

Added

  • Add support for multiple k8s shortname arguments (#958).

[0.5.0] - 2024-12-03

Added

  • Use visibility of container definition or module for generated CRD enum (#923).
  • Add support to apply the #[versioned()] macro to modules to version all contained items at once (#891).
  • Add support for passing a status, crates, and shortname arguments through to the #[kube] derive attribute (#914).
  • Add support for overriding kube::core and k8s_openapi in generated code (#914).

Removed

  • BREAKING: Remove {write,print}_merged_crd functions (#924).
  • BREAKING: Remove the CustomResource derive (#914).

Changed

  • Simplify crate override handling and generation (#919).
  • Bump Rust to 1.82.0 (#891).
  • Refactor the Override type (#922).

Fixed

  • Emit correct enum ident based on kube/k8s kind argument (#920).
  • Generate Kubernetes code independent of container order (#913).
  • Correctly emit Kubernetes code when macro is used on modules (#912).
  • Use .into() on all field conversions (#925).
  • Remove invalid type comparison on field conversion because the semantics are unknown (#925).
  • Check whether to skip all from impls when versioning a module (#926).

[0.4.1] - 2024-10-23

Added

  • Add basic handling for enum variants with data (#892).

Fixed

  • Accept a wider variety of formatting styles in the macro testing regex (#892).

[0.4.0] - 2024-10-14

Added

  • Add YAML serialization for merged CRD schema. The schema can now be printed to stdout or written to file (#884).
  • Add snapshot tests to verify generated code matches expected output (#881).

[0.3.0] - 2024-09-26

Added

  • Add forwarding of singular, plural, and namespaced arguments in k8s() (#873).
  • Generate a Version enum containing all declared versions as variants (#872).

Changed

  • BREAKING: The merged_crd function now accepts Self instead of a dedicated Version enum (#875).
  • The merged_crd associated function now takes Version instead of &str as input (#872).

[0.2.0] - 2024-09-19

Added

  • Add from_name parameter validation (#865).
  • Add new from_type parameter to changed() action (#844).
  • Pass through container and item attributes (including doc-comments). Add attribute for version specific docs (#847).
  • Forward container visibility to generated modules (#850).
  • Add support for Kubernetes-specific features (#857).
  • Add use super::* to version modules to be able to use imported types (#859).

Changed

  • BREAKING: Rename renamed() action to changed() and renamed from parameter to from_name (#844).
  • Bump syn to 2.0.77 (#857).

Fixed

  • Report variant rename validation error at the correct span and trim underscores from variants not using PascalCase (#842).
  • Emit correct struct field types for fields with no changes (NoChange) (#860).

[0.1.1] - 2024-07-10

Added

  • Add support for versioned enums (#813).
  • Add collision check for renamed fields (#804).
  • Add auto-generated From<OLD> for NEW implementations (#790).

Changed

  • Remove duplicated code and unified struct/enum and field/variant code (#820).
  • Change from derive macro to attribute macro to be able to generate code in place instead of appending new code (#793).
  • Improve action chain generation (#784).
  • Bump rust-toolchain to 1.79.0 (#822).

[0.1.0] - 2024-05-08

Changed

  • Bump Rust dependencies and GitHub Actions (#782).