feat: add restart command for managed deployments and enhance logging functionality
This commit is contained in:
@@ -68,6 +68,26 @@ export async function scaleDeployment(name: string, replicas: number) {
|
||||
});
|
||||
}
|
||||
|
||||
export async function restartDeployment(name: string) {
|
||||
return objectApi.patch({
|
||||
apiVersion: "apps/v1",
|
||||
kind: "Deployment",
|
||||
metadata: {
|
||||
name,
|
||||
namespace: getProject(),
|
||||
},
|
||||
spec: {
|
||||
template: {
|
||||
metadata: {
|
||||
annotations: {
|
||||
"kubectl.kubernetes.io/restartedAt": new Date().toISOString(),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export function throwWhen<T, Narrowed extends T>(
|
||||
condition: (arg: T) => arg is Narrowed,
|
||||
): (arg: T) => Exclude<T, Narrowed>;
|
||||
|
||||
Reference in New Issue
Block a user