Skip to content

Support events.k8s.io/v1 Event API version #107

Description

@cuppett

Summary

Add support for the modern events.k8s.io/v1 Event API alongside the existing core/v1 Event.

Motivation

The events.k8s.io/v1 API is the current/preferred Event API. The library currently uses core/v1 which still works but is the legacy API. The modern API has a different structure (uses regarding/related instead of involvedObject, note instead of message, etc.).

Design Considerations

Naming conflict: Both versions use the kind name Event. Options:

  1. Make K8sEvent version-aware via setDefaultVersion() (preferred — mechanism already exists)
  2. Create a separate K8sModernEvent class (ugly but unambiguous)

The setDefaultVersion() approach would require some accessor methods to be version-aware since field structures differ between the two API versions.

Effort: Small-Medium (mostly due to version-aware accessors)

Key Files

  • src/Kinds/K8sEvent.php (modify to support both versions)

Triage update (2026-09-02)

Promoted to Tier 2. The current K8sEvent is core/v1-specific and writes legacy involvedObject; this issue is the production-completeness path for the modern stable Event API.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestresourceNew K8s resource typetier-2Production completeness

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions