diff --git a/scripts/rest_sni_patch.diff b/scripts/rest_sni_patch.diff deleted file mode 100644 index cdd516e49..000000000 --- a/scripts/rest_sni_patch.diff +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/kubernetes/client/configuration.py b/kubernetes/client/configuration.py -index 2b9dd96a50..ac5a18bf8a 100644 ---- a/kubernetes/client/configuration.py -+++ b/kubernetes/client/configuration.py -@@ -144,6 +144,10 @@ def __init__(self, host="http://localhost", - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ -+ self.tls_server_name = None -+ """SSL/TLS Server Name Indication (SNI) -+ Set this to the SNI value expected by the server. -+ """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved -diff --git a/kubernetes/client/rest.py b/kubernetes/client/rest.py -index 48cd2b7752..4f04251bbf 100644 ---- a/kubernetes/client/rest.py -+++ b/kubernetes/client/rest.py -@@ -77,6 +77,9 @@ def __init__(self, configuration, pools_size=4, maxsize=None): - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - -+ if configuration.tls_server_name: -+ addition_pool_args['server_hostname'] = configuration.tls_server_name -+ - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize diff --git a/scripts/update-client.sh b/scripts/update-client.sh index 87e00ed40..433a210f1 100755 --- a/scripts/update-client.sh +++ b/scripts/update-client.sh @@ -22,7 +22,7 @@ set -o nounset set -o pipefail # The openapi-generator version used by this client -export OPENAPI_GENERATOR_COMMIT="v4.3.0" +export OPENAPI_GENERATOR_COMMIT="v7.1.0" SCRIPT_ROOT=$(dirname "${BASH_SOURCE}") CLIENT_ROOT="${SCRIPT_ROOT}/../kubernetes" @@ -73,11 +73,6 @@ sed -i'' "s,^DEVELOPMENT_STATUS = .*,DEVELOPMENT_STATUS = \\\"${DEVELOPMENT_STAT # second, this should be ported to swagger-codegen echo ">>> patching client..." git apply "${SCRIPT_ROOT}/rest_client_patch.diff" -# The fix this patch is trying to make is already in the upstream swagger-codegen -# repo but it's not in the version we're using. We can remove this patch -# once we upgrade to a version of swagger-codegen that includes it (version>= 6.6.0). -# See https://github.com/OpenAPITools/openapi-generator/pull/15283 -git apply "${SCRIPT_ROOT}/rest_sni_patch.diff" echo ">>> generating docs..." pushd "${DOC_ROOT}" > /dev/null