-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat: impl'd describe for pods (#553) #770
Merged
Merged
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
adietish
force-pushed
the
issue-553
branch
19 times, most recently
from
July 17, 2024 11:14
d0c9a23
to
8f7a6b7
Compare
adietish
force-pushed
the
issue-553
branch
9 times, most recently
from
July 19, 2024 10:35
5e9b237
to
b45481e
Compare
@sbouchet I also changed
Command:
/kuberos
https://accounts.google.com
REDACTED.apps.googleusercontent.com
/cfg/secret
/cfg/template
Command: |-
/kuberos
https://accounts.google.com
REDACTED.apps.googleusercontent.com
/cfg/secret
/cfg/template |
adietish
force-pushed
the
issue-553
branch
18 times, most recently
from
August 8, 2024 11:07
27903b3
to
20dcf3e
Compare
@sbouchet please re-review, thanks! |
sbouchet
reviewed
Aug 9, 2024
src/main/kotlin/com/redhat/devtools/intellij/kubernetes/actions/DescribeResourceAction.kt
Outdated
Show resolved
Hide resolved
sbouchet
reviewed
Aug 9, 2024
...n/kotlin/com/redhat/devtools/intellij/kubernetes/editor/KubernetesEditorsTabTitleProvider.kt
Outdated
Show resolved
Hide resolved
sbouchet
reviewed
Aug 9, 2024
src/test/kotlin/com/redhat/devtools/intellij/kubernetes/model/mocks/PodContainer.kt
Show resolved
Hide resolved
sbouchet
reviewed
Aug 9, 2024
src/test/kotlin/com/redhat/devtools/intellij/kubernetes/model/util/PodUtilsTest.kt
Outdated
Show resolved
Hide resolved
sbouchet
approved these changes
Aug 9, 2024
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.
nitpicking copyrights. LGTM !
Signed-off-by: Andre Dietisheim <[email protected]>
Quality Gate passedIssues Measures |
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.
partially fixes #553: it only provides "describe" for pods, no other resource kind is supported. Support for these is filed at #782
How to test this:
This implementation should provide the same output as
kubectl describe pod <name>
.Steps:
https://gist.github.com/adietish/b9bde277776f657af7d76515effa1882#file-describe-test-yml. Then push the editor to the cluster.
(alternatively you can also use kubectl with the file:
kubectl apply -f describe-test.yml
)Pod
describe-test is created and show up in the resource treekubectl describe pod describe-test
and compare the output with the content of the editorComparing the outputs:
You can use a diff or https://www.diffchecker.com/text-compare/ which helps a lot.
There are limitations that were not implemented yet (ex. the list of events that kubectl is printing in the end of the output):
The following examples show equivalence in intellij-kubernetes and kubectl. The differences are mainly in formatting, cause by the fact the intellij-kubernetes is producing YAML whereas
kubectl
is simply printing text.Examples:
kubectl
intellij-kubernetes
(creates a yaml mapping,<key>:<value>
instead of<key>=<value>
)kubectl
intellij-kubernetes
(prints<none>
instead of ``)kubectl
intellij-kubernetes
(skips heading: "Type Status")kubectl
intellij-kuberetes
(creates a yaml sequence, each element starts with-
):kubectl
intellij-kubernetes
(does not resolve expressionv1:metadata.name
to the valuedescribe-test
. It only prints the expression(v1:metadata-name)
. Known limitation, filed to Describe: Impl resource resolution for env vars #774)