chore(packages) Use compose-go v2

This prepares the next release. We need to support the compose v2 syntax
as soon as possible to avoid accumulating technical debt.
This commit is contained in:
2025-10-18 14:43:16 +02:00
parent 9bd1ebb59a
commit 569ca195df
22 changed files with 133 additions and 131 deletions

View File

@@ -12,7 +12,7 @@ import (
"katenary.io/internal/logger"
"katenary.io/internal/utils"
"github.com/compose-spec/compose-go/types"
"github.com/compose-spec/compose-go/v2/types"
corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/yaml"
)
@@ -216,9 +216,9 @@ func Generate(project *types.Project) (*HelmChart, error) {
// dropIngoredServices removes all services with the "ignore" label set to true (or yes).
func dropIngoredServices(project *types.Project) {
for i, service := range project.Services {
for name, service := range project.Services {
if isIgnored(service) {
project.Services = append(project.Services[:i], project.Services[i+1:]...)
delete(project.Services, name)
}
}
}