diff --git a/controlpanel/api/kubernetes.py b/controlpanel/api/kubernetes.py index c6787e386..afcc4580c 100644 --- a/controlpanel/api/kubernetes.py +++ b/controlpanel/api/kubernetes.py @@ -23,7 +23,9 @@ def get_config(): config = kubernetes.client.Configuration() - # The deepcopy is to avoid a race conditions on the credentials keys + # A deepcopy of the configuration is used to avoid a race condition + # caused by subsequent calls to Configuration() reusing a singleton + # datastructure # # See: https://github.com/kubernetes-client/python/issues/932 config.api_key_prefix = deepcopy(config.api_key_prefix) diff --git a/controlpanel/kubeapi/views.py b/controlpanel/kubeapi/views.py index 6451f3873..edc713f83 100644 --- a/controlpanel/kubeapi/views.py +++ b/controlpanel/kubeapi/views.py @@ -1,7 +1,5 @@ -from functools import wraps from urllib.parse import urljoin -from django.conf import settings from django.core import exceptions from django.views.decorators.csrf import csrf_exempt from djproxy.views import HttpProxy