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.
This commit is contained in:
2024-11-26 16:11:12 +01:00
parent 4f0298c0a9
commit 3b4dade699
8 changed files with 304 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
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
}