Skip to content

Support referencing instance status fields in RGD resources #762

@a-hilaly

Description

@a-hilaly

Feature Description

Right now resources can reference schema.spec.* and schema.metadata.*, but not schema.status.*.

This would be useful for resources that need to get information directly from instance status.

example:

apiVersion: kro.run/v1alpha1
kind: ResourceGraphDefinition
metadata:
  name: app-with-monitoring
spec:
  schema:
    apiVersion: v1alpha1
    kind: Application
    spec:
      replicas: integer
    status:
      endpoint: string  # computed from service
      
  resources:
    - id: service
      template:
        apiVersion: v1
        kind: Service
        # ... service definition
        
    - id: monitoring-alert
      template:
        apiVersion: monitoring.example.com/v1
        kind: Alert
        spec:
          # Want to reference the computed status field
          target: ${schema.status.endpoint}  # not allowed today

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/runtimekind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions