diff --git a/pkg/transformers/namereferenceconfig.go b/pkg/transformers/namereferenceconfig.go index 022b83aa2..1f95b9dda 100644 --- a/pkg/transformers/namereferenceconfig.go +++ b/pkg/transformers/namereferenceconfig.go @@ -23,6 +23,48 @@ import ( // defaultNameReferencePathConfigs is the default configuration for updating // the fields reference the name of other resources. var defaultNameReferencePathConfigs = []referencePathConfig{ + { + referencedGVK: schema.GroupVersionKind{ + Kind: "Deployment", + }, + pathConfigs: []PathConfig{ + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "HorizontalPodAutoscaler", + }, + Path: []string{"spec", "scaleTargetRef", "name"}, + CreateIfNotPresent: false, + }, + }, + }, + { + referencedGVK: schema.GroupVersionKind{ + Kind: "ReplicationController", + }, + pathConfigs: []PathConfig{ + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "HorizontalPodAutoscaler", + }, + Path: []string{"spec", "scaleTargetRef", "name"}, + CreateIfNotPresent: false, + }, + }, + }, + { + referencedGVK: schema.GroupVersionKind{ + Kind: "ReplicaSet", + }, + pathConfigs: []PathConfig{ + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "HorizontalPodAutoscaler", + }, + Path: []string{"spec", "scaleTargetRef", "name"}, + CreateIfNotPresent: false, + }, + }, + }, { referencedGVK: schema.GroupVersionKind{ Version: "v1",