charts: Using downwardAPI to mount labels to the proxy container#4199
charts: Using downwardAPI to mount labels to the proxy container#4199alpeb merged 50 commits intolinkerd:masterfrom
Conversation
Signed-off-by: Tarun Pothulapati <[email protected]>
de2e4c6 to
e81a534
Compare
Signed-off-by: Tarun Pothulapati <[email protected]>
e81a534 to
62c4cce
Compare
Signed-off-by: Tarun Pothulapati <[email protected]>
Signed-off-by: Tarun Pothulapati <[email protected]>
Signed-off-by: Tarun Pothulapati <[email protected]>
Signed-off-by: Tarun Pothulapati <[email protected]>
update test files Signed-off-by: Tarun Pothulapati <[email protected]>
de69e33 to
4a2691a
Compare
Signed-off-by: Tarun Pothulapati <[email protected]>
Signed-off-by: Tarun Pothulapati <[email protected]>
Signed-off-by: Tarun Pothulapati <[email protected]>
4bbd2ba to
681b66a
Compare
79d126f to
1c6325d
Compare
Signed-off-by: Tarun Pothulapati <[email protected]>
Signed-off-by: Tarun Pothulapati <[email protected]>
Signed-off-by: Tarun Pothulapati <[email protected]>
|
@alpeb This PR adds a new ENV variable for labels file along with a volumeMount of the pod labels. Use Complete installation command would be |
Signed-off-by: Tarun Pothulapati <[email protected]>
Signed-off-by: Tarun Pothulapati <[email protected]>
|
@alpeb My Initial thinking was to leave the control-plane components, as they already had |
Signed-off-by: Tarun Pothulapati <[email protected]>
|
@alpeb Looks like updating the But, This should not effect us for injection, as we add labels to the pod but not the workload. |
Ok you're right. I thought replacing the deployment with changes in the label selectors would swap the entire deployment and that wouldn't be considered a mutation, but I do see the error when I attempt doing that: So this means we have to rollback doing that to the control plane components and rely on the javascript magic you mentioned before? |
|
@alpeb Yep, Doing that. P.S: It feels really bad to have this blocker to update labels, as it could be a common use-case/change. |
This reverts commit 6023ac4. Signed-off-by: Tarun Pothulapati <[email protected]>
Signed-off-by: Tarun Pothulapati <[email protected]>
|
@Pothulapati seems like you missed including |
Signed-off-by: Tarun Pothulapati <[email protected]>
alpeb
left a comment
There was a problem hiding this comment.
Thanks @Pothulapati , this looks and tests fine to me! 👍 🎖️
adleong
left a comment
There was a problem hiding this comment.
It took me a while to review this just because it took me a while to wrap my head around what was happening here. In the end, it's pretty simple, but it seems more complex than it is. I think we should definitely leave some comments behind here because it can be pretty confusing, especially if you don't have all the right context.
In particular there were a few things that are not obvious that we should spend extra effort documenting:
- It's not obvious why we want a workload-ns label. After all, the namespace is already a field in the metadata. We should explain that adding the namespace as a label is the only way to send this value to the container through the downward api
- It's surprising that the workload-ns label is not part of the proxy labels partial. At first I thought this was a mistake. We should explain that we omit this to avoid changing the control plane deployment label selectors, since doing so would cause problems for upgrades. This is super non-obvious.
- In general, the labels volume could use some comments describing what it is and what it's for.
Other than adding some documentation, this looks correct to me.
Signed-off-by: Tarun Pothulapati <[email protected]>
Signed-off-by: Tarun Pothulapati <[email protected]>
|
@adleong Thanks, That's a really good suggestion! As the changes are spread across multiple files, I added a comment in |
adleong
left a comment
There was a problem hiding this comment.
Thanks for adding that comment! Maybe move the explanation about workload-ns to the proxy labels partial to explain why the label should not be put there? If I was reading this code my instinct would be to "fix" it by moving the workload-ns label into the proxy labels partial, so it would be good to have a comment there to stop me.
Signed-off-by: Tarun Pothulapati <[email protected]>
|
@adleong I added a caution comment in |
Signed-off-by: Tarun Pothulapati <[email protected]>
Signed-off-by: Tarun Pothulapati <[email protected]>
89b69f5 to
ea6651e
Compare


Fixes #4008
This PR updates yaml manifests to include pod's
metadata.labelsas a volume, for thelinkerd-proxycontainer to use.Changes Include
env,volumeandvolumeMountsto the manifests using downwardAPI, when tracing is enabled through.Values.global.proxy.tracelinkerd.io/workload-nsas a label that is added during proxy injection@grampelberg
Signed-off-by: Tarun Pothulapati [email protected]