-
Notifications
You must be signed in to change notification settings - Fork 337
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
fix(kuma-dp): fix incorrect dataplane name due to mangled env vars #8199
Merged
bartsmykla
merged 7 commits into
kumahq:master
from
bartsmykla:fix/dataplane-name-when-env-vars-are-mangled
Oct 31, 2023
Merged
fix(kuma-dp): fix incorrect dataplane name due to mangled env vars #8199
bartsmykla
merged 7 commits into
kumahq:master
from
bartsmykla:fix/dataplane-name-when-env-vars-are-mangled
Oct 31, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kubernetes workloads may have their environment variables mangled by other components outside of our control. This can cause the `POD_NAME` or `POD_NAMESPACE` variables to be defined after the `KUMA_DATAPLANE_NAME` variable, which results in an incorrect dataplane name. This commit fixes this issue by checking for the `POD_NAME` and `POD_NAMESPACE` variables directly during Kuma dataplane runtime initialization if `KUMA_DATAPLANE_NAME` is empty or contains the characters `$(){}`, which suggests that the dependent variables were not present before its definition. This involved adding a `PostProcess` method to the `Config` interface. Signed-off-by: Bart Smykla <[email protected]>
Signed-off-by: Bart Smykla <[email protected]>
lahabana
reviewed
Oct 31, 2023
…e-when-env-vars-are-mangled
Signed-off-by: Bart Smykla <[email protected]>
lahabana
reviewed
Oct 31, 2023
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.
missing zoneProxy helm chart configuration change.
Signed-off-by: Bart Smykla <[email protected]>
…e-when-env-vars-are-mangled
Signed-off-by: Bart Smykla <[email protected]>
lahabana
approved these changes
Oct 31, 2023
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.
Approved! THough I'm not sure we should backport this as it changes quite a lot.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Kubernetes workloads may have their environment variables mangled by other components outside of our control. This can cause the
POD_NAME
orPOD_NAMESPACE
variables to be defined after theKUMA_DATAPLANE_NAME
variable, which results in an incorrect dataplane name.This commit fixes this issue by checking for the
POD_NAME
andPOD_NAMESPACE
variables directly during Kuma dataplane runtime initialization ifKUMA_DATAPLANE_NAME
is empty or contains the characters$(){}
, which suggests that the dependent variables were not present before its definition. This involved adding aPostProcess
method to theConfig
interface.Checklist prior to review
syscall.Mkfifo
have equivalent implementation on the other OSci/
labels to run additional/fewer testsUPGRADE.md
?