Delete penultimate use of Patches field.

This commit is contained in:
Jeffrey Regan
2018-10-18 13:09:25 -07:00
parent 37802e1026
commit 3e0f5ea327
4 changed files with 57 additions and 11 deletions

View File

@@ -124,13 +124,16 @@ type Kustomization struct {
// DealWithDeprecatedFields should be called immediately after
// loading from storage.
func (k *Kustomization) DealWithDeprecatedFields() {
// The Patches field, meant to hold StrategicMerge patches,
// is deprecated. Append anything found there to the
// PatchesStrategicMerge field.
// This happened when the PatchesJson6902 field was introduced.
k.PatchesStrategicMerge = patch.Append(
k.PatchesStrategicMerge, k.Patches...)
k.Patches = []string{}
if len(k.Patches) > 0 {
// The Patches field, meant to hold strategic merge
// patches, is deprecated. Append anything found
// there to the PatchesStrategicMerge field.
// This happened when the PatchesJson6902 field
// was introduced.
k.PatchesStrategicMerge = patch.Append(
k.PatchesStrategicMerge, k.Patches...)
k.Patches = []string{}
}
}
// ConfigMapArgs contains the metadata of how to generate a configmap.