Set ingress class via ingressClassName for Contour HTTPProxy#1870
Set ingress class via ingressClassName for Contour HTTPProxy#1870nnz1024 wants to merge 2 commits intofluxcd:mainfrom
Conversation
|
hello, thank you for raising this PR! it looks good at first glance. is it possible to still keep the annotation around? |
|
Hello, @aryan9600! Yes, we can keep this annotation. To prevent code duplication, we can use function like this like and Already checked that it compiles, bit it will take several more days to thoroughly test it. However, in my opinion, removing annotation modification would be beneficial. Looking at Flagger's commit history, one can see that more than half of the fixes in recent years relate to annotation diffing, filtering, and rewriting across different custom resources. Using the native resource field could reduce the potential for errors and make future maintenance of Flagger easier. Another reason not to support this annotation is that latest version of Contour without native IngressClassName support was 1.17.2, released in Aug 2021 and tested for compatibility with Kubernetes versions up to 1.21. Since then, there have been many critical vulnerabilities in Go and Envoy, and today's oldest supported Kubernetes version is 1.32. So, I doubt there is a real chance to encounter such an old Contour. In summary: while it is possible to keep the annotation, I believe it is better to minimize annotation interactions, especially since it is very unlikely that anyone in 2026 will need this specific annotation. |
|
fair enough - could you rebase against main and force push? |
9a3a2f3 to
4a7b0c0
Compare
|
Done |
|
Sorry, forgot about tests |
9d866a0 to
80f5f93
Compare
Since version 1.18 (released in July 2021), Contour supports field HTTPProxy.spec.ingressClassName as a way to specify ingress class for HTTPProxy. Using this field allows to avoid problems emerging from improper annotation cleanup, diffing and copying (see issue fluxcd#1848). Signed-off-by: Sergey Ptashnik <nnz1024@gmail.com>
Signed-off-by: Sergey Ptashnik <nnz1024@gmail.com>
80f5f93 to
f19ee00
Compare
|
Hello @aryan9600! Can you please re-trigger tests? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1870 +/- ##
=======================================
Coverage 30.00% 30.00%
=======================================
Files 287 287
Lines 18467 18468 +1
=======================================
+ Hits 5541 5542 +1
Misses 12195 12195
Partials 731 731 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
OK, now with green tests I only have to rebase it on the main branch? |
Since version 1.18 (released in July 2021), Contour supports field HTTPProxy.spec.ingressClassName as a way to specify ingress class for HTTPProxy.
Using this field allows to avoid problems emerging from improper annotation cleanup, diffing and copying (see referenced issue).
Fixes: #1848