feat: add owners support to OpenMetadata CRDs#3
Merged
Conversation
Add an optional owners field to OpenMetadataService, IngestionPipeline,
and OpenMetadataTestCase CRs so users can declare which users or teams
own each registered entity.
The CRD field accepts a list of EntityReference (fullyQualifiedName +
type), with the EntityType enum extended to include "user" and "team".
At reconcile time, the operator resolves each FQN to an OpenMetadata
UUID via GET /v1/{users|teams}/name/{fqn} and forwards the resolved
{id, type} list in the upsert payload.
Resolution failures surface via the new ReasonOwnerResolutionFailed
condition. Unsupported owner types are treated as permanent spec errors
(no requeue), while not-found and other API errors trigger requeue,
matching the existing pipeline service-ref pattern.
There was a problem hiding this comment.
Pull request overview
Adds first-class owners support across the OpenMetadata operator CRDs and reconciliation flow, allowing users to declare user/team ownership and have the operator resolve and upsert the corresponding OpenMetadata entity references.
Changes:
- Extend CRD/API types to include
spec.forOpenMetadata.ownersfor Service, Pipeline, and TestCase. - Add owner resolution logic (
resolveOwners) and wire it into all three handlers with a newOwnerResolutionFailedcondition reason. - Introduce a typed
omclient.EntityRefand use it for bothownerspayloads and ingestion pipelineservicepayloads.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/omclient/types.go | Adds EntityRef and includes Owners fields in request payloads; makes pipeline Service typed. |
| internal/omclient/pipeline_client_test.go | Updates pipeline upsert test to use typed EntityRef for Service. |
| internal/omclient/interface.go | Adds GetEntityByName to Service/TestCase client interfaces for owner resolution. |
| internal/handler/owner.go | Adds shared resolveOwners helper + unsupported-type sentinel error. |
| internal/handler/owner_test.go | Unit tests for owner resolution behavior and error cases. |
| internal/handler/service_handler.go | Resolves owners and forwards them in service upsert payload; sets new condition reason on failure. |
| internal/handler/service_handler_test.go | Adds tests verifying resolved owners are included; verifies requeue vs permanent error behavior. |
| internal/handler/pipeline_handler.go | Resolves owners during upsert and forwards them; uses typed EntityRef for service payload. |
| internal/handler/pipeline_handler_test.go | Updates stubs for GetEntityByName and adds tests verifying owner resolution behavior. |
| internal/handler/testcase_handler.go | Resolves owners and forwards them in test case upsert payload; sets new condition reason on failure. |
| internal/handler/testcase_handler_test.go | Adds tests verifying resolved owners are included and unsupported types don’t requeue. |
| internal/controller/openmetadataservice_controller_test.go | Updates controller test stub to satisfy new ServiceClient interface method. |
| internal/controller/openmetadatatestcase_controller_test.go | Updates controller test stub to satisfy new TestCaseClient interface method. |
| config/crd/bases/openmetadata.vortexa.com_openmetadataservices.yaml | Adds owners OpenAPI schema to OpenMetadataService CRD. |
| config/crd/bases/openmetadata.vortexa.com_ingestionpipelines.yaml | Adds owners OpenAPI schema to IngestionPipeline CRD and updates entity type enums. |
| config/crd/bases/openmetadata.vortexa.com_openmetadatatestcases.yaml | Adds owners OpenAPI schema to OpenMetadataTestCase CRD. |
| api/v1alpha1/ingestionpipeline_types.go | Adds owners field, extends EntityType enum with user/team. |
| api/v1alpha1/openmetadataservice_types.go | Adds owners field to Service OM spec. |
| api/v1alpha1/openmetadatatestcase_types.go | Adds owners field to TestCase OM spec. |
| api/v1alpha1/zz_generated.deepcopy.go | Updates deepcopy generation for newly added owners slices. |
| api/v1alpha1/conditions.go | Adds ReasonOwnerResolutionFailed condition reason. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kujon
reviewed
Apr 20, 2026
kujon
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds optional
ownersfield to all three OM CRDs (OpenMetadataService,IngestionPipeline,OpenMetadataTestCase) so users can declare which user(s) or team(s) own each registered entity.What changed
ownersfield on each spec, accepting a list ofEntityReference(fullyQualifiedName+type). TheEntityTypeenum is extended to includeuserandteam.GET /v1/{users|teams}/name/{fqn}and forwards the resolved{id, type}list in the upsert payload.ReasonOwnerResolutionFailedcondition. Unsupported owner type -> permanent spec error (no requeue). Not-found / other API errors -> transient (requeue), matching the existing pipeline service-ref pattern.omclient.EntityRefstruct used for bothOwnersand the pipelineServicefield (replacesmap[string]anywith compile-time safety).Example usage