We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Move Kubernetes tests and kind setup out of the container to host
**Description**

We should move kind setup out of the container for CI to the host environment

**Use case / motivation**

Makes CI image smaller and setup easier for local testing.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `airflow/kubernetes/volume_mount.py`
Content:
```
1 # Licensed to the Apache Software Foundation (ASF) under one
2 # or more contributor license agreements.  See the NOTICE file
3 # distributed with this work for additional information
4 # regarding copyright ownership.  The ASF licenses this file
5 # to you under the Apache License, Version 2.0 (the
6 # "License"); you may not use this file except in compliance
7 # with the License.  You may obtain a copy of the License at
8 #
9 #   http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing,
12 # software distributed under the License is distributed on an
13 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 # KIND, either express or implied.  See the License for the
15 # specific language governing permissions and limitations
16 # under the License.
17 """
18 Classes for interacting with Kubernetes API
19 """
20 
21 import copy
22 
23 import kubernetes.client.models as k8s
24 
25 from airflow.kubernetes.k8s_model import K8SModel
26 
27 
28 class VolumeMount(K8SModel):
29     """
30     Initialize a Kubernetes Volume Mount. Used to mount pod level volumes to
31     running container.
32 
33     :param name: the name of the volume mount
34     :type name: str
35     :param mount_path:
36     :type mount_path: str
37     :param sub_path: subpath within the volume mount
38     :type sub_path: str
39     :param read_only: whether to access pod with read-only mode
40     :type read_only: bool
41     """
42     def __init__(self, name, mount_path, sub_path, read_only):
43         self.name = name
44         self.mount_path = mount_path
45         self.sub_path = sub_path
46         self.read_only = read_only
47 
48     def to_k8s_client_obj(self) -> k8s.V1VolumeMount:
49         """
50         Converts to k8s object.
51 
52         :return Volume Mount k8s object
53 
54         """
55         return k8s.V1VolumeMount(
56             name=self.name,
57             mount_path=self.mount_path,
58             sub_path=self.sub_path,
59             read_only=self.read_only
60         )
61 
62     def attach_to_pod(self, pod: k8s.V1Pod) -> k8s.V1Pod:
63         """
64         Attaches to pod
65 
66         :return Copy of the Pod object
67 
68         """
69         cp_pod = copy.deepcopy(pod)
70         volume_mount = self.to_k8s_client_obj()
71         cp_pod.spec.containers[0].volume_mounts = pod.spec.containers[0].volume_mounts or []
72         cp_pod.spec.containers[0].volume_mounts.append(volume_mount)
73         return cp_pod
74
```

Path: `airflow/kubernetes/refresh_config.py`
Content:
```
1 # Licensed to the Apache Software Foundation (ASF) under one
2 # or more contributor license agreements.  See the NOTICE file
3 # distributed with this work for additional information
4 # regarding copyright ownership.  The ASF licenses this file
5 # to you under the Apache License, Version 2.0 (the
6 # "License"); you may not use this file except in compliance
7 # with the License.  You may obtain a copy of the License at
8 #
9 #   http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing,
12 # software distributed under the License is distributed on an
13 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 # KIND, either express or implied.  See the License for the
15 # specific language governing permissions and limitations
16 # under the License.
17 
18 """
19 NOTE: this module can be removed once upstream client supports token refresh
20 see: https://github.com/kubernetes-client/python/issues/741
21 """
22 
23 import calendar
24 import logging
25 import os
26 import time
27 from datetime import datetime
28 
29 import yaml
30 from kubernetes.client import Configuration
31 from kubernetes.config.exec_provider import ExecProvider
32 from kubernetes.config.kube_config import KUBE_CONFIG_DEFAULT_LOCATION, KubeConfigLoader
33 
34 
35 class RefreshKubeConfigLoader(KubeConfigLoader):
36     """
37     Patched KubeConfigLoader, this subclass takes expirationTimestamp into
38     account and sets api key refresh callback hook in Configuration object
39     """
40     def __init__(self, *args, **kwargs):
41         KubeConfigLoader.__init__(self, *args, **kwargs)
42         self.api_key_expire_ts = None
43 
44     def _load_from_exec_plugin(self):
45         """
46         We override _load_from_exec_plugin method to also read and store
47         expiration timestamp for aws-iam-authenticator. It will be later
48         used for api token refresh.
49         """
50         if 'exec' not in self._user:
51             return None
52         try:
53             status = ExecProvider(self._user['exec']).run()
54             if 'token' not in status:
55                 logging.error('exec: missing token field in plugin output')
56                 return None
57             self.token = "Bearer %s" % status['token']  # pylint: disable=W0201
58             ts_str = status.get('expirationTimestamp')
59             if ts_str:
60                 self.api_key_expire_ts = calendar.timegm(
61                     datetime.strptime(ts_str, "%Y-%m-%dT%H:%M:%S%z").timetuple(),
62                 )
63             return True
64         except Exception as e:  # pylint: disable=W0703
65             logging.error(str(e))
66 
67     def refresh_api_key(self, client_configuration):
68         """
69         Refresh API key if expired
70         """
71         if self.api_key_expire_ts and time.time() >= self.api_key_expire_ts:
72             self.load_and_set(client_configuration)
73 
74     def load_and_set(self, client_configuration):
75         KubeConfigLoader.load_and_set(self, client_configuration)
76         client_configuration.refresh_api_key = self.refresh_api_key
77 
78 
79 class RefreshConfiguration(Configuration):
80     """
81     Patched Configuration, this subclass taskes api key refresh callback hook
82     into account
83     """
84     def __init__(self, *args, **kwargs):
85         Configuration.__init__(self, *args, **kwargs)
86         self.refresh_api_key = None
87 
88     def get_api_key_with_prefix(self, identifier):
89         if self.refresh_api_key:
90             self.refresh_api_key(self)  # pylint: disable=E1102
91         return Configuration.get_api_key_with_prefix(self, identifier)
92 
93 
94 def _get_kube_config_loader_for_yaml_file(filename, **kwargs):
95     """
96     Adapted from the upstream _get_kube_config_loader_for_yaml_file function, changed
97     KubeConfigLoader to RefreshKubeConfigLoader
98     """
99     with open(filename) as f:
100         return RefreshKubeConfigLoader(
101             config_dict=yaml.safe_load(f),
102             config_base_path=os.path.abspath(os.path.dirname(filename)),
103             **kwargs)
104 
105 
106 def load_kube_config(client_configuration, config_file=None, context=None):
107     """
108     Adapted from the upstream load_kube_config function, changes:
109         - removed persist_config argument since it's not being used
110         - remove `client_configuration is None` branch since we always pass
111         in client configuration
112     """
113     if config_file is None:
114         config_file = os.path.expanduser(KUBE_CONFIG_DEFAULT_LOCATION)
115 
116     loader = _get_kube_config_loader_for_yaml_file(
117         config_file, active_context=context, config_persister=None)
118 
119     loader.load_and_set(client_configuration)
120
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/airflow/kubernetes/refresh_config.py b/airflow/kubernetes/refresh_config.py
--- a/airflow/kubernetes/refresh_config.py
+++ b/airflow/kubernetes/refresh_config.py
@@ -25,6 +25,7 @@
 import os
 import time
 from datetime import datetime
+from typing import Optional
 
 import yaml
 from kubernetes.client import Configuration
@@ -91,7 +92,7 @@
         return Configuration.get_api_key_with_prefix(self, identifier)
 
 
-def _get_kube_config_loader_for_yaml_file(filename, **kwargs):
+def _get_kube_config_loader_for_yaml_file(filename, **kwargs) -> Optional[RefreshKubeConfigLoader]:
     """
     Adapted from the upstream _get_kube_config_loader_for_yaml_file function, changed
     KubeConfigLoader to RefreshKubeConfigLoader
@@ -115,5 +116,4 @@
 
     loader = _get_kube_config_loader_for_yaml_file(
         config_file, active_context=context, config_persister=None)
-
     loader.load_and_set(client_configuration)
diff --git a/airflow/kubernetes/volume_mount.py b/airflow/kubernetes/volume_mount.py
--- a/airflow/kubernetes/volume_mount.py
+++ b/airflow/kubernetes/volume_mount.py
@@ -35,7 +35,7 @@
     :param mount_path:
     :type mount_path: str
     :param sub_path: subpath within the volume mount
-    :type sub_path: str
+    :type sub_path: Optional[str]
     :param read_only: whether to access pod with read-only mode
     :type read_only: bool
     """

{"golden_diff": "diff --git a/airflow/kubernetes/refresh_config.py b/airflow/kubernetes/refresh_config.py\n--- a/airflow/kubernetes/refresh_config.py\n+++ b/airflow/kubernetes/refresh_config.py\n@@ -25,6 +25,7 @@\n import os\n import time\n from datetime import datetime\n+from typing import Optional\n \n import yaml\n from kubernetes.client import Configuration\n@@ -91,7 +92,7 @@\n         return Configuration.get_api_key_with_prefix(self, identifier)\n \n \n-def _get_kube_config_loader_for_yaml_file(filename, **kwargs):\n+def _get_kube_config_loader_for_yaml_file(filename, **kwargs) -> Optional[RefreshKubeConfigLoader]:\n     \"\"\"\n     Adapted from the upstream _get_kube_config_loader_for_yaml_file function, changed\n     KubeConfigLoader to RefreshKubeConfigLoader\n@@ -115,5 +116,4 @@\n \n     loader = _get_kube_config_loader_for_yaml_file(\n         config_file, active_context=context, config_persister=None)\n-\n     loader.load_and_set(client_configuration)\ndiff --git a/airflow/kubernetes/volume_mount.py b/airflow/kubernetes/volume_mount.py\n--- a/airflow/kubernetes/volume_mount.py\n+++ b/airflow/kubernetes/volume_mount.py\n@@ -35,7 +35,7 @@\n     :param mount_path:\n     :type mount_path: str\n     :param sub_path: subpath within the volume mount\n-    :type sub_path: str\n+    :type sub_path: Optional[str]\n     :param read_only: whether to access pod with read-only mode\n     :type read_only: bool\n     \"\"\"\n", "issue": "Move Kubernetes tests and kind setup out of the container to host\n**Description**\r\n\r\nWe should move kind setup out of the container for CI to the host environment\r\n\r\n**Use case / motivation**\r\n\r\nMakes CI image smaller and setup easier for local testing.\r\n\n", "before_files": [{"content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\"\"\"\nClasses for interacting with Kubernetes API\n\"\"\"\n\nimport copy\n\nimport kubernetes.client.models as k8s\n\nfrom airflow.kubernetes.k8s_model import K8SModel\n\n\nclass VolumeMount(K8SModel):\n    \"\"\"\n    Initialize a Kubernetes Volume Mount. Used to mount pod level volumes to\n    running container.\n\n    :param name: the name of the volume mount\n    :type name: str\n    :param mount_path:\n    :type mount_path: str\n    :param sub_path: subpath within the volume mount\n    :type sub_path: str\n    :param read_only: whether to access pod with read-only mode\n    :type read_only: bool\n    \"\"\"\n    def __init__(self, name, mount_path, sub_path, read_only):\n        self.name = name\n        self.mount_path = mount_path\n        self.sub_path = sub_path\n        self.read_only = read_only\n\n    def to_k8s_client_obj(self) -> k8s.V1VolumeMount:\n        \"\"\"\n        Converts to k8s object.\n\n        :return Volume Mount k8s object\n\n        \"\"\"\n        return k8s.V1VolumeMount(\n            name=self.name,\n            mount_path=self.mount_path,\n            sub_path=self.sub_path,\n            read_only=self.read_only\n        )\n\n    def attach_to_pod(self, pod: k8s.V1Pod) -> k8s.V1Pod:\n        \"\"\"\n        Attaches to pod\n\n        :return Copy of the Pod object\n\n        \"\"\"\n        cp_pod = copy.deepcopy(pod)\n        volume_mount = self.to_k8s_client_obj()\n        cp_pod.spec.containers[0].volume_mounts = pod.spec.containers[0].volume_mounts or []\n        cp_pod.spec.containers[0].volume_mounts.append(volume_mount)\n        return cp_pod\n", "path": "airflow/kubernetes/volume_mount.py"}, {"content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\n\"\"\"\nNOTE: this module can be removed once upstream client supports token refresh\nsee: https://github.com/kubernetes-client/python/issues/741\n\"\"\"\n\nimport calendar\nimport logging\nimport os\nimport time\nfrom datetime import datetime\n\nimport yaml\nfrom kubernetes.client import Configuration\nfrom kubernetes.config.exec_provider import ExecProvider\nfrom kubernetes.config.kube_config import KUBE_CONFIG_DEFAULT_LOCATION, KubeConfigLoader\n\n\nclass RefreshKubeConfigLoader(KubeConfigLoader):\n    \"\"\"\n    Patched KubeConfigLoader, this subclass takes expirationTimestamp into\n    account and sets api key refresh callback hook in Configuration object\n    \"\"\"\n    def __init__(self, *args, **kwargs):\n        KubeConfigLoader.__init__(self, *args, **kwargs)\n        self.api_key_expire_ts = None\n\n    def _load_from_exec_plugin(self):\n        \"\"\"\n        We override _load_from_exec_plugin method to also read and store\n        expiration timestamp for aws-iam-authenticator. It will be later\n        used for api token refresh.\n        \"\"\"\n        if 'exec' not in self._user:\n            return None\n        try:\n            status = ExecProvider(self._user['exec']).run()\n            if 'token' not in status:\n                logging.error('exec: missing token field in plugin output')\n                return None\n            self.token = \"Bearer %s\" % status['token']  # pylint: disable=W0201\n            ts_str = status.get('expirationTimestamp')\n            if ts_str:\n                self.api_key_expire_ts = calendar.timegm(\n                    datetime.strptime(ts_str, \"%Y-%m-%dT%H:%M:%S%z\").timetuple(),\n                )\n            return True\n        except Exception as e:  # pylint: disable=W0703\n            logging.error(str(e))\n\n    def refresh_api_key(self, client_configuration):\n        \"\"\"\n        Refresh API key if expired\n        \"\"\"\n        if self.api_key_expire_ts and time.time() >= self.api_key_expire_ts:\n            self.load_and_set(client_configuration)\n\n    def load_and_set(self, client_configuration):\n        KubeConfigLoader.load_and_set(self, client_configuration)\n        client_configuration.refresh_api_key = self.refresh_api_key\n\n\nclass RefreshConfiguration(Configuration):\n    \"\"\"\n    Patched Configuration, this subclass taskes api key refresh callback hook\n    into account\n    \"\"\"\n    def __init__(self, *args, **kwargs):\n        Configuration.__init__(self, *args, **kwargs)\n        self.refresh_api_key = None\n\n    def get_api_key_with_prefix(self, identifier):\n        if self.refresh_api_key:\n            self.refresh_api_key(self)  # pylint: disable=E1102\n        return Configuration.get_api_key_with_prefix(self, identifier)\n\n\ndef _get_kube_config_loader_for_yaml_file(filename, **kwargs):\n    \"\"\"\n    Adapted from the upstream _get_kube_config_loader_for_yaml_file function, changed\n    KubeConfigLoader to RefreshKubeConfigLoader\n    \"\"\"\n    with open(filename) as f:\n        return RefreshKubeConfigLoader(\n            config_dict=yaml.safe_load(f),\n            config_base_path=os.path.abspath(os.path.dirname(filename)),\n            **kwargs)\n\n\ndef load_kube_config(client_configuration, config_file=None, context=None):\n    \"\"\"\n    Adapted from the upstream load_kube_config function, changes:\n        - removed persist_config argument since it's not being used\n        - remove `client_configuration is None` branch since we always pass\n        in client configuration\n    \"\"\"\n    if config_file is None:\n        config_file = os.path.expanduser(KUBE_CONFIG_DEFAULT_LOCATION)\n\n    loader = _get_kube_config_loader_for_yaml_file(\n        config_file, active_context=context, config_persister=None)\n\n    loader.load_and_set(client_configuration)\n", "path": "airflow/kubernetes/refresh_config.py"}], "after_files": [{"content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\"\"\"\nClasses for interacting with Kubernetes API\n\"\"\"\n\nimport copy\n\nimport kubernetes.client.models as k8s\n\nfrom airflow.kubernetes.k8s_model import K8SModel\n\n\nclass VolumeMount(K8SModel):\n    \"\"\"\n    Initialize a Kubernetes Volume Mount. Used to mount pod level volumes to\n    running container.\n\n    :param name: the name of the volume mount\n    :type name: str\n    :param mount_path:\n    :type mount_path: str\n    :param sub_path: subpath within the volume mount\n    :type sub_path: Optional[str]\n    :param read_only: whether to access pod with read-only mode\n    :type read_only: bool\n    \"\"\"\n    def __init__(self, name, mount_path, sub_path, read_only):\n        self.name = name\n        self.mount_path = mount_path\n        self.sub_path = sub_path\n        self.read_only = read_only\n\n    def to_k8s_client_obj(self) -> k8s.V1VolumeMount:\n        \"\"\"\n        Converts to k8s object.\n\n        :return Volume Mount k8s object\n\n        \"\"\"\n        return k8s.V1VolumeMount(\n            name=self.name,\n            mount_path=self.mount_path,\n            sub_path=self.sub_path,\n            read_only=self.read_only\n        )\n\n    def attach_to_pod(self, pod: k8s.V1Pod) -> k8s.V1Pod:\n        \"\"\"\n        Attaches to pod\n\n        :return Copy of the Pod object\n\n        \"\"\"\n        cp_pod = copy.deepcopy(pod)\n        volume_mount = self.to_k8s_client_obj()\n        cp_pod.spec.containers[0].volume_mounts = pod.spec.containers[0].volume_mounts or []\n        cp_pod.spec.containers[0].volume_mounts.append(volume_mount)\n        return cp_pod\n", "path": "airflow/kubernetes/volume_mount.py"}, {"content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n\n\"\"\"\nNOTE: this module can be removed once upstream client supports token refresh\nsee: https://github.com/kubernetes-client/python/issues/741\n\"\"\"\n\nimport calendar\nimport logging\nimport os\nimport time\nfrom datetime import datetime\nfrom typing import Optional\n\nimport yaml\nfrom kubernetes.client import Configuration\nfrom kubernetes.config.exec_provider import ExecProvider\nfrom kubernetes.config.kube_config import KUBE_CONFIG_DEFAULT_LOCATION, KubeConfigLoader\n\n\nclass RefreshKubeConfigLoader(KubeConfigLoader):\n    \"\"\"\n    Patched KubeConfigLoader, this subclass takes expirationTimestamp into\n    account and sets api key refresh callback hook in Configuration object\n    \"\"\"\n    def __init__(self, *args, **kwargs):\n        KubeConfigLoader.__init__(self, *args, **kwargs)\n        self.api_key_expire_ts = None\n\n    def _load_from_exec_plugin(self):\n        \"\"\"\n        We override _load_from_exec_plugin method to also read and store\n        expiration timestamp for aws-iam-authenticator. It will be later\n        used for api token refresh.\n        \"\"\"\n        if 'exec' not in self._user:\n            return None\n        try:\n            status = ExecProvider(self._user['exec']).run()\n            if 'token' not in status:\n                logging.error('exec: missing token field in plugin output')\n                return None\n            self.token = \"Bearer %s\" % status['token']  # pylint: disable=W0201\n            ts_str = status.get('expirationTimestamp')\n            if ts_str:\n                self.api_key_expire_ts = calendar.timegm(\n                    datetime.strptime(ts_str, \"%Y-%m-%dT%H:%M:%S%z\").timetuple(),\n                )\n            return True\n        except Exception as e:  # pylint: disable=W0703\n            logging.error(str(e))\n\n    def refresh_api_key(self, client_configuration):\n        \"\"\"\n        Refresh API key if expired\n        \"\"\"\n        if self.api_key_expire_ts and time.time() >= self.api_key_expire_ts:\n            self.load_and_set(client_configuration)\n\n    def load_and_set(self, client_configuration):\n        KubeConfigLoader.load_and_set(self, client_configuration)\n        client_configuration.refresh_api_key = self.refresh_api_key\n\n\nclass RefreshConfiguration(Configuration):\n    \"\"\"\n    Patched Configuration, this subclass taskes api key refresh callback hook\n    into account\n    \"\"\"\n    def __init__(self, *args, **kwargs):\n        Configuration.__init__(self, *args, **kwargs)\n        self.refresh_api_key = None\n\n    def get_api_key_with_prefix(self, identifier):\n        if self.refresh_api_key:\n            self.refresh_api_key(self)  # pylint: disable=E1102\n        return Configuration.get_api_key_with_prefix(self, identifier)\n\n\ndef _get_kube_config_loader_for_yaml_file(filename, **kwargs) -> Optional[RefreshKubeConfigLoader]:\n    \"\"\"\n    Adapted from the upstream _get_kube_config_loader_for_yaml_file function, changed\n    KubeConfigLoader to RefreshKubeConfigLoader\n    \"\"\"\n    with open(filename) as f:\n        return RefreshKubeConfigLoader(\n            config_dict=yaml.safe_load(f),\n            config_base_path=os.path.abspath(os.path.dirname(filename)),\n            **kwargs)\n\n\ndef load_kube_config(client_configuration, config_file=None, context=None):\n    \"\"\"\n    Adapted from the upstream load_kube_config function, changes:\n        - removed persist_config argument since it's not being used\n        - remove `client_configuration is None` branch since we always pass\n        in client configuration\n    \"\"\"\n    if config_file is None:\n        config_file = os.path.expanduser(KUBE_CONFIG_DEFAULT_LOCATION)\n\n    loader = _get_kube_config_loader_for_yaml_file(\n        config_file, active_context=context, config_persister=None)\n    loader.load_and_set(client_configuration)\n", "path": "airflow/kubernetes/refresh_config.py"}]}