Files
katenary/generator/labels/labelStructs/valueFrom.go
Patrice Ferlet 3b4dade699 chore(label): new label "values-from"
This labels allow to use some environment variables from another service
and use the configMap / secret instead of the original value. This is
useful to avoid duplication of values for several variables.
2024-11-26 16:11:12 +01:00

14 lines
254 B
Go

package labelStructs
import "gopkg.in/yaml.v3"
type ValueFrom map[string]string
func GetValueFrom(data string) (*ValueFrom, error) {
vf := ValueFrom{}
if err := yaml.Unmarshal([]byte(data), &vf); err != nil {
return nil, err
}
return &vf, nil
}