-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
charts: Using downwardAPI to mount labels to the proxy container #4199
Conversation
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
de2e4c6
to
e81a534
Compare
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
e81a534
to
62c4cce
Compare
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
update test files Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
de69e33
to
4a2691a
Compare
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
4bbd2ba
to
681b66a
Compare
79d126f
to
1c6325d
Compare
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
@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 <tarunpothulapati@outlook.com>
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
@alpeb My Initial thinking was to leave the control-plane components, as they already had |
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
@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 <tarunpothulapati@outlook.com>
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
@Pothulapati seems like you missed including |
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.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.
Thanks @Pothulapati , this looks and tests fine to me! 👍 🎖️
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.
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 <tarunpothulapati@outlook.com>
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
@adleong Thanks, That's a really good suggestion! As the changes are spread across multiple files, I added a comment in |
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.
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 <tarunpothulapati@outlook.com>
@adleong I added a caution comment in |
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.
Thanks!
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
89b69f5
to
ea6651e
Compare
Fixes #4008
This PR updates yaml manifests to include pod's
metadata.labels
as a volume, for thelinkerd-proxy
container to use.Changes Include
env
,volume
andvolumeMounts
to the manifests using downwardAPI, when tracing is enabled through.Values.global.proxy.trace
linkerd.io/workload-ns
as a label that is added during proxy injection@grampelberg
Signed-off-by: Tarun Pothulapati tarunpothulapati@outlook.com