Executing command in pod fails when _request_timeout is passed in tuple format
Maintainer thường phản hồi trong vòng 3 ngày
@yliaog đang làm issue này rồi.
Từ ngày 9/10/2024.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
What happened (please include outputs or screenshots):
Executing command in pod fails if _request_timeout is passed as tuple.
The exact error is
Exception when calling CoreV1Api->connect_get_namespaced_pod_exec: (0)
Reason: '<' not supported between instances of 'float' and 'tuple'
What you expected to happen:
Expected to run the command successfully.
How to reproduce it (as minimally and precisely as possible):
`from kubernetes import client, config
from kubernetes.stream import stream
def run_command_in_pod(namespace, pod_name, container_name, command, timeout):
config.load_kube_config()
c = client.Configuration()
c.debug = True
api_instance = client.CoreV1Api()
exec_command = [
'/bin/sh',
'-c',
command
]
try:
response = stream(api_instance.connect_get_namespaced_pod_exec,
pod_name,
namespace,
container=container_name,
command=exec_command,
stderr=True, stdin=False,
stdout=True, tty=False,
_request_timeout=timeout)
print("Command output: ", response)
except client.exceptions.ApiException as e:
print("Exception when calling CoreV1Api->connect_get_namespaced_pod_exec: %s\n" % e)
if name == 'main':
namespace = 'test'
pod_name = 'test'
container_name = 'test'
command = 'date'
timeout = (5, 10)
run_command_in_pod(namespace, pod_name, container_name, command, timeout)`
Anything else we need to know?:
Environment:
- Kubernetes version (
kubectl version): 1.30 - OS (e.g., MacOS 10.13.6): Rocky 8.6
- Python version (
python --version) 3.9 - Python client version (
pip list | grep kubernetes) kubernetes-31.0.0
- Ngôn ngữ chính
- Python
- Star
- 7.7k
- Fork
- 3.5k
- Merge trung bình
- 3 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của kubernetes-client/python
-
kind/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
kubernetes-client/python#2280 · 16 bình luận · 9 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 30/100
kubernetes-client/python#2720 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Release 1.37Có thể làm lại được @yliaog đã nhận 35 ngày trước và không có pull request nào đang mở. Đang mở
kubernetes-client/python#2691 · 1 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Growing library sizeĐang mởhelp wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
kubernetes-client/python#2677 · 14 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Add option to disable strict x509 verifcation in sync clientCó thể làm lại được @Vishwa0223 đã nhận 39 ngày trước và không có pull request nào đang mở. Đang mởhelp wanted kind/feature
kubernetes-client/python#2602 · 6 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của kubernetes-client/python
Issue tương tự
-
good first issue hacktoberfest
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
RogueAlg0/taken#387 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tool-calling
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
vllm-project/vllm#59838 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
raullenchai/Rapid-MLX#4042 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
transitmatters/mbta-slow-zone-bot#70 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
open-webui/open-webui#31871 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày