fix: disable annotations when flag is specified

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
This commit is contained in:
AhmedGrati
2023-11-05 19:31:58 +01:00
parent 032b61a656
commit a8183a22f7
23 changed files with 4 additions and 379 deletions
+4 -3
View File
@@ -248,14 +248,15 @@ func ConfigAllLabels(name string, service *kobject.ServiceConfig) map[string]str
// ConfigAnnotations configures annotations
func ConfigAnnotations(service kobject.ServiceConfig) map[string]string {
annotations := map[string]string{}
for key, value := range service.Annotations {
annotations[key] = value
}
if !service.WithKomposeAnnotation {
return annotations
}
for key, value := range service.Annotations {
annotations[key] = value
}
annotations["kompose.cmd"] = strings.Join(os.Args, " ")
versionCmd := exec.Command("kompose", "version")
out, err := versionCmd.Output()