Skip to content

Commit b37946f

Browse files
authored
Merge pull request #2004 from yliaog/automated-release-of-26.1.0b1-upstream-release-26.0-1675142889
Automated release of 26.1.0b1 upstream release 26.0 1675142889
2 parents 4e84baa + 3105194 commit b37946f

File tree

16 files changed

+100
-13
lines changed

16 files changed

+100
-13
lines changed

.github/workflows/test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ jobs:
4646
if: "matrix.use_coverage"
4747
uses: codecov/codecov-action@v3
4848
with:
49-
fail_ci_if_error: true
49+
fail_ci_if_error: false
5050
verbose: true

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# v26.1.0b1
2+
3+
Kubernetes API Version: v1.26.1
4+
5+
### Bug or Regression
6+
- The timeout unit of the WSClient update method is now always seconds for both poll and select functions. (#1976, @t-yrka)
7+
8+
### Feature
9+
- Adds support for loading CA certificates from a file using the `idp-certificate-authority` key for the oidc plugin. (#1916, @vgupta3)
10+
111
# v26.1.0a1
212

313
Kubernetes API Version: v1.26.1

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ supported versions of Kubernetes clusters.
9595
- [client 23.y.z](https://pypi.org/project/kubernetes/23.6.0/): Kubernetes 1.22 or below (+-), Kubernetes 1.23 (✓), Kubernetes 1.24 or above (+-)
9696
- [client 24.y.z](https://pypi.org/project/kubernetes/24.2.0/): Kubernetes 1.23 or below (+-), Kubernetes 1.24 (✓), Kubernetes 1.25 or above (+-)
9797
- [client 25.y.z](https://pypi.org/project/kubernetes/25.3.0/): Kubernetes 1.24 or below (+-), Kubernetes 1.25 (✓), Kubernetes 1.26 or above (+-)
98-
- [client 26.y.z](https://pypi.org/project/kubernetes/26.1.0a1/): Kubernetes 1.25 or below (+-), Kubernetes 1.26 (✓), Kubernetes 1.27 or above (+-)
98+
- [client 26.y.z](https://pypi.org/project/kubernetes/26.1.0b1/): Kubernetes 1.25 or below (+-), Kubernetes 1.26 (✓), Kubernetes 1.27 or above (+-)
9999

100100
> See [here](#homogenizing-the-kubernetes-python-client-versions) for an explanation of why there is no v13-v16 release.
101101

examples/dynamic-client/accept_header.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ def main():
4040

4141

4242
if __name__ == "__main__":
43-
main()
43+
main()
+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Copyright 2023 The Kubernetes Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""
16+
This example demonstrates the following:
17+
- Creation of a k8s configmap using dynamic-client
18+
- Setting the request timeout which is time duration in seconds
19+
"""
20+
21+
from kubernetes import config, dynamic
22+
from kubernetes.client import api_client
23+
24+
25+
def main():
26+
# Creating a dynamic client
27+
client = dynamic.DynamicClient(
28+
api_client.ApiClient(configuration=config.load_kube_config())
29+
)
30+
31+
# fetching the configmap api
32+
api = client.resources.get(api_version="v1", kind="ConfigMap")
33+
34+
configmap_name = "request-timeout-test-configmap"
35+
36+
configmap_manifest = {
37+
"kind": "ConfigMap",
38+
"apiVersion": "v1",
39+
"metadata": {
40+
"name": configmap_name,
41+
"labels": {
42+
"foo": "bar",
43+
},
44+
},
45+
"data": {
46+
"config.json": '{"command":"/usr/bin/mysqld_safe"}',
47+
"frontend.cnf": "[mysqld]\nbind-address = 10.0.0.3\n",
48+
},
49+
}
50+
51+
# Creating configmap `request-timeout-test-configmap` in the `default` namespace
52+
# Client-side timeout to 60 seconds
53+
54+
configmap = api.create(body=configmap_manifest, namespace="default", _request_time=60)
55+
56+
print("\n[INFO] configmap `request-timeout-test-configmap` created\n")
57+
58+
# Listing the configmaps in the `default` namespace
59+
# Client-side timeout to 60 seconds
60+
61+
configmap_list = api.get(
62+
name=configmap_name, namespace="default", label_selector="foo=bar", _request_time=60
63+
)
64+
65+
print("NAME:\n%s\n" % (configmap_list.metadata.name))
66+
print("DATA:\n%s\n" % (configmap_list.data))
67+
68+
69+
if __name__ == "__main__":
70+
main()

examples/pod_exec.py

+2
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ def exec_commands(api_instance):
7171
'/bin/sh',
7272
'-c',
7373
'echo This message goes to stderr; echo This message goes to stdout']
74+
# When calling a pod with multiple containers running the target container
75+
# has to be specified with a keyword argument container=<name>.
7476
resp = stream(api_instance.connect_get_namespaced_pod_exec,
7577
name,
7678
'default',

examples/watch/timeout-settings.md

+3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ There are two inputs available in the client, that could be used to set connecti
5656
***Refer***
5757
- *[https://github.com/kubernetes-client/python/blob/v17.17.0/kubernetes/client/api_client.py#L336-L339](https://github.com/kubernetes-client/python/blob/v17.17.0/kubernetes/client/api_client.py#L336-L339)*
5858

59+
***Example***
60+
- *[request_timeout.py](../dynamic-client/request_timeout.py)*
61+
5962
- In case of network outage, leading to dropping all packets with no RST/FIN, the timeout value (in seconds) determined by the `request_timeout` argument, would be the time duration for how long the client will wait before dropping the connection.
6063

6164
- When the timeout happens, an exception will be raised, for eg. ~

kubernetes/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: release-1.26
7-
- Package version: 26.1.0a1
7+
- Package version: 26.1.0b1
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99

1010
## Requirements.

kubernetes/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
__project__ = 'kubernetes'
1616
# The version is auto-updated. Please do not edit.
17-
__version__ = "26.1.0a1"
17+
__version__ = "26.1.0b1"
1818

1919
from . import client
2020
from . import config

kubernetes/base/stream/ws_client.py

+2
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ def update(self, timeout=0):
182182
if hasattr(select, "poll"):
183183
poll = select.poll()
184184
poll.register(self.sock.sock, select.POLLIN)
185+
if timeout is not None:
186+
timeout *= 1_000 # poll method uses milliseconds as the time unit
185187
r = poll.poll(timeout)
186188
poll.unregister(self.sock.sock)
187189
else:

kubernetes/client/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from __future__ import absolute_import
1616

17-
__version__ = "26.1.0a1"
17+
__version__ = "26.1.0b1"
1818

1919
# import apis into sdk package
2020
from kubernetes.client.api.well_known_api import WellKnownApi

kubernetes/client/api_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7878
self.default_headers[header_name] = header_value
7979
self.cookie = cookie
8080
# Set default User-Agent.
81-
self.user_agent = 'OpenAPI-Generator/26.1.0a1/python'
81+
self.user_agent = 'OpenAPI-Generator/26.1.0b1/python'
8282
self.client_side_validation = configuration.client_side_validation
8383

8484
def __enter__(self):

kubernetes/client/configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def to_debug_report(self):
350350
"OS: {env}\n"\
351351
"Python Version: {pyversion}\n"\
352352
"Version of the API: release-1.26\n"\
353-
"SDK Package Version: 26.1.0a1".\
353+
"SDK Package Version: 26.1.0b1".\
354354
format(env=sys.platform, pyversion=sys.version)
355355

356356
def get_host_settings(self):

kubernetes/utils/quantity.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def parse_quantity(quantity):
6464
else:
6565
raise ValueError("{} has unknown suffix".format(quantity))
6666

67-
# handly SI inconsistency
67+
# handle SI inconsistency
6868
if suffix == "ki":
6969
raise ValueError("{} has unknown suffix".format(quantity))
7070

scripts/constants.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
KUBERNETES_BRANCH = "release-1.26"
1919

2020
# client version for packaging and releasing.
21-
CLIENT_VERSION = "26.1.0a1"
21+
CLIENT_VERSION = "26.1.0b1"
2222

2323
# Name of the release package
2424
PACKAGE_NAME = "kubernetes"
2525

2626
# Stage of development, mainly used in setup.py's classifiers.
27-
DEVELOPMENT_STATUS = "3 - Alpha"
27+
DEVELOPMENT_STATUS = "4 - Beta"
2828

2929

3030
# If called directly, return the constant value given

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
# Do not edit these constants. They will be updated automatically
1818
# by scripts/update-client.sh.
19-
CLIENT_VERSION = "26.1.0a1"
19+
CLIENT_VERSION = "26.1.0b1"
2020
PACKAGE_NAME = "kubernetes"
21-
DEVELOPMENT_STATUS = "3 - Alpha"
21+
DEVELOPMENT_STATUS = "4 - Beta"
2222

2323
# To install the library, run the following
2424
#

0 commit comments

Comments
 (0)