chore(fixes): Unwrap yaml before converting and fix volume name variable
2 fixes: - the first problem to resolve is that some volume names can have "-" in the name. We now replace them by "_" - the second problem is that k8s.io library truncates the lines and so we cannot split the files by lines. We now "unwrap" the result. TODO: globalize the `yaml.Marshal()` code to our own specific function
This commit is contained in:
@@ -232,5 +232,9 @@ func (c *ConfigMap) SetData(data map[string]string) {
|
||||
|
||||
// Yaml returns the yaml representation of the configmap
|
||||
func (c *ConfigMap) Yaml() ([]byte, error) {
|
||||
return yaml.Marshal(c)
|
||||
if o, err := yaml.Marshal(c); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
return UnWrapTPL(o), nil
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user