◐ Shell
clean mode source ↗

improve: getSecondaryResourcesAsStream(expectedType,eventSourceName) does not have to be Kubernetes resources by csviri · Pull Request #3377 · operator-framework/java-operator-sdk

Pull request overview

This PR broadens the Context#getSecondaryResourcesAsStream(Class, String) API so it can be used with non-Kubernetes (non-HasMetadata) secondary resources, aligning it with the framework’s support for external event sources.

Changes:

  • Relaxed the generic bound on getSecondaryResourcesAsStream(Class<R>, String eventSourceName) from R extends HasMetadata to unconstrained R.
  • Updated DefaultContext to match the interface signature change.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/Context.java Updates the public Context API signature to allow streaming non-HasMetadata secondary resources from a named event source.
operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/DefaultContext.java Aligns the concrete implementation method signature with the updated Context contract.