diff --git a/pkg/transformers/namereferenceconfig.go b/pkg/transformers/namereferenceconfig.go index 1f95b9dda..41903c00f 100644 --- a/pkg/transformers/namereferenceconfig.go +++ b/pkg/transformers/namereferenceconfig.go @@ -87,6 +87,14 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "containers", "env", "valueFrom", "configMapKeyRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Version: "v1", + Kind: "Pod", + }, + Path: []string{"spec", "initContainers", "env", "valueFrom", "configMapKeyRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Version: "v1", @@ -95,6 +103,14 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "containers", "envFrom", "configMapRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Version: "v1", + Kind: "Pod", + }, + Path: []string{"spec", "initContainers", "envFrom", "configMapRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "Deployment", @@ -109,6 +125,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "env", "valueFrom", "configMapKeyRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "Deployment", + }, + Path: []string{"spec", "template", "spec", "initContainers", "env", "valueFrom", "configMapKeyRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "Deployment", @@ -116,6 +139,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "envFrom", "configMapRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "Deployment", + }, + Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "configMapRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "ReplicaSet", @@ -130,6 +160,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "env", "valueFrom", "configMapKeyRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "ReplicaSet", + }, + Path: []string{"spec", "template", "spec", "initContainers", "env", "valueFrom", "configMapKeyRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "ReplicaSet", @@ -137,6 +174,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "envFrom", "configMapRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "ReplicaSet", + }, + Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "configMapRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "DaemonSet", @@ -151,6 +195,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "env", "valueFrom", "configMapKeyRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "DaemonSet", + }, + Path: []string{"spec", "template", "spec", "initContainers", "env", "valueFrom", "configMapKeyRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "DaemonSet", @@ -158,6 +209,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "envFrom", "configMapRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "DaemonSet", + }, + Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "configMapRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "StatefulSet", @@ -172,6 +230,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "env", "valueFrom", "configMapKeyRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "StatefulSet", + }, + Path: []string{"spec", "template", "spec", "initContainers", "env", "valueFrom", "configMapKeyRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "StatefulSet", @@ -179,6 +244,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "envFrom", "configMapRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "StatefulSet", + }, + Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "configMapRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "Job", @@ -193,6 +265,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "env", "valueFrom", "configMapKeyRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "Job", + }, + Path: []string{"spec", "template", "spec", "initContainers", "env", "valueFrom", "configMapKeyRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "Job", @@ -200,6 +279,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "envFrom", "configMapRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "Job", + }, + Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "configMapRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "CronJob", @@ -214,6 +300,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "jobTemplate", "spec", "template", "spec", "containers", "env", "valueFrom", "configMapKeyRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "CronJob", + }, + Path: []string{"spec", "jobTemplate", "spec", "template", "spec", "initContainers", "env", "valueFrom", "configMapKeyRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "CronJob", @@ -221,6 +314,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "jobTemplate", "spec", "template", "spec", "containers", "envFrom", "configMapRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "CronJob", + }, + Path: []string{"spec", "jobTemplate", "spec", "template", "spec", "initContainers", "envFrom", "configMapRef", "name"}, + CreateIfNotPresent: false, + }, }, }, { @@ -245,6 +345,14 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "containers", "env", "valueFrom", "secretKeyRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Version: "v1", + Kind: "Pod", + }, + Path: []string{"spec", "initContainers", "env", "valueFrom", "secretKeyRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Version: "v1", @@ -253,6 +361,14 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "containers", "envFrom", "secretRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Version: "v1", + Kind: "Pod", + }, + Path: []string{"spec", "initContainers", "envFrom", "secretRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "Deployment", @@ -267,6 +383,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "env", "valueFrom", "secretKeyRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "Deployment", + }, + Path: []string{"spec", "template", "spec", "initContainers", "env", "valueFrom", "secretKeyRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "Deployment", @@ -274,6 +397,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "envFrom", "secretRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "Deployment", + }, + Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "ReplicaSet", @@ -288,6 +418,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "env", "valueFrom", "secretKeyRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "ReplicaSet", + }, + Path: []string{"spec", "template", "spec", "initContainers", "env", "valueFrom", "secretKeyRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "ReplicaSet", @@ -295,6 +432,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "envFrom", "secretRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "ReplicaSet", + }, + Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "DaemonSet", @@ -309,6 +453,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "env", "valueFrom", "secretKeyRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "DaemonSet", + }, + Path: []string{"spec", "template", "spec", "initContainers", "env", "valueFrom", "secretKeyRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "DaemonSet", @@ -316,6 +467,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "envFrom", "secretRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "DaemonSet", + }, + Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "StatefulSet", @@ -330,6 +488,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "env", "valueFrom", "secretKeyRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "StatefulSet", + }, + Path: []string{"spec", "template", "spec", "initContainers", "env", "valueFrom", "secretKeyRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "StatefulSet", @@ -337,6 +502,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "envFrom", "secretRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "StatefulSet", + }, + Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "Job", @@ -351,6 +523,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "env", "valueFrom", "secretKeyRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "Job", + }, + Path: []string{"spec", "template", "spec", "initContainers", "env", "valueFrom", "secretKeyRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "Job", @@ -358,6 +537,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "template", "spec", "containers", "envFrom", "secretRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "Job", + }, + Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "CronJob", @@ -372,6 +558,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "jobTemplate", "spec", "template", "spec", "containers", "env", "valueFrom", "secretKeyRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "CronJob", + }, + Path: []string{"spec", "jobTemplate", "spec", "template", "spec", "initContainers", "env", "valueFrom", "secretKeyRef", "name"}, + CreateIfNotPresent: false, + }, { GroupVersionKind: &schema.GroupVersionKind{ Kind: "CronJob", @@ -379,6 +572,13 @@ var defaultNameReferencePathConfigs = []referencePathConfig{ Path: []string{"spec", "jobTemplate", "spec", "template", "spec", "containers", "envFrom", "secretRef", "name"}, CreateIfNotPresent: false, }, + { + GroupVersionKind: &schema.GroupVersionKind{ + Kind: "CronJob", + }, + Path: []string{"spec", "jobTemplate", "spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"}, + CreateIfNotPresent: false, + }, }, }, {