From e9879e2226e175b5d096d5cb45903744afcfdd6e Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 7 Mar 2023 12:27:02 +0100 Subject: [PATCH] review: label convention chaos_version -> chaos-version --- pkg/config/app.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/config/app.go b/pkg/config/app.go index 853d60a2..4921d8ee 100644 --- a/pkg/config/app.go +++ b/pkg/config/app.go @@ -409,7 +409,7 @@ func GetAppStatuses(apps []App, MachineReadable bool) (map[string]map[string]str result["chaos"] = chaos } - labelKey = fmt.Sprintf("coop-cloud.%s.chaos_version", name) + labelKey = fmt.Sprintf("coop-cloud.%s.chaos-version", name) if chaosVersion, ok := service.Spec.Labels[labelKey]; ok { result["chaosVersion"] = chaosVersion } @@ -517,12 +517,12 @@ func SetChaosLabel(compose *composetypes.Config, stackName string, chaos bool) { } } -// SetChaosVersionLabel adds the label 'coop-cloud.${STACK_NAME}.chaos_version=$(GIT_COMMIT)' to the app container +// SetChaosVersionLabel adds the label 'coop-cloud.${STACK_NAME}.chaos-version=$(GIT_COMMIT)' to the app container func SetChaosVersionLabel(compose *composetypes.Config, stackName string, chaosVersion string) { for _, service := range compose.Services { if service.Name == "app" { - logrus.Debugf("set label 'coop-cloud.%s.chaos_version' to %v for %s", stackName, chaosVersion, stackName) - labelKey := fmt.Sprintf("coop-cloud.%s.chaos_version", stackName) + logrus.Debugf("set label 'coop-cloud.%s.chaos-version' to %v for %s", stackName, chaosVersion, stackName) + labelKey := fmt.Sprintf("coop-cloud.%s.chaos-version", stackName) service.Deploy.Labels[labelKey] = chaosVersion } }