Skip to content

Commit

Permalink
add namerefs for hpa
Browse files Browse the repository at this point in the history
  • Loading branch information
sethpollack committed Jun 6, 2018
1 parent ea2d2c9 commit 08e2a10
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions pkg/transformers/namereferenceconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 08e2a10

Please sign in to comment.