- ingress can now have annotations - configmaps are better named and there is a label to know from where the content is taken - fixed bad "nil" pointer checks - we force to not resolve paths from compose file, this should be a problem when we call the compose file from outside. So, TODO: check this! - the "project" label is now the Chart Name, not a static string - minor fixes
19 lines
368 B
Go
19 lines
368 B
Go
package writers
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
|
|
"gopkg.in/yaml.v3"
|
|
)
|
|
|
|
// BuildConfigMap writes the configMap.
|
|
func BuildConfigMap(c interface{}, kind, servicename, name, templatesDir string) {
|
|
fname := filepath.Join(templatesDir, name+"."+kind+".yaml")
|
|
fp, _ := os.Create(fname)
|
|
enc := yaml.NewEncoder(fp)
|
|
enc.SetIndent(IndentSize)
|
|
enc.Encode(c)
|
|
fp.Close()
|
|
}
|