resolve PR: include the service info in the log message

This commit is contained in:
Moritz 2023-01-31 16:15:11 +01:00
parent 6774893412
commit 76717531bd

View File

@ -490,7 +490,9 @@ func SetChaosLabel(compose *composetypes.Config, stackName string, chaos bool) {
}
}
// add env ENABLE_AUTO_UPDATE as label to enable/disable the auto update process for this app
// SetUpdateLabel adds env ENABLE_AUTO_UPDATE as label to enable/disable the
// auto update process for this app. The default if this variable is not set is to disable
// the auto update process.
func SetUpdateLabel(compose *composetypes.Config, stackName string, appEnv AppEnv) {
for _, service := range compose.Services {
if service.Name == "app" {
@ -498,7 +500,7 @@ func SetUpdateLabel(compose *composetypes.Config, stackName string, appEnv AppEn
if !exists {
enable_auto_update = "false"
}
logrus.Debugf("set auto update label to %s", enable_auto_update)
logrus.Debugf("set label 'coop-cloud.%s.autoupdate' to %s for %s", stackName, enable_auto_update, stackName)
labelKey := fmt.Sprintf("coop-cloud.%s.autoupdate", stackName)
service.Deploy.Labels[labelKey] = enable_auto_update
}