Unwrap ResourceList with a functionConfig but no items

This commit is contained in:
Katrina Verey
2021-01-12 16:13:40 -08:00
parent ea5d08bac5
commit bdbfb28139
2 changed files with 24 additions and 1 deletions

View File

@@ -178,7 +178,7 @@ func (r *ByteReader) Read() ([]*yaml.RNode, error) {
if !r.DisableUnwrapping &&
len(values) == 1 && // Only unwrap if there is only 1 value
(meta.Kind == ResourceListKind || meta.Kind == "List") &&
node.Field("items") != nil {
(node.Field("items") != nil || node.Field("functionConfig") != nil) {
r.WrappingKind = meta.Kind
r.WrappingAPIVersion = meta.APIVersion