Skip to content

v1beta2 contract: add conversion webhooks for v1beta3 #6113

Description

@damdo

Parent: #5448

Since v1beta2 remains the storage version, conversion webhooks must handle round-tripping between v1beta2 (storage) and v1beta3 (served). The existing v1beta1 ↔ v1beta2 conversion also needs updating to handle the new fields.

v1beta2 ↔ v1beta3 conversion

v1beta2 (storage) v1beta3 (served)
status.ready status.initialization.provisioned + status.deprecated.v1beta1.ready
status.conditions (clusterv1beta1) status.deprecated.v1beta1.conditions
status.v1beta2.conditions (metav1) status.conditions (metav1, top-level)
status.failureDomains (map) status.failureDomains (list)
status.failureReason / status.failureMessage status.deprecated.v1beta1.failureReason / .failureMessage
spec.providerID (*string) spec.providerID (string)
status.dataSecretName (*string) status.dataSecretName (string)
status.replicas (int32) status.replicas (*int32)

v1beta1 ↔ v1beta3 conversion

Can chain through v1beta2 (v1beta1 → v1beta2 → v1beta3) or convert directly. Direct conversion is more efficient but more code to maintain.

Key constraint

v1beta2 remains storage, so v1beta3 → v1beta2 → v1beta3 must be lossless. Fields that only exist in v1beta3 (e.g., Initialization, Deprecated) must be preserved via annotation marshaling (conversion.MarshalData/UnmarshalData) when converting to v1beta2 for storage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiIssues or PRs related to the APIsneeds-priorityneeds-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions