-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Make variable expansion work for environment variables in k8s #12689
Conversation
862f2d5
to
8a0a5bf
Compare
ci-test |
Results of automated E2E tests of Eclipse Che Multiuser on OCP: |
ci-build |
ci-test |
Results of automated E2E tests of Eclipse Che Multiuser on OCP: |
ci-test |
Results of automated E2E tests of Eclipse Che Multiuser on OCP: |
ci-test |
Results of automated E2E tests of Eclipse Che Multiuser on OCP: |
@sleshchenko @garagatyi could you please take a look and review this? |
...ns/che-core-commons-lang/src/test/java/org/eclipse/che/commons/lang/TopologicalSortTest.java
Show resolved
Hide resolved
...ns/che-core-commons-lang/src/test/java/org/eclipse/che/commons/lang/TopologicalSortTest.java
Outdated
Show resolved
Hide resolved
...ns/che-core-commons-lang/src/test/java/org/eclipse/che/commons/lang/TopologicalSortTest.java
Show resolved
Hide resolved
...ommons/che-core-commons-lang/src/main/java/org/eclipse/che/commons/lang/TopologicalSort.java
Outdated
Show resolved
Hide resolved
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.
Good job 👍
Really great javadocs and comments that help understand the implementation
...ns/che-core-commons-lang/src/test/java/org/eclipse/che/commons/lang/TopologicalSortTest.java
Show resolved
Hide resolved
ci-test |
Results of automated E2E tests of Eclipse Che Multiuser on OCP: |
e5e1cef
to
2505e37
Compare
I squashed and rebased on top of latest master to clean up the PR a little |
...java/org/eclipse/che/workspace/infrastructure/kubernetes/provision/env/EnvVarsConverter.java
Outdated
Show resolved
Hide resolved
.../org/eclipse/che/workspace/infrastructure/kubernetes/provision/env/EnvVarsConverterTest.java
Outdated
Show resolved
Hide resolved
c4730e0
to
5fd91a1
Compare
...bernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/util/EnvVars.java
Show resolved
Hide resolved
...ommons/che-core-commons-lang/src/main/java/org/eclipse/che/commons/lang/TopologicalSort.java
Outdated
Show resolved
Hide resolved
d50799f
to
1ad3a8a
Compare
Squashed commits together before merging. |
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 seems I failed to understand the algorithm to the end. Can't approve or requests changes because of that. I left some comments, but rely on other reviewers reviews on whether to merge right away.
...ommons/che-core-commons-lang/src/main/java/org/eclipse/che/commons/lang/TopologicalSort.java
Outdated
Show resolved
Hide resolved
...ommons/che-core-commons-lang/src/main/java/org/eclipse/che/commons/lang/TopologicalSort.java
Outdated
Show resolved
Hide resolved
...ommons/che-core-commons-lang/src/main/java/org/eclipse/che/commons/lang/TopologicalSort.java
Show resolved
Hide resolved
K8s does the expansion only if it already knows about the variable being expanded. This means we have to sort the environment variable list prior to sending it to k8s in such a way that vars that reference others always follow the referenced ones. Signed-off-by: Lukas Krejci <lkrejci@redhat.com>
Signed-off-by: Lukas Krejci <lkrejci@redhat.com>
1ad3a8a
to
53787f0
Compare
…endent * Presize the LinkedHashMap correctly Signed-off-by: Lukas Krejci <lkrejci@redhat.com>
ci-build |
What does this PR do?
K8s does the expansion only if it already knows about the variable being
expanded.
This means we have to sort the environment variable list prior to sending
it to k8s in such a way that vars that reference others always follow the
referenced ones.
This is a reimplementation of #12610 that uses an appropriate algorithm to produce a consistent sorting of the env vars.
What issues does this PR fix or reference?
#12577
Release Notes
Docs PR
N/A