Skip to content

Reconciler code generation: generate condition constants for generated Konnect entities #3925

@tao12345666333

Description

@tao12345666333

Problem Statement

Generated Konnect entities currently still require hand-written condition constants in api/konnect/v1alpha1/konnect_conditions.go.

For example, when adding KonnectEventDataPlaneCertificate support in #3890, we had to manually add Event Gateway-specific condition constants such as:

  • EventGatewayRefValidConditionType
  • EventGatewayRefReasonValid
  • EventGatewayRefReasonInvalid
  • EventGatewayRefReasonNotProgrammed

This does not scale as more generated entities and generated reference handlers are introduced. It also creates another manual follow-up step during review, similar to the previously tracked manual SDK ops and RBAC wiring issues.

Proposed Solution

Extend the reconciler/code generation flow so condition constants needed by generated Konnect entities are also generated rather than maintained manually in api/konnect/v1alpha1/konnect_conditions.go.

This likely needs to cover at least:

  1. A source of truth for generated condition definitions
  2. Generation of condition type / reason constants for generated refs and generated entities
  3. A clear decision on whether each generated CRD gets its own condition set, or whether some condition groups should be shared across entities

Additional Information

This issue is intentionally scoped to condition constant generation and the shape of generated condition sets.
It does not cover the implementation of a particular generated entity.

Acceptance Criteria

  • Documentation is updated with this new feature / enhancement
  • Tests are added for this feature / enhancement
  • Helm chart is updated to work with this feature / enhancement
  • As a developer, I can add a generated Konnect entity or generated reference handler without manually adding condition type / reason constants in api/konnect/v1alpha1/konnect_conditions.go

Out of scope

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions