Refactorisation and improvements

- image of container is now splitted in repository and tag (in values
  and deployment). The "tag" is tested in deployment
- add "chart-version" option

Code:

- globalize the PVC generation
- ensure types for environment values
- refactored to make generic the container creation in a deployment
- avoiding race condition on ServiceConfig by using a copy (then a
  pointer of this copy)
This commit is contained in:
2022-05-06 13:42:53 +02:00
parent 2721cb1136
commit 3031f37509
9 changed files with 208 additions and 115 deletions

View File

@@ -7,6 +7,8 @@ import (
"github.com/compose-spec/compose-go/types"
)
type EnvValue interface{}
// ContainerPort represent a port mapping.
type ContainerPort struct {
Name string
@@ -15,8 +17,8 @@ type ContainerPort struct {
// Value represent a environment variable with name and value.
type Value struct {
Name string `yaml:"name"`
Value interface{} `yaml:"value"`
Name string `yaml:"name"`
Value EnvValue `yaml:"value"`
}
// Container represent a container with name, image, and environment variables. It is used in Deployment.