Merge pull request #487 from monopole/deletePenultimateUseOfDeprecatedField

Delete penultimate use of Patches field.
This commit is contained in:
k8s-ci-robot
2018-10-19 14:28:05 -07:00
committed by GitHub
4 changed files with 57 additions and 11 deletions

View File

@@ -127,13 +127,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.