forked from LaconicNetwork/kompose
fix: disable annotations when flag is specified
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user