Skip to content

detect and handle CRD breaking changes #186

@a-hilaly

Description

@a-hilaly

Feature Description

Currently kro does not detect breaking changes in ResourceGroup schemas when users modify them. Breaking changes like adding new required fields or removing existing fields can cause instance reconciliation failures. we need to add support for detecting such changes and marking the ResourceGroup as invalid. The system should also support an annotation
(kro.run/allow-breaking-changes: "true") to explicitly allow these changes when needed.

Examples:

# Original ResourceGroup schema
apiVersion: kro.run/v1alpha1
kind: ResourceGroup
metadata:
  name: my-application
spec:
  schema:
    spec:
      name: string
      image: string | default="nginx"
# Breaking change - adding a required field without default value
apiVersion: kro.run/v1alpha1
kind: ResourceGroup
metadata:
  name: my-application
  annotations:
    kro.run/allow-breaking-changes: "true"  # Required to apply breaking changes
spec:
  schema:
    spec:
      name: string
      image: string | default="nginx"
      port: number | require=true  # Breaking change: new required field

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions