Do not remove empty lines in configmap/secret

This commit is contained in:
Phani Teja Marupaka
2020-01-20 11:42:39 -08:00
parent 89367be008
commit 0bd872e6d5
4 changed files with 8 additions and 5 deletions

View File

@@ -93,7 +93,7 @@ func (kvl *loader) keyValuesFromFileSources(sources []string) ([]types.Pair, err
// trimTrailingSpacesInLines takes string with multiple lines and trims the trailing white spaces and tabs from each line.
func trimTrailingSpacesInLines(str string) string {
re := regexp.MustCompile(`\s*\n`)
re := regexp.MustCompile(`[ \t]*\n`)
return re.ReplaceAllString(str, "\n")
}