gloo: copy labels from upstream#932
gloo: copy labels from upstream#932stefanprodan merged 3 commits intofluxcd:mainfrom knechtionscoding:feat/gloo-label-copy
Conversation
Signed-off-by: Hans Knecht <Hans.Knecht@missionlane.com>
| if glooUpstreamWithConfig != nil { | ||
| configSpec := glooUpstreamWithConfig.Spec | ||
| upstreamSpec = gloov1.UpstreamSpec{ | ||
| Labels: configSpec.Labels, |
There was a problem hiding this comment.
glooUpstreamWithConfig.Metadata.Labels right?
There was a problem hiding this comment.
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>
stefanprodan
left a comment
There was a problem hiding this comment.
LGTM
Thanks @knechtionscoding
Copy the Labels over from the upstream as well as config values. This ensures that gatekeeper or OPA validations can pass.