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

feature: ability to canary releases #557

Closed
hhstu opened this issue Mar 4, 2020 · 16 comments
Closed

feature: ability to canary releases #557

hhstu opened this issue Mar 4, 2020 · 16 comments
Labels
area/feature New feature or request area/kong Issue with Kong proxy behavior, rather than the controller blocked

Comments

@hhstu
Copy link

hhstu commented Mar 4, 2020

#174 # Summary

SUMMARY_GOES_HERE

Kong Ingress controller version
0.7.1

Kong or Kong Enterprise version
2.0.1

Kubernetes version

1.15..9

What happened

i want to change the each weight of targets by kube-apiserver for “Gray released in computer terms”,not by kong-admin api , i think it is more unified and easy when kong in kubernates.

To be that ,we should more CRD

@hbagdi
Copy link
Member

hbagdi commented Mar 6, 2020

i want to change the each weight of targets by kube-apiserver for “Gray released in computer terms”,not by kong-admin api , i think it is more unified and easy when kong in kubernates.

I think you are referring to Canary releases or traffic splitting to test out a new version that is being rolled out. That functionality is currently Enterprise only but will be Open-Sourced in near future.

Adding targets as CRDs doesn't make much sense since we want to limit the CRDs are rather reuse Kubernetes concepts as much as possible.
I can think of a situation where the controller can lookup annotations on the pod and set the weight of the targets accordingly.

@primeroz
Copy link

primeroz commented Mar 30, 2020

Hi, i am also interested in this for the kong kubernetes ingress-controller

Since i just started testing Kong Community Edition i do not have access to the Canary Plugin, but if do you have any example CRD for configuring the Canary Plugin would you mind sharing it so i can understand a bit how it would work ? ( multiple services vs single service with pod labeled with blu and green for example )

I was also trying to use the weight functionality in the upstream load balancing configuration but i can't see any way to do it with kubernetes Ingress or KongIngress CRD , is that correct ?

I am used to do it with haproxy-ingress ( https://github.com/jcmoraisjr/haproxy-ingress/tree/master/examples/blue-green ) and was hoping i could do something similar where i could label pods and use that label to set a weight in the KongIngress

@hbagdi
Copy link
Member

hbagdi commented Mar 30, 2020

but if do you have any example CRD for configuring the Canary Plugin would you mind sharing it so i can understand a bit how it would work ?

https://docs.konghq.com/hub/kong-inc/canary/

I was also trying to use the weight functionality in the upstream load balancing configuration but i can't see any way to do it with kubernetes Ingress or KongIngress CRD , is that correct ?

Correct.

This is not possible currently but is on our radar to add.
However, it is unlikely that a Target CRD is an answer here. We will be reusing the Deployment concept.

On the other hand, this is a topic that is being discussed in Kubernetes SIG Network's service-apis project. We want to standardize blue-green deployment in Kubernetes itself, so that users don't have to learn provider specific configurations.

Stay tuned for updates.

@hbagdi hbagdi added the wontfix This will not be worked on label May 21, 2020
@chenjinxuan
Copy link
Contributor

chenjinxuan commented Jun 10, 2020

When is it expected to be supported
Can I refer to the annotations of nginx-ingress
nginx.ingress.kubernetes.io/canary

for example
konghq.com/canary: true
konghq.com/canary-weight: 100

@max-rocket-internet
Copy link

Can we update the title to be more indicative? If I understand correctly, @hhstu wants to be able to control canary settings, e.g. weight, by using annotation on the resources in k8s?

That functionality is currently Enterprise only

According to this blog post, there is some functionality in the CE version of Kong?

but will be Open-Sourced in near future.

🎉

@hbagdi hbagdi changed the title want to get more CRD just like Targets and so on feature: ability to canary releases Jun 15, 2020
@hbagdi hbagdi removed the wontfix This will not be worked on label Jun 15, 2020
@hbagdi
Copy link
Member

hbagdi commented Jun 15, 2020

Can we update the title to be more indicative?

updated.

Let's talk a little bit more about this feature to get a better understanding of what is needed.
Would having a way to split traffic among different k8s services (based on weight) be sufficient? Or are you looking for a more sophisticated canary feature.

One way you can currently get this is to have a single service backed by two deployments (selector in service can select across multiple deployments). Have a production deployment with 3 replicas and a canary with 1 replica. This will ensure that 25% of your traffic goes to canary.

@max-rocket-internet
Copy link

Would having a way to split traffic among different k8s services (based on weight) be sufficient?

Yes, this would be sufficient. More advanced options and ideas can be found here

Have a production deployment with 3 replicas and a canary with 1 replica. This will ensure that 25% of your traffic goes to canary.

This is not granular enough 🙂

@hbagdi
Copy link
Member

hbagdi commented Jun 16, 2020

Yes, this would be sufficient.

Great. That aligns with what we are planning to build out.

More advanced options and ideas can be found here

Yes, I'm aware of how ingress-nginx does it. Thanks for sharing the link. These options will be supported eventually.

This is not granular enough slightly_smiling_face

Totally agree with this. I'm not hand-waving the feature request away but noting a workaround that might work for others.

Kong core requires some changes to support more advanced use cases but we have some ideas of how we can support canary and traffic split features without any changes in Kong core.
We will schedule something like this for 0.11.0 or later.

@hbagdi hbagdi added this to the 0.11.0 milestone Jun 16, 2020
@hbagdi hbagdi removed this from the 0.11.0 milestone Sep 2, 2020
@hbagdi hbagdi added area/kong Issue with Kong proxy behavior, rather than the controller blocked area/feature New feature or request labels Sep 11, 2020
@hbagdi
Copy link
Member

hbagdi commented Sep 11, 2020

This is currently partially blocked on Kong: Kong/kong#6335.

We can however support partial load-balancing based by mixing endpoints from different k8s services into a single upstream and multiple targets with varied weights.

@debu99
Copy link

debu99 commented Mar 9, 2021

any update

@stale
Copy link

stale bot commented Mar 23, 2021

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 stale bot added the stale Will be closed unless advocated for within 7 days label Mar 23, 2021
@mflendrich mflendrich added pinned and removed stale Will be closed unless advocated for within 7 days labels Mar 23, 2021
@mflendrich mflendrich removed the pinned label Mar 31, 2021
@shaneutt
Copy link
Contributor

shaneutt commented Aug 4, 2021

@debu99 just to give you a heads up on where we stand with this issue:

So far there are several other issues and tasks that have been higher priority, so we do not a timing expectation for when this would get started just yet (we will update here if and when we do). In the meantime, we are open to contributors taking this issue on so if that's something you would be interested in please let us know.

@lework
Copy link

lework commented Mar 14, 2022

When will this feature be added?

@shaneutt
Copy link
Contributor

This feature is not currently on the roadmap for the maintainers (our focus at the time of writing is on Gateway API support which as a potentially relevant side note will enable options for weighted traffic). Given the age of the issue (and its comments) and some uncertainty about the value proposition we're going to consider this closed as "on hold" until we have a more clear rationale for it. If any contributors wish to offer to take this one on we would be happy to re-open and re-asses this and provide help and review for them. If you're a Kong customer desiring this support: we suggest reaching out to your account representative who will work with our product team to assess. For community members who are not Kong customers we would invite you to provide a detailed overview of your use cases, requirements and acceptance criteria for this feature as this will help us better understand the community need and help us to re-assess and potentially prioritize this issue.

@ebarped
Copy link

ebarped commented Jul 7, 2022

It seems that every "known" apigateway/service mesh has integration with flagger except kong:

  • Istio
  • Linkerd
  • App Mesh
  • Open Service Mesh
  • Kuma Service Mesh
  • Contour
  • Gloo
  • NGINX
  • Skipper
  • Traefik

+info: https://flagger.app/#progressive-delivery

Also, there is a canary plugin but enterprise only, so i think that the logic is already implemented but not delivered to the Open Source version... 😞

@shaneutt
Copy link
Contributor

shaneutt commented Jul 7, 2022

As was said previously we (the maintainers) are still open to suggestion in regards to whether we would accept this feature request, but we have to weigh and balance the features and maintenance on our roadmap because time is simply a finite thing. Pointing out that other implementations have a flagger integration is interesting, but it's hard to quantify how much weight that alone adds to the issue to prioritize it over anything else. What would help add more weight would be a detailed feature request including user stories and use cases, plus some clear illustration of the value add of this integration, in depth and with specific acceptance criteria. If you have the time to write that up (and since this issue is quite old, and didn't originally mention flagger) I would encourage you to create a separate new feature request specifically for the flagger integration. If you're a Kong customer I would additionally recommend that you then share a link to that issue with your account representative, as that would add further weight to the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/feature New feature or request area/kong Issue with Kong proxy behavior, rather than the controller blocked
Projects
None yet
Development

No branches or pull requests

10 participants