kubernetes-ingress icon indicating copy to clipboard operation
kubernetes-ingress copied to clipboard

Increase options for tcp services. Add accept-proxy to the list of available parameters with backward compat.

Open ctrix opened this issue 2 years ago • 12 comments

At $dayjob we use haproxy on TCP services and we rely on the proxy protocol to transport the remote endpoint ip address to the backends.

Very often we chain several proxies one in front of the other. We noticed that the ingress controller doesn't handle the accept-proxy option, while it is supported for HTTP(s) connections through other settings.

This patch reuses the third parameter of the tcp services list, previously optional and supporting only ssl as value and transforms it into a comma separated list of options; It also adds the accept-proxy option support.

When the tcp service will contain accept-proxy in the options, it will be added to the bind line in the configuration file.

This should also address several requests and issues, like #318 and should enable more features to be added to the tcp services keeping the backward compatibility.

ctrix avatar Mar 01 '23 08:03 ctrix

Hi @ctrix , Thanks for your contribution. We'll look at it and give any feedback if necessary.

ivanmatmati avatar Mar 09 '23 07:03 ivanmatmati

Can you rebase your branch to be in phase with current master ?

ivanmatmati avatar Mar 09 '23 08:03 ivanmatmati

Done.

ctrix avatar Mar 11 '23 09:03 ctrix

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 10 '23 10:04 stale[bot]

hi @ctrix

currently we plan to expand capabilities for TCP services with gateway API. because of that we need to put this on hold for a while to determine what is missing there. in any case expanding options here would bring a bit of confusion

since gateway api is still in alpha/beta and it is uncertain when it will be finalized form k8s team, a better option would be to create a CRD for TCP services that would replace a bit awkward structure that we can have with configmaps.

Because of that I will put this on hold for now until situation is a bit more clear

oktalz avatar Apr 12 '23 07:04 oktalz

@oktalz has there been any movement in this?

ShadowJonathan avatar Mar 07 '24 11:03 ShadowJonathan

@ShadowJonathan yes, tomorrow we will release v1.11 and next release after that one contains TCP CRD in roadmap.

structure and options in it will probably be added gradually (over development time) and I'll notify here when changes are done so we can align with expected options

oktalz avatar Mar 07 '24 22:03 oktalz

Hi @oktalz , Do you have any updates on TCP CRD release?

Raj-prateek avatar Jun 06 '24 08:06 Raj-prateek

@ctrix, @Raj-prateek, @ShadowJonathan definitions are here, and usage is explained here documentation/custom-resource-tcp.md

please take a look and see if this approach will be something you can use, please note that options for tcp CRD will expand in future

example in doc shows how you can use this for accept-proxy option

in general we opted for full option set of configuration options, its very similar to what you have in dataplaneapi for example, in fact we use same scheme (here its just merged in k8s way)

oktalz avatar Jun 10 '24 08:06 oktalz

due to some changes in behavior of IC (accepting more options), tcp crd will be available only in new version 3.0 (to align version with underlying HAProxy version) and new version is planned withing next two weeks (possibly even this week)

oktalz avatar Jun 10 '24 08:06 oktalz

Hello @oktalz, Do you have an updated ETA for this release please?

clement0210 avatar Jun 24 '24 09:06 clement0210

Hello @clement0210 , It should be released this week.

hdurand0710 avatar Jun 24 '24 09:06 hdurand0710

I'm going to close this PR since we have TCP CRD now. In any case I really appreciate this and a push for them.

If anything is missing, we will add it to TCP CRD since it is a better solution than using TCP configmap for this.

oktalz avatar Jul 15 '24 10:07 oktalz