Kong / charts

Helm chart for Kong
Apache License 2.0
247 stars 477 forks source link

support customized service name #1034

Closed gotojeffray closed 6 months ago

gotojeffray commented 6 months ago

What this PR does / why we need it:

We'd like to customize the service name for the different kong gateway components because we're running the kong gateway in kong mesh, but the kuma sidecar just picked up the Kong Gateway service name alphabetically.

we just want to use the kong-proxy service name to be the 1st one in the alphabet order to keep it consistent even after we enabled kong-admin service.

e.g we will change admin to zadmin.

Special notes for your reviewer:

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

CLAassistant commented 6 months ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: gotojeffray
:x: Jeff Wang


Jeff Wang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant commented 6 months ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

:x: Jeff Wang
:x: gotojeffray


Jeff Wang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

gotojeffray commented 6 months ago

Hi Rainest,

I asked kong support engineer to create a feature request - reference case GTWY-I-851.

Could you have a look at that please?

rainest commented 6 months ago

The description there is the same as the original description above. Are you able to add a comment there?

gotojeffray commented 6 months ago

sure, we have this problem when Kong gateway works with Kong mesh.

kuma-sidecar running in the kong gateway pod always picks the service name alphabetically, but we prefer the kong-proxy service name to represent the kong gateway which makes more sense in the mesh.

There is no issue if we only enable the Kong proxy, but the service name in the mesh will be changed if we enable any service like kong-manager or kong-admin in the helm chart.

We need to change all the service names in our MeshTrafficPermissions because the service name has been changed to another one.

This customized service name will help us to keep the service name consistent which means we could keep the kong-proxy always be the 1st one on the service name list.

kong-proxy kong-zadmin kong-zmananger kong-zportal ...

On Fri, 15 Mar 2024 at 13:25, Travis Raines @.***> wrote:

The description there is the same as the original description above. Are you able to add a comment there?

— Reply to this email directly, view it on GitHub https://github.com/Kong/charts/pull/1034#issuecomment-1998688758, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI7CUNCOJTW55E2EZ3QIRTYYI5WTAVCNFSM6AAAAABETSBTCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJYGY4DQNZVHA . You are receiving this because you authored the thread.Message ID: @.***>

rainest commented 6 months ago

I've checked the behavior here and reviewed it with the Mesh/Kuma team; this is a bug in the Mesh UI. Most Services are displayed as individual Services, but gateway_delegated (i.e. Kong proxy) Services get aggregated under a single name. gateway_delegated shouldn't really be identified by Service at all--they're effectively a separate type of entity tied to a Deployment instead of a Service. The Mesh UI currently uses the first alpha sort Service attached to that Deployment somewhat arbitrarily, because it doesn't have a dedicated UI component for representing gateway_delegated entities.

https://github.com/kumahq/kuma/issues/3832 tracks the broader work to update the Mesh UI to represent gateway_delegated entities separately (https://github.com/kumahq/kuma/issues/3832#issuecomment-1335439106 mentions the current name selection).

Closing this as the effect of the bug is cosmetic.

gotojeffray commented 6 months ago

Hi Raniest, thanks for checking that with mesh team. it's a problem in Mesh UI, but also a big problem in the mesh policy like MeshTrafficPemissions. we just want a consistent mesh service name in all the mesh policies.