We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi 馃憢,
I have a valid json log messages in my container. I would like to get a last log message:
json
from kubernetes import client, config config.load_kube_config() v1 = client.CoreV1Api() namespace = "namespacename" pod = "podname" ret = v1.read_namespaced_pod_log( name=pod, namespace=namespace, tail_lines=1, ) print(ret)
It returns:
{'time': '2024-02-19T13:32:53.08943787Z', 'level': 'INFO', 'msg': 'some msg'}
This is incorrect. There is single quotes in return. It should be:
{"time": "2024-02-19T13:32:53.08943787Z", "level": "INFO", "msg": "some msg"}
I think, that the reason for this in https://github.com/kubernetes-client/python/blob/master/kubernetes/client/api_client.py#L260.
Eventually, for valid json we have this transformation (after deserialization):
str(json.loads(response))
Environment:
kubectl version
python --version
pip list | grep kubernetes
The text was updated successfully, but these errors were encountered:
The code is generated. The upstream code generator is https://github.com/OpenAPITools/openapi-generator. @dyens Could you check if the change should be made upsteram?
Sorry, something went wrong.
Thanks for the detailed bug report. This has been fixed in the latest master of OpenAPITools/openapi-generator It will be released in v7.5.0
No branches or pull requests
Hi 馃憢,
I have a valid
json
log messages in my container.I would like to get a last log message:
It returns:
{'time': '2024-02-19T13:32:53.08943787Z', 'level': 'INFO', 'msg': 'some msg'}
This is incorrect. There is single quotes in return. It should be:
{"time": "2024-02-19T13:32:53.08943787Z", "level": "INFO", "msg": "some msg"}
I think, that the reason for this in https://github.com/kubernetes-client/python/blob/master/kubernetes/client/api_client.py#L260.
Eventually, for valid
json
we have this transformation (after deserialization):str(json.loads(response))
Environment:
kubectl version
): 1.23python --version
): 3.11.7pip list | grep kubernetes
): 29.0.0The text was updated successfully, but these errors were encountered: