-
Notifications
You must be signed in to change notification settings - Fork 321
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
Mw/net 5679 explicit upstreams mesh webhook injects upstream env variable #2995
Mw/net 5679 explicit upstreams mesh webhook injects upstream env variable #2995
Conversation
d61e083
to
3264528
Compare
b39b194
to
1276430
Compare
3264528
to
72638d7
Compare
48aa3da
to
1026401
Compare
1026401
to
ff506eb
Compare
747f9f2
to
9c4fb95
Compare
ff506eb
to
e586c40
Compare
e586c40
to
559356d
Compare
1acf15c
to
91edc8f
Compare
559356d
to
253063f
Compare
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.
Looks great! My only dealbreaker was the naming of the ENV variable. Open to discussion, though.
253063f
to
d801d15
Compare
813cd76
to
b0dda3e
Compare
5efefd6
to
48e3820
Compare
d827503
to
01331ba
Compare
48e3820
to
ad8aea8
Compare
- nil pointer exception because we weren't checking for a length of two in the unlabeled case - added a test to make sure it's covered
- due to refactoring can support same labeled/unlabeld parsing logic as when pod controller processes the annotations
- added test cases
ad8aea8
to
d46dece
Compare
@DanStough can you take a look at this now that I've addressed your comments? Thanks! |
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.
This looks really good. Have one question that is a bit of a blocker but great work otherwise.
// } | ||
//} | ||
func (w *MeshWebhook) containerEnvVars(pod corev1.Pod) ([]corev1.EnvVar, error) { | ||
upstreams, err := common.ProcessPodUpstreams(pod, true, true) |
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 think we need to update the MeshWebhook
struct to have an EnablePartitions
field and pass in w.enabledNamespaces
and w.enablePartitions
here right? Is there a reason we default Process Pod Upstreams to have true
for both those values?
Changes proposed in this PR:
How I've tested this PR:
How I expect reviewers to test this PR:
👀
Checklist: