mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix bugs in helm releases (#4785)
* Fix opening of upgrade release tab Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Bring back ability to rollback to specific revision Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Fix helm releases not updating after rollback Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Fix helm releases not updating after upgrade Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
1 parent
c1d557aeee
commit
e8205a64b9
5 files changed
+29
-11
No files matched your search
@@ -179,12 +179,13 @@ export async function getHistory(name: string, namespace: string, kubeconfigPath
|
||||
}
|
||||
|
||||
export async function rollback(name: string, namespace: string, revision: number, kubeconfigPath: string) {
|
||||
return JSON.parse(await execHelm([
|
||||
await execHelm([
|
||||
"rollback",
|
||||
name,
|
||||
`${revision}`,
|
||||
"--namespace", namespace,
|
||||
"--kubeconfig", kubeconfigPath,
|
||||
]));
|
||||
]);
|
||||
}
|
||||
|
||||
async function getResources(name: string, namespace: string, kubeconfigPath: string, kubectlPath: string) {
|
||||
|
||||
@@ -102,9 +102,7 @@ class HelmService {
|
||||
const proxyKubeconfig = await cluster.getProxyKubeconfigPath();
|
||||
|
||||
logger.debug("Rollback release");
|
||||
const output = rollback(releaseName, namespace, revision, proxyKubeconfig);
|
||||
|
||||
return { message: output };
|
||||
await rollback(releaseName, namespace, revision, proxyKubeconfig);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,9 +71,9 @@ export class HelmApiRoute {
|
||||
const { cluster, params, payload, response } = request;
|
||||
|
||||
try {
|
||||
const result = await helmService.rollback(cluster, params.release, params.namespace, payload.revision);
|
||||
await helmService.rollback(cluster, params.release, params.namespace, payload.revision);
|
||||
|
||||
respondJson(response, result);
|
||||
response.end();
|
||||
} catch (error) {
|
||||
logger.debug(error);
|
||||
respondText(response, error?.toString() || "Error rolling back chart", 422);
|
||||
|
||||
Reference in new issue
Block a user