Something.

This commit is contained in:
rony5394
2026-02-23 15:39:57 +01:00
parent 136bb4c5b8
commit 9751a602cc
6 changed files with 67 additions and 11 deletions

View File

@@ -18,6 +18,7 @@ func scaleDown(serviceId string){
newScale := uint64(0);
updatedSpec.Mode.Replicated.Replicas = &newScale;
updatedSpec.Labels["blazena.scaledDown"] = "true";
scale.Store(serviceId, *originalScale);
@@ -46,6 +47,7 @@ func scaleUp(serviceId string){
updatedSpec := inspectresoult.Spec;
updatedSpec.Mode.Replicated.Replicas = &originalScaleChecked;
delete(updatedSpec.Labels, "blazena.scaledDown");
ApiClient.ServiceUpdate(context.Background(), serviceId, inspectresoult.Version, updatedSpec, swarm.ServiceUpdateOptions{});
}