Compare commits
2 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 7d6160be35 | |||
|
|
91f7b5e2c9 |
@@ -1,7 +1,7 @@
|
|||||||
Index: kubernetes-33.1.0/kubernetes/config/exec_provider.py
|
Index: kubernetes-34.1.0/kubernetes/config/exec_provider.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- kubernetes-33.1.0.orig/kubernetes/config/exec_provider.py
|
--- kubernetes-34.1.0.orig/kubernetes/config/exec_provider.py
|
||||||
+++ kubernetes-33.1.0/kubernetes/config/exec_provider.py
|
+++ kubernetes-34.1.0/kubernetes/config/exec_provider.py
|
||||||
@@ -58,15 +58,6 @@ class ExecProvider(object):
|
@@ -58,15 +58,6 @@ class ExecProvider(object):
|
||||||
else:
|
else:
|
||||||
self.cluster = None
|
self.cluster = None
|
||||||
@@ -18,7 +18,7 @@ Index: kubernetes-33.1.0/kubernetes/config/exec_provider.py
|
|||||||
|
|
||||||
def run(self, previous_response=None):
|
def run(self, previous_response=None):
|
||||||
is_interactive = hasattr(sys.stdout, 'isatty') and sys.stdout.isatty()
|
is_interactive = hasattr(sys.stdout, 'isatty') and sys.stdout.isatty()
|
||||||
@@ -91,7 +82,7 @@ class ExecProvider(object):
|
@@ -96,7 +87,7 @@ class ExecProvider(object):
|
||||||
cwd=self.cwd,
|
cwd=self.cwd,
|
||||||
env=self.env,
|
env=self.env,
|
||||||
universal_newlines=True,
|
universal_newlines=True,
|
||||||
@@ -27,25 +27,38 @@ Index: kubernetes-33.1.0/kubernetes/config/exec_provider.py
|
|||||||
(stdout, stderr) = process.communicate()
|
(stdout, stderr) = process.communicate()
|
||||||
exit_code = process.wait()
|
exit_code = process.wait()
|
||||||
if exit_code != 0:
|
if exit_code != 0:
|
||||||
Index: kubernetes-33.1.0/kubernetes/config/exec_provider_test.py
|
Index: kubernetes-34.1.0/kubernetes/config/exec_provider_test.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- kubernetes-33.1.0.orig/kubernetes/config/exec_provider_test.py
|
--- kubernetes-34.1.0.orig/kubernetes/config/exec_provider_test.py
|
||||||
+++ kubernetes-33.1.0/kubernetes/config/exec_provider_test.py
|
+++ kubernetes-34.1.0/kubernetes/config/exec_provider_test.py
|
||||||
@@ -180,8 +180,15 @@ class ExecProviderTest(unittest.TestCase
|
@@ -180,7 +180,14 @@ class ExecProviderTest(unittest.TestCase
|
||||||
self.assertTrue(isinstance(result, dict))
|
self.assertTrue(isinstance(result, dict))
|
||||||
self.assertTrue('token' in result)
|
self.assertTrue('token' in result)
|
||||||
|
|
||||||
- obj = json.loads(mock.call_args.kwargs['env']['KUBERNETES_EXEC_INFO'])
|
- obj = json.loads(mock.call_args.kwargs['env']['KUBERNETES_EXEC_INFO'])
|
||||||
- self.assertEqual(obj['spec']['cluster']['server'], 'name.company.com')
|
|
||||||
+ #obj = json.loads(mock.call_args.kwargs['env']['KUBERNETES_EXEC_INFO'])
|
+ #obj = json.loads(mock.call_args.kwargs['env']['KUBERNETES_EXEC_INFO'])
|
||||||
+ #self.assertEqual(obj['spec']['cluster']['server'], 'name.company.com')
|
+ #self.assertEqual(obj['spec']['cluster']['server'], 'name.company.com')
|
||||||
+ # Check the KUBERNETES_EXEC_INFO env var
|
+ # Check the KUBERNETES_EXEC_INFO env var
|
||||||
+ args, kwargs = mock.call_args
|
+ args, kwargs = mock.call_args
|
||||||
+ env = kwargs['env']
|
+ env = kwargs['env']
|
||||||
+ exec_info = json.loads(env['KUBERNETES_EXEC_INFO'])
|
+ obj = json.loads(env['KUBERNETES_EXEC_INFO'])
|
||||||
+
|
+
|
||||||
+ self.assertIn('cluster', exec_info['spec'])
|
+ self.assertIn('cluster', obj['spec'])
|
||||||
+ self.assertEqual(exec_info['spec']['cluster']['server'], 'name.company.com')
|
self.assertEqual(obj['spec']['cluster']['server'], 'name.company.com')
|
||||||
|
|
||||||
|
@mock.patch("subprocess.Popen")
|
||||||
|
@@ -211,7 +218,13 @@ class ExecProviderTest(unittest.TestCase
|
||||||
|
self.assertTrue(isinstance(result, dict))
|
||||||
|
self.assertTrue("token" in result)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
- obj = json.loads(mock.call_args.kwargs["env"]["KUBERNETES_EXEC_INFO"])
|
||||||
|
+ #obj = json.loads(mock.call_args.kwargs["env"]["KUBERNETES_EXEC_INFO"])
|
||||||
|
+ # Check the KUBERNETES_EXEC_INFO env var
|
||||||
|
+ args, kwargs = mock.call_args
|
||||||
|
+ env = kwargs['env']
|
||||||
|
+ obj = json.loads(env['KUBERNETES_EXEC_INFO'])
|
||||||
|
+
|
||||||
|
+ self.assertIn('cluster', obj['spec'])
|
||||||
|
self.assertEqual(obj["spec"]["cluster"]["server"], "name.company.com")
|
||||||
|
self.assertEqual(obj["spec"]["cluster"]["config"]["namespace"], "myproject")
|
||||||
|
self.assertEqual(obj["spec"]["cluster"]["config"]["name"], "mycluster")
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:f64d829843a54c251061a8e7a14523b521f2dc5c896cf6d65ccf348648a88993
|
|
||||||
size 1036779
|
|
||||||
3
kubernetes-34.1.0.tar.gz
Normal file
3
kubernetes-34.1.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8fe8edb0b5d290a2f3ac06596b23f87c658977d46b5f8df9d0f4ea83d0003912
|
||||||
|
size 1083771
|
||||||
@@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 8 07:19:11 UTC 2025 - Priyanka Saggu <priyanka.saggu@suse.com>
|
||||||
|
|
||||||
|
- version update to 34.1.0
|
||||||
|
* please refer to the changelog at https://github.com/kubernetes-client/python/blob/v34.1.0/CHANGELOG.md#v3410
|
||||||
|
|
||||||
|
- updated patch: fix-exec-provider-test-sle-15-sp4.patch
|
||||||
|
|
||||||
|
- remove pinneded verion dependency from python-oauthlib module
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jun 11 09:26:29 UTC 2025 - Priyanka Saggu <priyanka.saggu@suse.com>
|
Wed Jun 11 09:26:29 UTC 2025 - Priyanka Saggu <priyanka.saggu@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-kubernetes
|
# spec file for package python-kubernetes
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC and contributors
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-kubernetes
|
Name: python-kubernetes
|
||||||
Version: 33.1.0
|
Version: 34.1.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Kubernetes python client
|
Summary: Kubernetes python client
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
@@ -46,15 +46,12 @@ BuildRequires: fdupes
|
|||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module Sphinx >= 1.4}
|
BuildRequires: %{python_module Sphinx >= 1.4}
|
||||||
|
BuildRequires: %{python_module oauthlib}
|
||||||
BuildRequires: %{python_module pluggy >= 0.3.1}
|
BuildRequires: %{python_module pluggy >= 0.3.1}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module recommonmark}
|
BuildRequires: %{python_module recommonmark}
|
||||||
%if 0%{?sle_version} && 0%{?sle_version} > 150400
|
|
||||||
# Build python-kubernetes with oauthlib >=3.2.2, for sle_version > SLE-15-SP4
|
|
||||||
BuildRequires: %{python_module oauthlib >= 3.2.2}
|
|
||||||
# /SECTION
|
# /SECTION
|
||||||
Requires: python-oauthlib >= 3.2.2
|
Requires: python-oauthlib
|
||||||
%endif
|
|
||||||
Requires: python-PyYAML >= 5.4.1
|
Requires: python-PyYAML >= 5.4.1
|
||||||
Requires: python-certifi >= 14.05.14
|
Requires: python-certifi >= 14.05.14
|
||||||
Requires: python-durationpy >= 0.7
|
Requires: python-durationpy >= 0.7
|
||||||
|
|||||||
Reference in New Issue
Block a user