All notable changes to this project will be documented in this file.
- Add support to override kube crate (#1173).
- Add support to provide
#[versioned(crd(scale(...)))]argument to enable the/scalesubresource (#1185).
- Fix inconsistent use of
.into()functions in enumFromimpls with variant data (#1109).
- Add new
#[versioned(hint)]argument to provide type hints for struct fields (#1089).#[versioned(hint(option))]for fields wrapped in anOption. Generates.map(Into::into).#[versioned(hint(vec))]for fields wrapped in anVec. Generates.into_iter().map(Into::into).collect().
- Correctly emit enum variant fields in
Fromimpl blocks (#1086).
- Replace the hardcoded
::stackable_versionedpath in thetracking_fromfunction with the configurable crate override (#1079).
- Add support for conversion tracking (#1056).
- Add new
nestedattribute which can be applied to struct fields to be able to track nested conversions in sub structs. - Re-introduce
skiparguments:skip(from, object_from, merged_crd, try_convert). Consult the documentation for details about these flags and where they can be applied.
- Add new
- Add support for CRD conversions via ConversionReviews (#1050, #1061).
- Add new
try_convertfunction to convert objects received via a ConversionReview. - Add new
enable_tracingoption to#[versioned(k8s(options(...)))]. - Add a
<Object>Versionenum withfrom_api_version,as_version_strandas_api_version_strfunctions.
- Add new
- Implement basic ground work for downgrading custom resources (#1033).
- Emit
Fromimplementations 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
versionedcrate override tok8s(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.
- Emit
- Add
kube_clientcrate override tok8s(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).
- 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 ofk8s(...).
- BREAKING: The (optional) status of a CRD needs to implement
Default(#1056). - BREAKING: The version enum used in
merged_crdis now suffixed withVersion(#1050). - BREAKING: The
convert_withparameter of thechanged()action was renamed and split into two parts to be able to control the conversion during upgrades and downgrades:upgrade_withanddowngrade_with(#1033).
- 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).
- BREAKING: The
#[versioned(k8s(skip(merged_crd)))]flag has been removed (#1050). - BREAKING: Remove unused
AsVersionStrtrait (#1033).
- Fix and add snapshot/compile tests for Kubernetes-specific features (#1033).
- Combine snapshot and compile tests (#1041).
- Correctly emit generic type parameter defaults in enum/struct definition blocks (#991).
- Change
statusfield type tosyn::PathinKubernetesArgumentsandKubernetesOptions(#982).
- 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).
- BREAKING: Move
preserve_moduleoption intooptionsto unify option interface (#961).
- Add support for multiple k8s
shortnamearguments (#958).
- 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, andshortnamearguments through to the#[kube]derive attribute (#914). - Add support for overriding
kube::coreandk8s_openapiin generated code (#914).
- BREAKING: Remove {write,print}_merged_crd functions (#924).
- BREAKING: Remove the
CustomResourcederive (#914).
- Simplify crate override handling and generation (#919).
- Bump Rust to 1.82.0 (#891).
- Refactor the Override type (#922).
- 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).
- Add basic handling for enum variants with data (#892).
- Accept a wider variety of formatting styles in the macro testing regex (#892).
- 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).
- Add forwarding of
singular,plural, andnamespacedarguments ink8s()(#873). - Generate a
Versionenum containing all declared versions as variants (#872).
- BREAKING: The
merged_crdfunction now acceptsSelfinstead of a dedicatedVersionenum (#875). - The
merged_crdassociated function now takesVersioninstead of&stras input (#872).
- Add
from_nameparameter validation (#865). - Add new
from_typeparameter tochanged()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).
- BREAKING: Rename
renamed()action tochanged()and renamedfromparameter tofrom_name(#844). - Bump syn to 2.0.77 (#857).
- 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).
- Add support for versioned enums (#813).
- Add collision check for renamed fields (#804).
- Add auto-generated
From<OLD> for NEWimplementations (#790).
- 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).
- Bump Rust dependencies and GitHub Actions (#782).