File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
azext_aks_preview/bastion Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ Pending
151519.0.0b15
1616+++++++
1717* Fix `NoneType ` error when performing operations on automatic clusters that have hosted system components enabled.
18-
18+ * ` az aks bastion `: Correctly configure ` $KUBECONFIG ` values for tunneling traffic into a private AKS cluster.
1919
202019.0.0b14
2121+++++++
Original file line number Diff line number Diff line change @@ -186,14 +186,14 @@ def aks_bastion_set_kubeconfig(kubeconfig_path, port):
186186 with open (kubeconfig_path , "r" ) as f :
187187 data = yaml .load (f , Loader = yaml .SafeLoader )
188188 current_context = data ["current-context" ]
189- for cluster in data ["clusters" ]:
189+ for i , cluster in enumerate ( data ["clusters" ]) :
190190 if cluster ["name" ] == current_context :
191191 server = cluster ["cluster" ]["server" ]
192192 hostname = urlparse (server ).hostname
193193 # update the server URL to point to the local port
194- cluster ["cluster" ]["server" ] = f"https://localhost:{ port } /"
194+ data [ "clusters" ][ i ] ["cluster" ]["server" ] = f"https://localhost:{ port } /"
195195 # set the tls-server-name to the hostname
196- cluster ["cluster" ]["tls-server-name" ] = hostname
196+ data [ "clusters" ][ i ] ["cluster" ]["tls-server-name" ] = hostname
197197 break
198198 with open (kubeconfig_path , "w" ) as f :
199199 yaml .dump (data , f )
You can’t perform that action at this time.
0 commit comments