fix(same-pod): environnment and volume mapping

We must ensure that the volume is owned by the container.
The environmment configMap wasn't bound.
This commit is contained in:
2024-11-21 11:03:10 +01:00
parent af8dabba85
commit 48f6045cd3
2 changed files with 6 additions and 1 deletions

View File

@@ -87,6 +87,7 @@ func Generate(project *types.Project) (*HelmChart, error) {
if target, ok := deployments[samepod]; ok {
target.AddContainer(*service)
target.BindFrom(*service, deployments[service.Name])
target.SetEnvFrom(*service, appName)
delete(deployments, service.Name)
} else {
log.Printf("service %[1]s is declared as %[2]s, but %[2]s is not defined", service.Name, labels.LabelSamePod)