Revision history for IO-K8s

1.008     2026-03-08 23:36:05Z

1.007     2026-03-08 15:01:36Z
  - Fix import leak: using an IO::K8s class (e.g. use IO::K8s::Api::Core::V1::Secret)
    no longer contaminates the caller's namespace with the k8s DSL function or
    IO::K8s::Role::Resource. Previously, _setup_class used extends (inheritance),
    causing every IO::K8s subclass to inherit Resource's import method and re-run
    _setup_class on any package that loaded it. Now uses Moo::Role composition
    (apply_roles_to_package) instead, so the import method stays in IO::K8s::Resource.
  - IO::K8s::Resource no longer composes IO::K8s::Role::Resource itself (it is
    NOT a resource, it is the DSL/setup class).
  - _k8s_attr_info is now called as a method on the target class (via the composed
    Role::Resource) instead of as a direct function call on IO::K8s::Resource.
  - Added regression test t/27_no_import_leak.t.

1.006     2026-03-01 02:55:20Z
  - Fix struct_to_object destroying pre-built objects: when a typed IO::K8s
    object was passed into a parent constructor (e.g. PersistentVolumeClaim in
    StatefulSet.volumeClaimTemplates), _inflate_struct treated the blessed
    object as a non-HASH ref and returned {}, producing an empty object.
    Now passes through objects that already match the expected class.
  - Harden _inflate_struct against blessed objects: if a blessed object
    reaches _inflate_struct despite the struct_to_object guard, it now
    extracts data via TO_JSON instead of silently returning {}.
  - Add explicit Scalar::Util import to IO::K8s (was used unimported).
  - Added comprehensive test suite: passthrough tests (t/23), combination
    tests with 35 subtests (t/24), real-world YAML manifest round-trip tests
    from popular projects like Kubernetes Dashboard, CoreDNS, Prometheus,
    Argo CD, NGINX Ingress, Grafana (t/25), and build-and-verify tests
    constructing manifests via Perl API and checking output (t/26).
    Total: 1047 assertions across 29 test files.

1.005     2026-02-28 06:43:29Z
  - Fixed _inflate_struct not recognizing sanitized field names (x-kubernetes-*,
    $ref, etc.) during JSON deserialization — Bool coercion and type inflation
    were skipped for these fields, causing JSON::PP::Boolean type constraint
    failures on e.g. x-kubernetes-preserve-unknown-fields

1.004     2026-02-28 05:42:53Z
  - Fixed JSONSchemaProps compilation: field names with special characters
    ($ref, $schema, x-kubernetes-*) are now automatically sanitized to valid
    Perl identifiers (e.g. _ref, _schema, x_kubernetes_embedded_resource)
    with init_arg mapping so constructors still accept the original JSON keys
  - Added comprehensive compile test (t/02_compile_all.t) loading all 697 modules

1.003     2026-02-28 00:35:50Z

1.002     2026-02-23 02:37:32Z
  - Added Authorization API types to default resource map
    (SelfSubjectRulesReview, SelfSubjectAccessReview, SubjectAccessReview,
    LocalSubjectAccessReview)
  - Added Authentication API types to default resource map
    (TokenReview, TokenRequest, SelfSubjectReview)

1.001     2026-02-14 19:07:12Z
  - Added IO::K8s::Types::Net with Net::IP-backed IP/CIDR type constraints
  - Added convenience methods to IO::K8s::Role::APIObject: labels, annotations,
    status conditions, and owner references for all API objects
  - Added IO::K8s::Role::SpecBuilder for deep-path spec manipulation on CRD classes
  - Added IO::K8s::Role::NetworkPolicy for building network policies (core K8s + Cilium)
  - Added IO::K8s::Role::Routable for HTTP/gRPC routing (Ingress, HTTPRoute, IngressRoute)
  - Added IO::K8s::Role::CertManaged for cert-manager Certificate/Issuer building
  - Added IO::K8s::Role::HelmManaged for K3s HelmChart/HelmChartConfig building
  - Added IO::K8s::Role::Loadbalanced for TraefikService traffic distribution
  - Added IO::K8s::Role::MiddlewareBuilder for Traefik middleware configuration
  - SpecBuilder is auto-applied to all CRD classes via IO::K8s::APIObject import
  - Added Net::IP as dependency
  - Added IO::K8s::Traefik with 10 Traefik CRD classes (traefik.io/v1alpha1)
  - Added IO::K8s::K3s with 3 K3s CRD classes (helm.cattle.io/v1 and k3s.cattle.io/v1)
  - Added IO::K8s::CertManager with 6 cert-manager CRD classes (cert-manager.io/v1 and acme.cert-manager.io/v1)
  - Added IO::K8s::GatewayAPI with 5 Gateway API CRD classes (gateway.networking.k8s.io/v1 and v1beta1)
  - Added IO::K8s::Cilium with 23 Cilium CRD classes (cilium.io/v2 and cilium.io/v2alpha1)
  - Added IO::K8s::Role::ResourceMap for external resource map providers
  - Added add() method to merge external resource maps (e.g. CRD packages)
  - Added 'with' constructor parameter for merging resource maps at construction
  - Added domain-qualified resource names (api_version/Kind) for collision handling
  - expand_class(), new_object(), inflate() now support api_version disambiguation
  - pk8s DSL functions accept optional api_version second argument
  - resource_map default now returns a copy per instance (safe for mutation)
  - Updated original author email and copyright holder

1.000     2026-02-13 01:52:24Z
  - Major refactoring: Migrated from Moose to Moo for lighter dependencies
  - Replaced YAML::XS with YAML::PP for pure Perl implementation
  - Updated to Kubernetes v1.31 API objects
  - New IO::K8s::List class for unified list handling
  - Improved attribute metadata handling with IO::K8s::Resource
  - Added IO::K8s::APIObject and IO::K8s::Role::APIObject for better API object support
  - Added support for namespaced resources via IO::K8s::Role::Namespaced
  - Added resource_plural support to IO::K8s::Role::APIObject for CRD classes
  - IO::K8s::APIObject accepts import parameters (api_version, resource_plural) for CRDs
  - IO::K8s::AutoGen supports CRD metadata (api_version, kind, resource_plural, is_namespaced)
  - expand_class recognizes already-loaded classes (needed for CRD classes)
  - Improved JSON serialization with canonical output
  - Better handling of opaque fields (fieldsV1, rawExtension, raw)
  - Deprecation stubs for removed List classes (backwards compatibility)
  - Added IO::K8s::Types for Type::Tiny type library integration

0.04     2018-12-11 00:00:00Z
  - Update to Kubernetes v1.14 API objects

0.03     2018-05-15 00:00:00Z
  - add convenience to_json method to all objects (meis)
  - add Test::Exception as dependency (manwar)

0.02     2018-05-08 00:00:00Z
  - Kubernetes API sometimes returns key => undef. We handle this not initializing the attribute to undef,
    since it's functionally the same to initialize it to undef or not initialize it

0.01     2018-05-04 00:00:00Z
  - Initial release to an unsuspecting world
