Skip to content
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

Merged
merged 8 commits into from
Jan 11, 2024
Merged

Conversation

sathish-progress
Copy link
Contributor

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 results stdout and stderr methods to know the results of the command.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New content (non-breaking change)
  • Breaking change (a content change which would break existing functionality or processes)

Checklist:

  • I have read the CONTRIBUTING document.

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>
require "train/k8s/container"
require "byebug"
Copy link
Contributor

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?

@sathish-progress
Copy link
Contributor Author

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)
Copy link
Contributor Author

@sathish-progress sathish-progress Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add error details

Signed-off-by: Sathish Babu <sbabu@progress.com>
@Vasu1105
Copy link
Contributor

I am merging this @sathish-progress but we need to add the code comments #10 (comment)

@Vasu1105 Vasu1105 merged commit 836ea21 into main Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants