Skip to content

Field Rename

What it does

Renames a field from one path to another, preserving its value and shape exactly. The simplest and most common strategy — most real API version migrations are mostly this.

When to use it

A field's meaning is unchanged between versions, only its name is different. If the field's type also needs to change (e.g. string → integer), see Type Coerce instead, or combine both in a forEach if it's inside an array.

Always lossless

Both directions preserve the value exactly — nothing is computed, dropped, or defaulted.

Example

The hub renamed storageGB from the spoke's storageSize:

spec:
  properties:
    storageGB:
      type: string
spec:
  properties:
    storageSize:
      type: string

Rule

- strategy: FieldRename
  fieldRename:
    hubPath: spec.storageGB
    spokePath: spec.storageSize

Objects

apiVersion: example.org/v2
kind: XWidget
spec:
  storageGB: "500"
apiVersion: example.org/v1
kind: XWidget
spec:
  storageSize: "500"

fieldRename applies identically to status.* paths — see XRDConversionConfig: status fields.