From 92ea48b80d501ef6b7f7bd46d44601f4724e70d6 Mon Sep 17 00:00:00 2001 From: Yu Liao Date: Tue, 25 Oct 2022 23:35:48 +0000 Subject: [PATCH 1/6] update changelog with release notes from master branch --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1306418ad..f09f8d425 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# v25.3.0 + +Kubernetes API Version: v1.25.3 + +### Feature +- Adds support for loading CA certificates from a file using the `idp-certificate-authority` key for the oidc plugin. (#1916, @vgupta3) + # v25.3.0b1 Kubernetes API Version: v1.25.3 From ea36451601d3a6ca0869b3c64ee63ccfedc3f6fd Mon Sep 17 00:00:00 2001 From: Yu Liao Date: Tue, 25 Oct 2022 23:35:48 +0000 Subject: [PATCH 2/6] update version constants for 25.3.0 release --- scripts/constants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/constants.py b/scripts/constants.py index f771e9223..89f35d558 100644 --- a/scripts/constants.py +++ b/scripts/constants.py @@ -18,13 +18,13 @@ import sys KUBERNETES_BRANCH = "release-1.25" # client version for packaging and releasing. -CLIENT_VERSION = "25.3.0b1" +CLIENT_VERSION = "25.3.0" # Name of the release package PACKAGE_NAME = "kubernetes" # Stage of development, mainly used in setup.py's classifiers. -DEVELOPMENT_STATUS = "4 - Beta" +DEVELOPMENT_STATUS = "5 - Production/Stable" # If called directly, return the constant value given From cef4c9ce46f040d1dfa416ef73a018d7e2bea435 Mon Sep 17 00:00:00 2001 From: Yu Liao Date: Tue, 25 Oct 2022 23:38:09 +0000 Subject: [PATCH 3/6] generated client change for custom_objects --- kubernetes/client/api/custom_objects_api.py | 123 ++++++++++++++++++++ 1 file changed, 123 insertions(+) diff --git a/kubernetes/client/api/custom_objects_api.py b/kubernetes/client/api/custom_objects_api.py index de7b8e86b..ae787c259 100644 --- a/kubernetes/client/api/custom_objects_api.py +++ b/kubernetes/client/api/custom_objects_api.py @@ -1031,6 +1031,129 @@ class CustomObjectsApi(object): _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) + def get_api_resources(self, group, version, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources(group, version, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str group: The custom resource's group name (required) + :param str version: The custom resource's version (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: V1APIResourceList + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_api_resources_with_http_info(group, version, **kwargs) # noqa: E501 + + def get_api_resources_with_http_info(self, group, version, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 + + get available resources # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_api_resources_with_http_info(group, version, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str group: The custom resource's group name (required) + :param str version: The custom resource's version (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'group', + 'version' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_api_resources" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'group' is set + if self.api_client.client_side_validation and ('group' not in local_var_params or # noqa: E501 + local_var_params['group'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group` when calling `get_api_resources`") # noqa: E501 + # verify the required parameter 'version' is set + if self.api_client.client_side_validation and ('version' not in local_var_params or # noqa: E501 + local_var_params['version'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `version` when calling `get_api_resources`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'group' in local_var_params: + path_params['group'] = local_var_params['group'] # noqa: E501 + if 'version' in local_var_params: + path_params['version'] = local_var_params['version'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['BearerToken'] # noqa: E501 + + return self.api_client.call_api( + '/apis/{group}/{version}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1APIResourceList', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + def get_cluster_custom_object(self, group, version, plural, name, **kwargs): # noqa: E501 """get_cluster_custom_object # noqa: E501 From 90a9052f44ccb1346287999506cc9d9d2441a1d3 Mon Sep 17 00:00:00 2001 From: Yu Liao Date: Tue, 25 Oct 2022 23:38:09 +0000 Subject: [PATCH 4/6] generated API change --- kubernetes/docs/CustomObjectsApi.md | 68 +++++++++++++++++++++++++++++ scripts/swagger.json | 45 +++++++++++++++++++ 2 files changed, 113 insertions(+) diff --git a/kubernetes/docs/CustomObjectsApi.md b/kubernetes/docs/CustomObjectsApi.md index 2203c5d3a..990f7048e 100644 --- a/kubernetes/docs/CustomObjectsApi.md +++ b/kubernetes/docs/CustomObjectsApi.md @@ -10,6 +10,7 @@ Method | HTTP request | Description [**delete_collection_cluster_custom_object**](CustomObjectsApi.md#delete_collection_cluster_custom_object) | **DELETE** /apis/{group}/{version}/{plural} | [**delete_collection_namespaced_custom_object**](CustomObjectsApi.md#delete_collection_namespaced_custom_object) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural} | [**delete_namespaced_custom_object**](CustomObjectsApi.md#delete_namespaced_custom_object) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name} | +[**get_api_resources**](CustomObjectsApi.md#get_api_resources) | **GET** /apis/{group}/{version} | [**get_cluster_custom_object**](CustomObjectsApi.md#get_cluster_custom_object) | **GET** /apis/{group}/{version}/{plural}/{name} | [**get_cluster_custom_object_scale**](CustomObjectsApi.md#get_cluster_custom_object_scale) | **GET** /apis/{group}/{version}/{plural}/{name}/scale | [**get_cluster_custom_object_status**](CustomObjectsApi.md#get_cluster_custom_object_status) | **GET** /apis/{group}/{version}/{plural}/{name}/status | @@ -516,6 +517,73 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_api_resources** +> V1APIResourceList get_api_resources(group, version) + + + +get available resources + +### Example + +* Api Key Authentication (BearerToken): +```python +from __future__ import print_function +import time +import kubernetes.client +from kubernetes.client.rest import ApiException +from pprint import pprint +configuration = kubernetes.client.Configuration() +# Configure API key authorization: BearerToken +configuration.api_key['authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['authorization'] = 'Bearer' + +# Defining host is optional and default to http://localhost +configuration.host = "http://localhost" + +# Enter a context with an instance of the API kubernetes.client +with kubernetes.client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = kubernetes.client.CustomObjectsApi(api_client) + group = 'group_example' # str | The custom resource's group name +version = 'version_example' # str | The custom resource's version + + try: + api_response = api_instance.get_api_resources(group, version) + pprint(api_response) + except ApiException as e: + print("Exception when calling CustomObjectsApi->get_api_resources: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group** | **str**| The custom resource's group name | + **version** | **str**| The custom resource's version | + +### Return type + +[**V1APIResourceList**](V1APIResourceList.md) + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_cluster_custom_object** > object get_cluster_custom_object(group, version, plural, name) diff --git a/scripts/swagger.json b/scripts/swagger.json index 54ec96c32..8db84417a 100644 --- a/scripts/swagger.json +++ b/scripts/swagger.json @@ -76815,6 +76815,51 @@ ] } }, + "/apis/{group}/{version}": { + "parameters": [ + { + "name": "group", + "in": "path", + "required": true, + "description": "The custom resource's group name", + "type": "string" + }, + { + "name": "version", + "in": "path", + "required": true, + "description": "The custom resource's version", + "type": "string" + } + ], + "get": { + "operationId": "getAPIResources", + "description": "get available resources", + "tags": [ + "custom_objects" + ], + "consumes": [ + "*/*" + ], + "produces": [ + "application/json" + ], + "schemes": [ + "https" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, "/apis/{group}/{version}/{plural}": { "parameters": [ { From fd673fba501b3305bb02efa244e5e1c3f2bb1eb5 Mon Sep 17 00:00:00 2001 From: Yu Liao Date: Tue, 25 Oct 2022 23:38:09 +0000 Subject: [PATCH 5/6] generated client change --- kubernetes/.openapi-generator/swagger.json.sha256 | 2 +- kubernetes/README.md | 3 ++- kubernetes/__init__.py | 2 +- kubernetes/client/__init__.py | 2 +- kubernetes/client/api_client.py | 2 +- kubernetes/client/configuration.py | 2 +- setup.py | 4 ++-- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/kubernetes/.openapi-generator/swagger.json.sha256 b/kubernetes/.openapi-generator/swagger.json.sha256 index 0161b5cf1..bfcbb9739 100644 --- a/kubernetes/.openapi-generator/swagger.json.sha256 +++ b/kubernetes/.openapi-generator/swagger.json.sha256 @@ -1 +1 @@ -32d8e8aca85c7267307b37bf60cf99de68d8375371e641d975d111d1b17e2e8b \ No newline at end of file +438073e9d3561c067c312a52fe1c1082abb45407757f52b79be344992edc2da6 \ No newline at end of file diff --git a/kubernetes/README.md b/kubernetes/README.md index c703ddf00..d8b1afac2 100644 --- a/kubernetes/README.md +++ b/kubernetes/README.md @@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: release-1.25 -- Package version: 25.3.0b1 +- Package version: 25.3.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. @@ -491,6 +491,7 @@ Class | Method | HTTP request | Description *CustomObjectsApi* | [**delete_collection_cluster_custom_object**](docs/CustomObjectsApi.md#delete_collection_cluster_custom_object) | **DELETE** /apis/{group}/{version}/{plural} | *CustomObjectsApi* | [**delete_collection_namespaced_custom_object**](docs/CustomObjectsApi.md#delete_collection_namespaced_custom_object) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural} | *CustomObjectsApi* | [**delete_namespaced_custom_object**](docs/CustomObjectsApi.md#delete_namespaced_custom_object) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name} | +*CustomObjectsApi* | [**get_api_resources**](docs/CustomObjectsApi.md#get_api_resources) | **GET** /apis/{group}/{version} | *CustomObjectsApi* | [**get_cluster_custom_object**](docs/CustomObjectsApi.md#get_cluster_custom_object) | **GET** /apis/{group}/{version}/{plural}/{name} | *CustomObjectsApi* | [**get_cluster_custom_object_scale**](docs/CustomObjectsApi.md#get_cluster_custom_object_scale) | **GET** /apis/{group}/{version}/{plural}/{name}/scale | *CustomObjectsApi* | [**get_cluster_custom_object_status**](docs/CustomObjectsApi.md#get_cluster_custom_object_status) | **GET** /apis/{group}/{version}/{plural}/{name}/status | diff --git a/kubernetes/__init__.py b/kubernetes/__init__.py index f5d8f1a59..2154256e2 100644 --- a/kubernetes/__init__.py +++ b/kubernetes/__init__.py @@ -14,7 +14,7 @@ __project__ = 'kubernetes' # The version is auto-updated. Please do not edit. -__version__ = "25.3.0b1" +__version__ = "25.3.0" import kubernetes.client import kubernetes.config diff --git a/kubernetes/client/__init__.py b/kubernetes/client/__init__.py index 9afd7ee2d..3f9f8a2e7 100644 --- a/kubernetes/client/__init__.py +++ b/kubernetes/client/__init__.py @@ -14,7 +14,7 @@ from __future__ import absolute_import -__version__ = "25.3.0b1" +__version__ = "25.3.0" # import apis into sdk package from kubernetes.client.api.well_known_api import WellKnownApi diff --git a/kubernetes/client/api_client.py b/kubernetes/client/api_client.py index 813da5fa3..3a7260fdd 100644 --- a/kubernetes/client/api_client.py +++ b/kubernetes/client/api_client.py @@ -78,7 +78,7 @@ class ApiClient(object): self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/25.3.0b1/python' + self.user_agent = 'OpenAPI-Generator/25.3.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/kubernetes/client/configuration.py b/kubernetes/client/configuration.py index 9db376c32..5c4f8c212 100644 --- a/kubernetes/client/configuration.py +++ b/kubernetes/client/configuration.py @@ -350,7 +350,7 @@ class Configuration(object): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: release-1.25\n"\ - "SDK Package Version: 25.3.0b1".\ + "SDK Package Version: 25.3.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/setup.py b/setup.py index 8b22fdad7..38dccc2a2 100644 --- a/setup.py +++ b/setup.py @@ -16,9 +16,9 @@ from setuptools import setup # Do not edit these constants. They will be updated automatically # by scripts/update-client.sh. -CLIENT_VERSION = "25.3.0b1" +CLIENT_VERSION = "25.3.0" PACKAGE_NAME = "kubernetes" -DEVELOPMENT_STATUS = "4 - Beta" +DEVELOPMENT_STATUS = "5 - Production/Stable" # To install the library, run the following # From 03d2958a4cc16b00288ad8759f7679c7b7153f94 Mon Sep 17 00:00:00 2001 From: Yu Liao Date: Tue, 25 Oct 2022 23:42:41 +0000 Subject: [PATCH 6/6] updated 25.3 release support matrix --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 35bcc83da..3232905b6 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ supported versions of Kubernetes clusters. - [client 22.y.z](https://pypi.org/project/kubernetes/22.6.0/): Kubernetes 1.21 or below (+-), Kubernetes 1.22 (✓), Kubernetes 1.23 or above (+-) - [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 (+-) - [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 (+-) -- [client 25.y.z](https://pypi.org/project/kubernetes/25.3.0b1/): Kubernetes 1.24 or below (+-), Kubernetes 1.25 (✓), Kubernetes 1.26 or above (+-) +- [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 (+-) > See [here](#homogenizing-the-kubernetes-python-client-versions) for an explanation of why there is no v13-v16 release. @@ -142,12 +142,13 @@ between client-python versions. | 21.0 Alpha/Beta | Kubernetes main repo, 1.21 branch | ✗ | | 21.0 | Kubernetes main repo, 1.21 branch | ✗ | | 22.0 Alpha/Beta | Kubernetes main repo, 1.22 branch | ✗ | -| 22.0 | Kubernetes main repo, 1.22 branch | ✓ | +| 22.0 | Kubernetes main repo, 1.22 branch | ✗ | | 23.0 Alpha/Beta | Kubernetes main repo, 1.23 branch | ✗ | | 23.0 | Kubernetes main repo, 1.23 branch | ✓ | | 24.0 Alpha/Beta | Kubernetes main repo, 1.24 branch | ✗ | | 24.0 | Kubernetes main repo, 1.24 branch | ✓ | -| 25.0 Alpha/Beta | Kubernetes main repo, 1.25 branch | ✓ | +| 25.0 Alpha/Beta | Kubernetes main repo, 1.25 branch | ✗ | +| 25.0 | Kubernetes main repo, 1.25 branch | ✓ | > See [here](#homogenizing-the-kubernetes-python-client-versions) for an explanation of why there is no v13-v16 release.