-
Notifications
You must be signed in to change notification settings - Fork 737
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
gloo: copy labels from upstream #932
gloo: copy labels from upstream #932
Conversation
Signed-off-by: Hans Knecht <Hans.Knecht@missionlane.com>
@@ -276,6 +276,7 @@ func (gr *GlooRouter) getGlooUpstreamKubeService(canary *flaggerv1.Canary, svc * | |||
if glooUpstreamWithConfig != nil { | |||
configSpec := glooUpstreamWithConfig.Spec | |||
upstreamSpec = gloov1.UpstreamSpec{ | |||
Labels: configSpec.Labels, |
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.
glooUpstreamWithConfig.Metadata.Labels right?
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.
I don't think so? This defines from the configSpec what labels to pass to the other upstream objects. glooUpstreamWithConfig.Metadata.Labels might make sense here: https://github.com/KnechtionsCoding/flagger/blob/35c8957a5585f9aa7d4446fd211c0289baa7a6ea/pkg/router/gloo.go#L310 but I think that declaration is already correct.
But I may be misunderstanding the flow here.
Signed-off-by: Hans Knecht <Hans.Knecht@missionlane.com>
Codecov Report
@@ Coverage Diff @@
## main #932 +/- ##
==========================================
- Coverage 56.92% 56.89% -0.04%
==========================================
Files 70 70
Lines 5825 5832 +7
==========================================
+ Hits 3316 3318 +2
- Misses 2018 2022 +4
- Partials 491 492 +1
Continue to review full report at Codecov.
|
Flagger copies labels to the generated objects based on the |
fix: remove copy of labels Signed-off-by: Hans Knecht <Hans.Knecht@missionlane.com>
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 @knechtionscoding
Copy the Labels over from the upstream as well as config values. This ensures that gatekeeper or OPA validations can pass.