feat: do not redeploy global service if spec hasn't changed

This commit is contained in:
Pavel Sviderski
2025-02-14 17:49:46 +10:00
parent 5e2b2ac836
commit a53fa2c1d8
6 changed files with 107 additions and 34 deletions
+2 -2
View File
@@ -47,8 +47,8 @@ func (cli *Client) CreateContainer(
api.LabelManaged: "",
},
}
if spec.Mode == api.ServiceModeGlobal {
config.Labels[api.LabelServiceMode] = api.ServiceModeGlobal
if spec.Mode != "" {
config.Labels[api.LabelServiceMode] = spec.Mode
}
if len(spec.Ports) > 0 {