Add ability to link containers in one pod

This commit is contained in:
2022-02-16 17:40:11 +01:00
parent a60ab484d2
commit 513039e3c9
4 changed files with 113 additions and 16 deletions

View File

@@ -10,9 +10,12 @@ import (
func BuildStorage(storage *helm.Storage, name, templatesDir string) {
kind := "pvc"
fname := filepath.Join(templatesDir, name+"."+kind+".yaml")
name = storage.Metadata.Labels[helm.K+"/component"]
pvcname := storage.Metadata.Labels[helm.K+"/pvc-name"]
fname := filepath.Join(templatesDir, name+"-"+pvcname+"."+kind+".yaml")
fp, _ := os.Create(fname)
volname := storage.K8sBase.Metadata.Labels[helm.K+"/pvc-name"]
fp.WriteString("{{ if .Values." + name + ".persistence." + volname + ".enabled }}\n")
enc := yaml.NewEncoder(fp)
enc.SetIndent(IndentSize)