Skip to content

Commit 1f2df03

Browse files
authored
Merge pull request #2607 from yliaog/automated-release-of-36.0.2-upstream-release-36.0-1780086981
Automated release of 36.0.2 upstream release 36.0 1780086981
2 parents 348f673 + 70e680e commit 1f2df03

19 files changed

Lines changed: 85 additions & 21 deletions

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# v36.0.2
2+
3+
Kubernetes API Version: v1.36.1
4+
5+
### Uncategorized
6+
- Restored backward compatibility for `Configuration.auth_settings()`:
7+
the legacy `api_key['authorization']` lookup is honored as a fallback
8+
when `api_key['BearerToken']` is not set, fixing 401 Unauthorized
9+
regressions seen after upgrading to v36.0.0 (#2595). (#2604, @GK-07)
10+
111
# v36.0.1
212

313
Kubernetes API Version: v1.36.1

kubernetes/README.md

Lines changed: 1 addition & 1 deletion
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.36
7-
- Package version: 36.0.1
7+
- Package version: 36.0.2
88
- Build package: org.openapitools.codegen.languages.PythonLegacyClientCodegen
99

1010
## Requirements.

kubernetes/__init__.py

Lines changed: 1 addition & 1 deletion
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__ = "36.0.1"
17+
__version__ = "36.0.2"
1818

1919
from . import client
2020
from . import config

kubernetes/aio/README.md

Lines changed: 1 addition & 1 deletion
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.36
7-
- Package version: 36.0.1
7+
- Package version: 36.0.2
88
- Build package: org.openapitools.codegen.languages.PythonLegacyClientCodegen
99

1010
## Requirements.

kubernetes/aio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
__project__ = "kubernetes_aio"
1616
# The version is auto-updated. Please do not edit.
17-
__version__ = "36.0.1"
17+
__version__ = "36.0.2"
1818

1919
import kubernetes.aio.client as client
2020

kubernetes/aio/client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from __future__ import absolute_import
1616

17-
__version__ = "36.0.1"
17+
__version__ = "36.0.2"
1818

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

kubernetes/aio/client/api_client.py

Lines changed: 1 addition & 1 deletion
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/36.0.1/python'
81+
self.user_agent = 'OpenAPI-Generator/36.0.2/python'
8282
self.client_side_validation = configuration.client_side_validation
8383

8484
async def __aenter__(self):

kubernetes/aio/client/api_client.py.orig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class ApiClient(object):
7878
self.default_headers[header_name] = header_value
7979
self.cookie = cookie
8080
# Set default User-Agent.
81-
self.user_agent = 'OpenAPI-Generator/36.0.1/python'
81+
self.user_agent = 'OpenAPI-Generator/36.0.2/python'
8282
self.client_side_validation = configuration.client_side_validation
8383

8484
async def __aenter__(self):

kubernetes/aio/client/configuration.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,13 +415,19 @@ async def auth_settings(self):
415415
:return: The Auth Settings information dict.
416416
"""
417417
auth = {}
418-
if 'BearerToken' in self.api_key:
418+
# Backward compatibility: prior to v36.0.0 the bearer token was
419+
# stored under the 'authorization' api_key. Continue to honor it
420+
# so user code that sets ``config.api_key['authorization']``
421+
# directly keeps working with the new 'BearerToken' key the
422+
# generated client now looks for.
423+
# See: https://github.com/kubernetes-client/python/issues/2595
424+
if 'BearerToken' in self.api_key or 'authorization' in self.api_key:
419425
auth['BearerToken'] = {
420426
'type': 'api_key',
421427
'in': 'header',
422428
'key': 'authorization',
423429
'value': await self.get_api_key_with_prefix(
424-
'BearerToken',
430+
'BearerToken', alias='authorization',
425431
),
426432
}
427433
return auth
@@ -435,7 +441,7 @@ def to_debug_report(self):
435441
"OS: {env}\n"\
436442
"Python Version: {pyversion}\n"\
437443
"Version of the API: release-1.36\n"\
438-
"SDK Package Version: 36.0.1".\
444+
"SDK Package Version: 36.0.2".\
439445
format(env=sys.platform, pyversion=sys.version)
440446

441447
def get_host_settings(self):

kubernetes/aio/client/configuration.py.orig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ conf = client.Configuration(
432432
"OS: {env}\n"\
433433
"Python Version: {pyversion}\n"\
434434
"Version of the API: release-1.36\n"\
435-
"SDK Package Version: 36.0.1".\
435+
"SDK Package Version: 36.0.2".\
436436
format(env=sys.platform, pyversion=sys.version)
437437

438438
def get_host_settings(self):

0 commit comments

Comments
 (0)