Skip to content

SMP merger and workload base types

Compare
Choose a tag to compare
@pepov pepov released this 20 Jan 09:11
· 278 commits to master since this release

This release contains a new feature and some improvements for override types.

The strategic merge patch based merger utility that is capable of merging structs without overwriting array fields, instead recursively merge fields inside them. This merger uses the kubernetes k8s.io/apimachinery/pkg/util/strategicpatch library which uses the patchStrategy and patchMergeKey struct tags to identify items in arrays. The intent is to use this for declaring default values for arbitrary kubernetes resources and simply merge it with another that contains only overrides over the defaults.

There are new structs introduced in the types package that supports a similar problem, but can control the override mechanism using custom override methods for each type to extend the original resource in the argument. These types are a more lightweight alternative for base kubernetes types and can be used to be included in CRDs and be used for user defined overrides on top of internal settings.