Skip to content

Commit 5d24dda

Browse files
committed
add imagePullSecrets namerefs
1 parent dec5109 commit 5d24dda

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

pkg/transformers/namereferenceconfig.go

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,14 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
369369
Path: []string{"spec", "initContainers", "envFrom", "secretRef", "name"},
370370
CreateIfNotPresent: false,
371371
},
372+
{
373+
GroupVersionKind: &schema.GroupVersionKind{
374+
Version: "v1",
375+
Kind: "Pod",
376+
},
377+
Path: []string{"spec", "imagePullSecrets", "name"},
378+
CreateIfNotPresent: false,
379+
},
372380
{
373381
GroupVersionKind: &schema.GroupVersionKind{
374382
Kind: "Deployment",
@@ -404,6 +412,13 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
404412
Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"},
405413
CreateIfNotPresent: false,
406414
},
415+
{
416+
GroupVersionKind: &schema.GroupVersionKind{
417+
Kind: "Deployment",
418+
},
419+
Path: []string{"spec", "template", "spec", "imagePullSecrets", "name"},
420+
CreateIfNotPresent: false,
421+
},
407422
{
408423
GroupVersionKind: &schema.GroupVersionKind{
409424
Kind: "ReplicaSet",
@@ -439,6 +454,13 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
439454
Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"},
440455
CreateIfNotPresent: false,
441456
},
457+
{
458+
GroupVersionKind: &schema.GroupVersionKind{
459+
Kind: "ReplicaSet",
460+
},
461+
Path: []string{"spec", "template", "spec", "imagePullSecrets", "name"},
462+
CreateIfNotPresent: false,
463+
},
442464
{
443465
GroupVersionKind: &schema.GroupVersionKind{
444466
Kind: "DaemonSet",
@@ -474,6 +496,13 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
474496
Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"},
475497
CreateIfNotPresent: false,
476498
},
499+
{
500+
GroupVersionKind: &schema.GroupVersionKind{
501+
Kind: "DaemonSet",
502+
},
503+
Path: []string{"spec", "template", "spec", "imagePullSecrets", "name"},
504+
CreateIfNotPresent: false,
505+
},
477506
{
478507
GroupVersionKind: &schema.GroupVersionKind{
479508
Kind: "StatefulSet",
@@ -509,6 +538,13 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
509538
Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"},
510539
CreateIfNotPresent: false,
511540
},
541+
{
542+
GroupVersionKind: &schema.GroupVersionKind{
543+
Kind: "StatefulSet",
544+
},
545+
Path: []string{"spec", "template", "spec", "imagePullSecrets", "name"},
546+
CreateIfNotPresent: false,
547+
},
512548
{
513549
GroupVersionKind: &schema.GroupVersionKind{
514550
Kind: "Job",
@@ -544,6 +580,13 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
544580
Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"},
545581
CreateIfNotPresent: false,
546582
},
583+
{
584+
GroupVersionKind: &schema.GroupVersionKind{
585+
Kind: "Job",
586+
},
587+
Path: []string{"spec", "template", "spec", "imagePullSecrets", "name"},
588+
CreateIfNotPresent: false,
589+
},
547590
{
548591
GroupVersionKind: &schema.GroupVersionKind{
549592
Kind: "CronJob",
@@ -579,13 +622,27 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
579622
Path: []string{"spec", "jobTemplate", "spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"},
580623
CreateIfNotPresent: false,
581624
},
625+
{
626+
GroupVersionKind: &schema.GroupVersionKind{
627+
Kind: "CronJob",
628+
},
629+
Path: []string{"spec", "jobTemplate", "spec", "template", "spec", "imagePullSecrets", "name"},
630+
CreateIfNotPresent: false,
631+
},
582632
{
583633
GroupVersionKind: &schema.GroupVersionKind{
584634
Kind: "Ingress",
585635
},
586636
Path: []string{"spec", "tls", "secretName"},
587637
CreateIfNotPresent: false,
588638
},
639+
{
640+
GroupVersionKind: &schema.GroupVersionKind{
641+
Kind: "ServiceAccount",
642+
},
643+
Path: []string{"imagePullSecrets", "name"},
644+
CreateIfNotPresent: false,
645+
},
589646
},
590647
},
591648
{

0 commit comments

Comments
 (0)