Fix problems and adding functionnalities
Many fixes and enhancements: - Add icon option - Add env file managment - Ordering compose parsing options - Fix path with underscores - Fix image and tag discovery - Better documentation for labels
This commit is contained in:
@@ -76,13 +76,6 @@ func NewSecret(service types.ServiceConfig, appName string) *Secret {
|
||||
return secret
|
||||
}
|
||||
|
||||
// SetData sets the data of the secret.
|
||||
func (s *Secret) SetData(data map[string]string) {
|
||||
for key, value := range data {
|
||||
s.AddData(key, value)
|
||||
}
|
||||
}
|
||||
|
||||
// AddData adds a key value pair to the secret.
|
||||
func (s *Secret) AddData(key, value string) {
|
||||
if value == "" {
|
||||
@@ -91,6 +84,18 @@ func (s *Secret) AddData(key, value string) {
|
||||
s.Data[key] = []byte(`{{ tpl ` + value + ` $ | b64enc }}`)
|
||||
}
|
||||
|
||||
// Filename returns the filename of the secret.
|
||||
func (s *Secret) Filename() string {
|
||||
return s.service.Name + ".secret.yaml"
|
||||
}
|
||||
|
||||
// SetData sets the data of the secret.
|
||||
func (s *Secret) SetData(data map[string]string) {
|
||||
for key, value := range data {
|
||||
s.AddData(key, value)
|
||||
}
|
||||
}
|
||||
|
||||
// Yaml returns the yaml representation of the secret.
|
||||
func (s *Secret) Yaml() ([]byte, error) {
|
||||
y, err := yaml.Marshal(s)
|
||||
@@ -106,8 +111,3 @@ func (s *Secret) Yaml() ([]byte, error) {
|
||||
|
||||
return y, nil
|
||||
}
|
||||
|
||||
// Filename returns the filename of the secret.
|
||||
func (s *Secret) Filename() string {
|
||||
return s.service.Name + ".secret.yaml"
|
||||
}
|
||||
|
Reference in New Issue
Block a user