WIP Try to use composer-go

- there are problems to resolve with health check
- compose/parser.go and compose/types.go should be recheck
- need to recheck writers
This commit is contained in:
2022-04-03 16:08:00 +02:00
parent 165054ca53
commit 3c6b9493db
8 changed files with 240 additions and 519 deletions

View File

@@ -1,6 +1,10 @@
package helm
import "strings"
import (
"strings"
"github.com/compose-spec/compose-go/types"
)
// Deployment is a k8s deployment.
type Deployment struct {
@@ -82,7 +86,7 @@ func NewProbe(period, initialDelaySeconds, success, failure int) *Probe {
}
}
func NewContainer(name, image string, environment, labels map[string]string) *Container {
func NewContainer(name, image string, environment types.MappingWithEquals, labels map[string]string) *Container {
container := &Container{
Image: image,
Name: name,
@@ -100,7 +104,7 @@ func NewContainer(name, image string, environment, labels map[string]string) *Co
for n, v := range environment {
for _, name := range toServices {
if name == n {
v = RELEASE_NAME + "-" + v
*v = RELEASE_NAME + "-" + *v
}
}
container.Env[idx] = Value{Name: n, Value: v}