-
Notifications
You must be signed in to change notification settings - Fork 360
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
fix: not generate selector of deployment/daemonset based on the custom label configuration of EnvoyProxy #3995
Conversation
…m label configuration of EnvoyProxy Signed-off-by: Kensei Nakada <handbomusic@gmail.com>
6022876
to
938ac66
Compare
Signed-off-by: Kensei Nakada <handbomusic@gmail.com>
62ace99
to
d6eb178
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3995 +/- ##
==========================================
+ Coverage 67.61% 67.66% +0.05%
==========================================
Files 186 186
Lines 22757 22785 +28
==========================================
+ Hits 15387 15418 +31
+ Misses 6266 6263 -3
Partials 1104 1104 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Kensei Nakada <handbomusic@gmail.com>
d6eb178
to
d86df6a
Compare
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks !
/retest |
What type of PR is this?
What this PR does / why we need it:
The selector on Deployment and Daemonset is immutable.
We currently generate the selector based on a custom label config of envoy proxy (i.e., the input from users) and users can change the config anytime.
So, if users make such changes, the reconciliation tries to update the selector too, and fails (#1818 #3666).
This PR makes the selector of Deployment and Daemonset stable, generating it without the custom labels.
But, if we just do that, it could result in the breaking change to existing users who already has a deployment / daemonset with a custom label (because the envoy gateway of new version tries to eliminate the custom label from the selector)
So, in order not to introduce such breaking changes, this PR tries to always keep the selector of existing deployment or daemonset.
So, all new deployment and daemonset will have a selector generated without the custom labels, and all existing ones will keep a selector generated with or without the custom labels.
It also means we only help future users; we don't help existing users who already have a deployment/daemonset created with a custom label and want to change the custom label. They should recreate envoyproxy by themselves to recreate the underlying deployment/daemonset. (We don't implement such recreation because it's not a fair deal to implement/maintain a complicated safe recreation process for such a few users.)
Which issue(s) this PR fixes:
Fixes #1818 #3666