Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:#530 add tcp services annotation capability #533

Conversation

benm-stm
Copy link

I worked with tcp services defined in configmaps, one blocking point was the lack of annotations
I tried to change load-balance algorithms for every service
so i created this contribution
here is what we can do now

apiVersion: v1
kind: ConfigMap
metadata:
  name: kubernetes-ingress
  namespace: default
data:
  "1025": namespace/svc:8080:ssl:load-balance=leastconn,check=true
  "1026": namespace/svc:8081::load-balance=roundrobin

the last field can be any of the valid annotations
I created a unit test too to validate the usecase

@benm-stm benm-stm force-pushed the feat/allow_tcp_services_annotations branch 2 times, most recently from f69d7a7 to 0311662 Compare March 22, 2023 22:57
@benm-stm benm-stm force-pushed the feat/allow_tcp_services_annotations branch 3 times, most recently from e27050c to 1cc2155 Compare April 5, 2023 17:40
@benm-stm benm-stm force-pushed the feat/allow_tcp_services_annotations branch from 1cc2155 to 5d2e48b Compare April 5, 2023 17:42
@oktalz oktalz added the enhancement New feature or request label Apr 12, 2023
@oktalz
Copy link
Member

oktalz commented Apr 12, 2023

hi @benm-stm,

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, now we have :: and : and , to distinct all options.

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 PR on hold for now until situation is a bit more clear

@ivanmatmati ivanmatmati added the on hold Waiting for an event to make decision label Oct 10, 2023
@oktalz
Copy link
Member

oktalz commented Jun 10, 2024

hi @benm-stm

TCP CRD 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.

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),
so there won't be any need to add additional annotations, all options should be available in CRD

@oktalz
Copy link
Member

oktalz commented Jul 15, 2024

I'm going to close this PR since we have TCP.
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 oktalz closed this Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request on hold Waiting for an event to make decision
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants