mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 17:34:21 +00:00
Deal with field deprecation immediately after load.
This commit is contained in:
@@ -91,6 +91,18 @@ type Kustomization struct {
|
||||
ImageTags []ImageTag `json:"imageTags,omitempty" yaml:"imageTags,omitempty"`
|
||||
}
|
||||
|
||||
// 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{}
|
||||
}
|
||||
|
||||
// ConfigMapArgs contains the metadata of how to generate a configmap.
|
||||
type ConfigMapArgs struct {
|
||||
// Name of the configmap.
|
||||
|
||||
Reference in New Issue
Block a user