-
Notifications
You must be signed in to change notification settings - Fork 0
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
CHEF-7406 kubectl exec client #10
Conversation
Signed-off-by: Sathish Babu <sbabu@progress.com>
Signed-off-by: Sathish Babu <sbabu@progress.com>
Signed-off-by: Sathish Babu <sbabu@progress.com>
Signed-off-by: Sathish Babu <sbabu@progress.com>
Signed-off-by: Sathish Babu <sbabu@progress.com>
Signed-off-by: Sathish Babu <sbabu@progress.com>
spec/spec_helper.rb
Outdated
require "train/k8s/container" | ||
require "byebug" |
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.
Do we need byebug here?
Please merge #11 before this to auto bump versions |
res = shell.run_command | ||
Train::Extras::CommandResult.new(res.stdout, res.stderr, res.exit_status) | ||
rescue Errno::ENOENT => _e | ||
Train::Extras::CommandResult.new("", "", 1) |
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.
add error details
…F-7406-kubectl-exec-client
Signed-off-by: Sathish Babu <sbabu@progress.com>
I am merging this @sathish-progress but we need to add the code comments #10 (comment) |
Support exec commands to be executed on the container
Description
This transport allows to execute commands on the container in the kubectl cluster. In order to execute the commands on the container we introduce a
kubectl_exec_client
which takes pod, container_name and namespace as arguments to initialize a connection object, on which commands can be executed. Every command executed resultsstdout
andstderr
methods to know the results of the command.Related Issue
Types of changes
Checklist: