Support merging primitive lists

This commit is contained in:
Phillip Wittrock
2020-06-23 09:56:52 -07:00
parent a895220743
commit 09894d3022
4 changed files with 139 additions and 11 deletions

View File

@@ -285,14 +285,14 @@ func (rs *ResourceSchema) Field(field string) *ResourceSchema {
func (rs *ResourceSchema) PatchStrategyAndKey() (string, string) {
ps, found := rs.Schema.Extensions[kubernetesPatchStrategyExtensionKey]
if !found {
// merge key and patch strategy must appear together
// empty patch strategy
return "", ""
}
mk, found := rs.Schema.Extensions[kubernetesMergeKeyExtensionKey]
if !found {
// merge key and patch strategy must appear together
return "", ""
// no mergeKey -- may be a primitive associative list (e.g. finalizers)
mk = ""
}
return ps.(string), mk.(string)
}