Skip to content

Conversation

@nddq
Copy link
Member

@nddq nddq commented Jul 18, 2025

Description

This PR fixes the issue where service IPs are not being resolved in the Hubble relay's flow logs and app names are not showing up on Hubble UI. This was done by introducing a service cache and a label cache via the service and cilium identity controllers.

Related Issue

If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request.

Checklist

  • I have read the contributing documentation.
  • I signed and signed-off the commits (git commit -S -s ...). See this documentation on signing commits.
  • I have correctly attributed the author(s) of the code.
  • I have tested the changes locally.
  • I have followed the project's style guidelines.
  • I have updated the documentation, if necessary.
  • I have added tests, if applicable.

Screenshots (if applicable) or Testing Completed

image image

Additional Notes

Add any additional notes or context about the pull request here.


Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.

@nddq nddq self-assigned this Jul 18, 2025
@nddq nddq added the type/fix Fixes something label Jul 18, 2025
@nddq nddq requested a review from a team as a code owner July 18, 2025 05:43
@nddq nddq requested review from MikeZappa87 and snguyen64 July 18, 2025 05:43
@nddq nddq requested review from anubhabMajumdar and Copilot and removed request for MikeZappa87 and snguyen64 July 23, 2025 11:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the issue where service IPs are not being resolved in the Hubble relay's flow logs and app names are not showing up on Hubble UI by introducing a service cache and a label cache via the service and cilium identity controllers.

  • Implements service and CiliumIdentity reconcilers using controller-runtime to maintain in-memory caches
  • Replaces previous incomplete service decoder with functional service resolution from IP addresses
  • Adds label resolution for security identities to display app names in Hubble UI

Reviewed Changes

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

Show a summary per file
File Description
pkg/k8s/cell_linux.go Enables operator-managed CIDs in cache allocator configuration
pkg/hubble/resources/service_linux.go Implements service reconciler for caching service IP to name mappings
pkg/hubble/resources/service_linux_test.go Comprehensive test coverage for service reconciler functionality
pkg/hubble/resources/ciliumidentity_linux.go Implements CiliumIdentity reconciler for caching labels by security identity
pkg/hubble/resources/ciliumidentity_linux_test.go Test coverage for CiliumIdentity reconciler operations
pkg/hubble/resources/cell_linux.go Hive cell module configuration for resource reconcilers
pkg/hubble/parser/seven/parser_linux.go Updates parser to use new service reconciler and label cache
pkg/hubble/parser/parser_linux.go Refactors parser constructor to use dependency injection
pkg/hubble/parser/layer34/parser_linux.go Updates layer34 parser to use new decoders
pkg/hubble/common/decoder_linux.go Adds LabelCache interface and removes incomplete service decoder
deploy/hubble/manifests/controller/helm/retina/values.yaml Updates Hubble UI image versions and repositories
cmd/hubble/daemon_linux.go Adds Cilium API v2 scheme registration
cmd/hubble/cells_linux.go Integrates resource cell and updates parser dependency injection
Makefile Increases golangci-lint concurrency for better performance
Comments suppressed due to low confidence (4)

pkg/hubble/resources/ciliumidentity_linux_test.go:283

  • The function parameter should be named 't' following Go testing conventions.
func TestCiliumIdentityReconciler_removeIdentityFromCache_InvalidName(*testing.T) {

pkg/hubble/resources/ciliumidentity_linux_test.go:294

  • The function parameter should be named 't' following Go testing conventions.
func TestCiliumIdentityReconciler_removeIdentityFromCache_NotInCache(*testing.T) {

pkg/hubble/resources/service_linux.go:68

  • [nitpick] The error message should be more specific about what operation failed, e.g., 'failed to retrieve Service from Kubernetes API'.
		return ctrl.Result{}, errors.Wrap(err, "failed to get Service")

pkg/hubble/resources/ciliumidentity_linux.go:73

  • [nitpick] The error message should be more specific about what operation failed, e.g., 'failed to retrieve CiliumIdentity from Kubernetes API'.
		return ctrl.Result{}, errors.Wrap(err, "failed to get CiliumIdentity")

This PR fixes the issue where service IPs are not being resolved in the
Hubble relay's flow logs and app names are not showing up on Hubble UI.
This was done by introducing a service cache and a label cache via the
service and cilium identity controllers.

Signed-off-by: Quang Nguyen <[email protected]>
@whatnick
Copy link
Contributor

Looking forward to this to improve the hubble experience.

@sfenzke
Copy link

sfenzke commented Aug 18, 2025

Is there a roadmap when this will be released?

@VincentS
Copy link

Any update on this PR @nddq ?

@nddq
Copy link
Member Author

nddq commented Oct 11, 2025

@VincentS hey, sorry for the delay as I've been busy with other commitments, I've asked the internal team for reviews.

@rredziak
Copy link

Hello @nddq, @anubhabMajumdar and Team,

any update on this PR?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hubble UI does not show namespace and app name Enrich flows with Service name and namespace

6 participants