Commit Graph

416 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
c330b84e5f
Merge pull request #2406 from Kevinz857/feat-deserialize-control-v2
Some checks failed
End to End Tests - master / build (3.10) (push) Has been cancelled
End to End Tests - master / build (3.8) (push) Has been cancelled
End to End Tests - master / build (3.9) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.10) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.11) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.12) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.8) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.9, coverage) (push) Has been cancelled
feat: Add option to control deserialization when watching events
2025-06-24 13:18:27 -07:00
Raj Bhargav
945de4ed37
Merge branch 'kubernetes-client:master' into master 2025-06-10 16:36:36 +05:30
Raj Bhargav
e3b373fc1f Added proxy variable to read values from environment
What type of PR is this?
/kind bug

What this PR does / why we need it:
This PRs will read environment variables assigned for proxy and no_proxy.

Update ws_client_test.py

Update configuration.py
What type of PR is this?
/kind bug

What this PR does / why we need it:
This PRs will read environment variables assigned for proxy and no_proxy.

Update configuration.py

Add debug logging doc and example

add .readthedocs.yaml config file

Added

Added insert_proxy_config.sh to edit configuration.py in client

Revert "Added insert_proxy_config.sh to edit configuration.py in client"

This reverts commit b295c2ddcbb838196823c4d7a55a67fd1d1dc290.

To avoid condition self.no_proxy is already present
2025-06-10 16:27:05 +05:30
Kevinz857
d88d61bffb feat: add switch control when watching events whether deserialization is required
This PR adds an option to disable automatic deserialization in the Watch stream().
By allowing clients to opt-out of automatic deserialization when only basic
JSON parsing is needed, we can significantly reduce time cost and improve
event processing throughput. This is particularly important in scenarios with
high event volumes or resource constraints.

Key changes:
- Added a 'deserialize' parameter to Watch.stream() method (defaults to True for backward compatibility)
- When deserialize=False, events are only JSON parsed without model conversion
- Maintains the original behavior when deserialize=True
- Added test cases to verify both behaviors
2025-05-31 18:33:21 +08:00
yliao
3fa4610d22 generated client change 2025-05-26 20:59:05 +00:00
yliao
1cc7ca51be generated API change 2025-05-26 20:59:04 +00:00
yliao
973254826b generated client change for custom_objects 2025-05-26 20:59:03 +00:00
Kubernetes Prow Robot
d010f2efd6
Merge pull request #2317 from anvil-works/allow_watch_bookmarks
Add support for allowWatchBookmarks to the dynamic client
2025-04-24 13:54:31 -07:00
dalongxia2017
b1b3e3a62e
Update README.md
Remove redundant statements.
2025-04-07 22:36:19 +08:00
Raj Bhargav
d451d2fc7a
Update watch_test.py
As per request added few empty lines to test case in watch_test.py
2025-03-20 11:23:23 +05:30
Raj Bhargav
f4d0842d0e
Update watch.py
Changes made in watch.py to print multiple empty line if necessary.
2025-03-20 11:21:20 +05:30
Raj Bhargav
1e093d04aa
Update watch_test.py
Changes made to check whether entire log is printed or not.
2025-03-20 01:44:56 +05:30
Raj Bhargav
1268769cc0
Update watch_test.py
Removed pod_manifest from watch_test.py.
2025-03-20 00:27:16 +05:30
Raj Bhargav
f0a73c8824
Update watch.py
Changes made in unmarshal_event for not having issues with empty lines.
2025-03-19 14:15:44 +05:30
Raj Bhargav
14a2554c18
Delete kubernetes/test/test_pod_logs.py
Deleting file with tests added in test/test_pod_los.py
2025-03-18 13:48:38 +05:30
Raj Bhargav
3cee537e63
Update watch_test.py
Added a unit test name test_pod_log_empty_lines to check if watch is printing empty lines. And made changes in test_watch_with_interspersed_newlines as the watch is also printing empty line. Added a condition to check for empty lines in ogs to avoid the errors.
2025-03-18 13:46:41 +05:30
Raj Bhargav
b2f975537c
Create test_pod_logs.py
This file is to test whether empty line are printed when watch function in the kubernetes python client is used.
2025-03-13 13:57:29 +05:30
Raj Bhargav
d1adc8a544
Changes for issue 2358
Changes made in wacth.py to print Empty newlines that are skipped when watching pod logs.
2025-03-08 20:45:32 +05:30
Kubernetes Prow Robot
de280fbf1f
Merge pull request #2340 from tomasaschan/fix-exec-provider
Fix exec provider
2025-02-14 08:40:22 -08:00
Tomas Aschan
a588f51328
Address review feedback 2025-02-14 15:43:39 +01:00
Kubernetes Prow Robot
065a968e9e
Merge pull request #2338 from akhilputhiry/2333
mark shell=False in ExecProvider for linux/darwin platforms
2025-01-31 09:12:56 -08:00
Kubernetes Prow Robot
9775a1276b
Merge pull request #2216 from rkschamer/master
Adding utils.format_quantity
2025-01-29 07:45:24 -08:00
Tomas Aschan
f64be15641
fix: Extract value from ConfigNode before storing it 2025-01-29 15:00:41 +01:00
Tomas Aschan
df1b0c156f
Tweak test to fail like the production code does 2025-01-29 14:57:38 +01:00
Akhil Lawrence
e852ac71f9 mark shell=False in ExecProvider for linux/darwin platforms 2025-01-29 07:51:33 +05:30
Kubernetes Prow Robot
e93f240759
Merge pull request #2316 from anvil-works/handle-ws-close
Close the Python sockets when the Websocket closes
2025-01-17 16:06:35 -08:00
Pete
16ffec46ca Add support for allowWatchBookmarks to the dynamic client 2025-01-07 11:35:28 +00:00
Pete
3b58df2b74 Close the Python sockets when the Websocket closes
This allows the client to detect when the connection has been interrupted
2025-01-06 08:17:09 +00:00
yliao
d99d7805e7 generated client change 2024-12-17 17:23:53 +00:00
yliao
5342870c0d generated API change 2024-12-17 17:23:52 +00:00
yliao
d21b108aa4 generated client change for custom_objects 2024-12-17 17:23:51 +00:00
Rafał
ee5b9e21a2
Merge branch 'kubernetes-client:master' into patch-1 2024-11-27 15:45:20 +01:00
Brendan Burns
8c60fe94e0 Support providing cluster info to the exec provider
Some checks failed
Kubernetes Python Client - Validation / build (3.10) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.11) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.7) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.8) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.9, coverage) (push) Has been cancelled
2024-10-30 19:50:34 +00:00
Pranoy Dey
2dfa782fb9
Added Shell=True for windows flow. Fixes file not found error while running in Windows 2024-10-05 17:31:29 +05:30
Kubernetes Prow Robot
18fe6683d5
Merge pull request #2252 from dcmcand/master
Add ability to use server_side_apply to  utils.create_from_yaml
2024-09-16 14:57:13 +01:00
Kubernetes Prow Robot
d8f35c7ef3
Merge pull request #2272 from kavishdahekar/kavishdahekar-patch-1
fix: missing method invocation in kube_config_test.py
2024-08-30 23:30:44 +01:00
yliao
9c663464d8 generated client change 2024-08-29 21:25:26 +00:00
yliao
35fb14eea8 generated API change 2024-08-29 21:25:25 +00:00
yliao
57c5182237 generated client change for custom_objects 2024-08-29 21:25:24 +00:00
Rafał
51d65dec05
Merge branch 'kubernetes-client:master' into patch-1 2024-08-29 15:15:04 +02:00
Kavish Dahekar
dac8a5c7a5
Update kube_config_test.py
fix missing method invocation
2024-08-27 13:21:57 +02:00
Flynn
6a5e7e9eb4 Don't rely on durationpy for formatting; just do it manually.
This approach is less fragile, and also allows all three implementations (Rust, Go, and Python) to work in a similar way.

Signed-off-by: Flynn <emissary@flynn.kodachi.com>
2024-08-21 10:28:33 -04:00
Flynn
8e3d9c4d89 Formatting.
Signed-off-by: Flynn <emissary@flynn.kodachi.com>
2024-08-16 15:46:35 -04:00
Flynn
40aaae5e53 Doctests!
Signed-off-by: Flynn <emissary@flynn.kodachi.com>
2024-08-16 15:35:53 -04:00
Flynn
862f48aa92 Clean up range checking in format_duration.
Signed-off-by: Flynn <emissary@flynn.kodachi.com>
2024-08-16 15:35:39 -04:00
Flynn
9d620ad4cb Add utility functions to parse and format GEP-2257 Duration strings for Gateway API
Signed-off-by: Flynn <emissary@flynn.kodachi.com>
2024-08-09 23:35:23 -04:00
Chuck McAndrew
b40eaf279a Add ability to use server_side_apply to utils.create_from_yaml 2024-06-27 16:05:50 -07:00
yliao
109fe00035 generated client change 2024-05-21 22:28:03 +00:00
yliao
2aa427de83 generated API change 2024-05-21 22:28:02 +00:00
yliao
744f0ebb83 generated client change for custom_objects 2024-05-21 22:28:02 +00:00