Skip to content

fix: Set appProtocol for service resources#797

Open
vspallas-flyr wants to merge 3 commits intoopen-feature:mainfrom
FLYR-Open-Source:fix/specify-service-app-proticols
Open

fix: Set appProtocol for service resources#797
vspallas-flyr wants to merge 3 commits intoopen-feature:mainfrom
FLYR-Open-Source:fix/specify-service-app-proticols

Conversation

@vspallas-flyr
Copy link

This PR

  • adds the appProtocol in the service resource for all the exposed ports

Related Issues

Notes

Follow-up Tasks

How to test

@gemini-code-assist
Copy link

Summary of Changes

Hello @vspallas-flyr, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the 'flagd' Kubernetes service definition by explicitly setting the 'appProtocol' for each exposed port. This change improves the clarity and robustness of service configuration, enabling better integration with network policies and service meshes that leverage application protocol information for advanced routing and traffic management.

Highlights

  • Kubernetes Service appProtocol: The pull request introduces the 'appProtocol' field for all exposed ports in the 'flagd' Kubernetes service, explicitly defining the application-level protocol for each port.
  • Protocol Assignment: Specific application protocols are assigned: 'grpc' for the 'flagd' and 'sync' ports, and 'http' for the 'ofrep' and 'metrics' ports, aligning with their intended usage.
  • Enhanced Test Coverage: Unit tests for the 'FlagdService' resource have been updated to include assertions for the newly added 'appProtocol' field, ensuring correct configuration.
Changelog
  • internal/controller/core/flagd/resources/service.go
    • Introduced 'grpcAppProtocol' and 'httpAppProtocol' string constants.
    • Modified the 'GetResource' function to set the 'AppProtocol' field for all 'v1.ServicePort' entries, using the newly defined constants.
  • internal/controller/core/flagd/resources/service_test.go
    • Added an import for 'k8s.io/apimachinery/pkg/util/intstr'.
    • Expanded the 'TestFlagdService_getService' test case to include comprehensive assertions for the 'AppProtocol', 'Name', 'Port', and 'TargetPort' of each service port.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request correctly adds the appProtocol to the service resources, which is a good improvement for service mesh integration and observability. The associated tests are also well-written. I've provided a few suggestions to improve the implementation by removing mutable package-level state and using a more idiomatic approach for handling pointers to string literals in Kubernetes controllers. This will enhance code maintainability and safety.

Signed-off-by: Vasileios Pallas <vasileios.pallas@flyr.com>
@vspallas-flyr vspallas-flyr force-pushed the fix/specify-service-app-proticols branch from a7b1123 to 8c12ca4 Compare February 4, 2026 12:08
Vasileios Pallas added 2 commits February 4, 2026 13:15
Signed-off-by: Vasileios Pallas <vasileios.pallas@flyr.com>
Signed-off-by: Vasileios Pallas <vasileios.pallas@flyr.com>
@beeme1mr beeme1mr linked an issue Feb 11, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set appProtocol for service resources

2 participants