Add katenary schema, cleanup and refactorization #81
@@ -2,7 +2,6 @@ package generator
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"fmt"
|
|
||||||
"katenary/generator/labels"
|
"katenary/generator/labels"
|
||||||
"katenary/utils"
|
"katenary/utils"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -50,14 +49,6 @@ func NewSecret(service types.ServiceConfig, appName string) *Secret {
|
|||||||
valueList = append(valueList, value)
|
valueList = append(valueList, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
// wrap values with quotes
|
|
||||||
for _, value := range service.Environment {
|
|
||||||
if value == nil {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
*value = fmt.Sprintf(`"%s"`, *value)
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, value := range valueList {
|
for _, value := range valueList {
|
||||||
if val, ok := service.Environment[value]; ok {
|
if val, ok := service.Environment[value]; ok {
|
||||||
value = strings.TrimPrefix(value, `"`)
|
value = strings.TrimPrefix(value, `"`)
|
||||||
|
Reference in New Issue
Block a user