@@ -81,6 +81,8 @@ function UpgradeForm({
8181
8282 const { availablePackageDetail, versions, schema, values, pkgVersion } = selected ;
8383
84+ const packageCluster = availablePackageDetail ?. availablePackageRef ?. context ?. cluster ;
85+
8486 const {
8587 apps : { isFetching : appsFetching } ,
8688 charts : { isFetching : chartsFetching } ,
@@ -91,12 +93,15 @@ function UpgradeForm({
9193 useEffect ( ( ) => {
9294 dispatch (
9395 actions . charts . fetchChartVersions ( {
94- context : { cluster : cluster , namespace : repoNamespace } ,
96+ context : {
97+ cluster : packageCluster ?? cluster ,
98+ namespace : repoNamespace ,
99+ } ,
95100 plugin : pluginObj ,
96101 identifier : packageId ,
97102 } as AvailablePackageReference ) ,
98103 ) ;
99- } , [ dispatch , cluster , repoNamespace , packageId , pluginObj ] ) ;
104+ } , [ dispatch , packageCluster , repoNamespace , packageId , cluster , pluginObj ] ) ;
100105
101106 useEffect ( ( ) => {
102107 if ( deployed . values && ! modifications ) {
@@ -122,7 +127,7 @@ function UpgradeForm({
122127 dispatch (
123128 actions . charts . fetchChartVersion (
124129 {
125- context : { cluster : cluster , namespace : repoNamespace } ,
130+ context : { cluster : packageCluster , namespace : repoNamespace } ,
126131 plugin : pluginObj ,
127132 identifier : packageId ,
128133 } as AvailablePackageReference ,
@@ -131,7 +136,7 @@ function UpgradeForm({
131136 ) ;
132137 } , [
133138 dispatch ,
134- cluster ,
139+ packageCluster ,
135140 repoNamespace ,
136141 packageId ,
137142 deployed . chartVersion ?. version ?. pkgVersion ,
@@ -160,7 +165,7 @@ function UpgradeForm({
160165 dispatch (
161166 actions . charts . fetchChartVersion (
162167 {
163- context : { cluster : cluster , namespace : repoNamespace } ,
168+ context : { cluster : packageCluster , namespace : repoNamespace } ,
164169 plugin : pluginObj ,
165170 identifier : packageId ,
166171 } as AvailablePackageReference ,
0 commit comments