mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
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:
parent
2bf4ffbf16
commit
c6f42d2948
@ -3,10 +3,29 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { updateRelease } from "../../../../common/k8s-api/endpoints/helm-releases.api";
|
||||
import {
|
||||
IReleaseUpdatePayload,
|
||||
updateRelease,
|
||||
} from "../../../../common/k8s-api/endpoints/helm-releases.api";
|
||||
import releasesInjectable from "../releases.injectable";
|
||||
|
||||
const updateReleaseInjectable = getInjectable({
|
||||
instantiate: () => updateRelease,
|
||||
instantiate: (di) => {
|
||||
const releases = di.inject(releasesInjectable);
|
||||
|
||||
return async (
|
||||
name: string,
|
||||
namespace: string,
|
||||
payload: IReleaseUpdatePayload,
|
||||
) => {
|
||||
const result = await updateRelease(name, namespace, payload);
|
||||
|
||||
releases.invalidate();
|
||||
|
||||
return result;
|
||||
};
|
||||
},
|
||||
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user