Skip to content

Conversation

@allanhung
Copy link

Summary

This PR addresses service handling issues and adds support for standardized workload type mappings in the Otterize intents operator.

Changes

1. ExternalName Service Handling

Fixed handling of Kubernetes ExternalName services (e.g., Knative services) that don't have pod selectors:

  • Files modified: api/v1alpha3/otterize_labels.go, api/v1beta1/otterize_labels.go, api/v2alpha1/otterize_labels.go, api/v2beta1/otterize_labels.go
  • Change: Return (nil, false, nil) instead of error when service has no selector
  • Impact: Prevents errors when processing ExternalName services

2. Standardized Workload Type Mappings

Added standardized service name mappings for specific workload types to provide consistent policy application:

Existing workloads (from first commit):

  • Workflow (Argo) → argo-workflow
  • SparkApplicationspark
  • RunnerDeployment (GitHub Actions) → actions-runner

New workload (from second commit):

  • Execution (Canalflow) → execution

3. Test Coverage

Added comprehensive unit tests:

  • TestResolvePodToServiceIdentity_WorkflowOwner
  • TestResolvePodToServiceIdentity_SparkApplicationOwner
  • TestResolvePodToServiceIdentity_RunnerDeploymentOwner
  • TestResolvePodToServiceIdentity_ExecutionOwner

Testing

  • ✅ All unit tests pass
  • ✅ Code compiles successfully
  • ✅ Test coverage added for all new functionality

Files Changed

  • src/operator/api/v1alpha3/otterize_labels.go
  • src/operator/api/v1beta1/otterize_labels.go
  • src/operator/api/v2alpha1/otterize_labels.go
  • src/operator/api/v2beta1/otterize_labels.go
  • src/shared/serviceidresolver/podownerresolver/podownerresolver.go
  • src/shared/serviceidresolver/serviceidresolver_test.go

Total: 6 files changed, 277 insertions(+)

🤖 Generated with Claude Code

allanhung and others added 2 commits November 12, 2025 19:46
…pings

This commit addresses two issues: (1) ExternalName services now return gracefully without error since they don't have pod selectors, and (2) specific workload types (Workflow, SparkApplication, RunnerDeployment) now get standardized service names for consistent policy application. Added comprehensive test coverage and documentation for both fixes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Added standardized service name mapping for Canalflow Execution pods to
provide consistent policy application across different execution instances.
Execution pods will now resolve to the standardized name "execution".

Changes:
- Added "Execution" case in podownerresolver switch statement
- Added comprehensive unit test TestResolvePodToServiceIdentity_ExecutionOwner
- Test validates that Execution pods resolve to "execution" service name

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@github-actions
Copy link

CLA Assistant Lite bot:
Thank you for your submission -- we really appreciate it! Like many open-source projects, we ask that every contributor signs our Contributor License Agreement (CLA) before we can accept their contribution. This is to protect your rights, ours, and those of future users of this software.

Here is the information GitHub has on the contributors of this Pull Request (who have not yet signed this CLA):

- GitHub handle: allanhung
- Name: Allan Hung
- Email: [email protected]

To acknowledge that your information above is correct, that we may record it, and that you have read, understood, and agreed to this CLA, please sign the CLA by posting a Pull Request Comment below, containing the following exact text:


I have read and understood the CLA and hereby agree to its terms by making this Pull Request Comment.


You can retrigger this bot by commenting recheck in this Pull Request

@allanhung
Copy link
Author

Wrong target repository, creating PR to fork instead

@allanhung allanhung closed this Nov 13, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant