mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
Merge pull request #130 from sethpollack/image-pull-secret
add imagePullSecrets namerefs
This commit is contained in:
@@ -94,6 +94,11 @@ func TestNameReferenceRun(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
"imagePullSecrets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"name": "secret1",
|
||||
},
|
||||
},
|
||||
"volumes": map[string]interface{}{
|
||||
"configMap": map[string]interface{}{
|
||||
"name": "cm1",
|
||||
@@ -176,6 +181,11 @@ func TestNameReferenceRun(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
"imagePullSecrets": []interface{}{
|
||||
map[string]interface{}{
|
||||
"name": "someprefix-secret1-somehash",
|
||||
},
|
||||
},
|
||||
"volumes": map[string]interface{}{
|
||||
"configMap": map[string]interface{}{
|
||||
"name": "someprefix-cm1-somehash",
|
||||
|
||||
@@ -369,6 +369,14 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
|
||||
Path: []string{"spec", "initContainers", "envFrom", "secretRef", "name"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
{
|
||||
GroupVersionKind: &schema.GroupVersionKind{
|
||||
Version: "v1",
|
||||
Kind: "Pod",
|
||||
},
|
||||
Path: []string{"spec", "imagePullSecrets", "name"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
{
|
||||
GroupVersionKind: &schema.GroupVersionKind{
|
||||
Kind: "Deployment",
|
||||
@@ -404,6 +412,13 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
|
||||
Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
{
|
||||
GroupVersionKind: &schema.GroupVersionKind{
|
||||
Kind: "Deployment",
|
||||
},
|
||||
Path: []string{"spec", "template", "spec", "imagePullSecrets", "name"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
{
|
||||
GroupVersionKind: &schema.GroupVersionKind{
|
||||
Kind: "ReplicaSet",
|
||||
@@ -439,6 +454,13 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
|
||||
Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
{
|
||||
GroupVersionKind: &schema.GroupVersionKind{
|
||||
Kind: "ReplicaSet",
|
||||
},
|
||||
Path: []string{"spec", "template", "spec", "imagePullSecrets", "name"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
{
|
||||
GroupVersionKind: &schema.GroupVersionKind{
|
||||
Kind: "DaemonSet",
|
||||
@@ -474,6 +496,13 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
|
||||
Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
{
|
||||
GroupVersionKind: &schema.GroupVersionKind{
|
||||
Kind: "DaemonSet",
|
||||
},
|
||||
Path: []string{"spec", "template", "spec", "imagePullSecrets", "name"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
{
|
||||
GroupVersionKind: &schema.GroupVersionKind{
|
||||
Kind: "StatefulSet",
|
||||
@@ -509,6 +538,13 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
|
||||
Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
{
|
||||
GroupVersionKind: &schema.GroupVersionKind{
|
||||
Kind: "StatefulSet",
|
||||
},
|
||||
Path: []string{"spec", "template", "spec", "imagePullSecrets", "name"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
{
|
||||
GroupVersionKind: &schema.GroupVersionKind{
|
||||
Kind: "Job",
|
||||
@@ -544,6 +580,13 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
|
||||
Path: []string{"spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
{
|
||||
GroupVersionKind: &schema.GroupVersionKind{
|
||||
Kind: "Job",
|
||||
},
|
||||
Path: []string{"spec", "template", "spec", "imagePullSecrets", "name"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
{
|
||||
GroupVersionKind: &schema.GroupVersionKind{
|
||||
Kind: "CronJob",
|
||||
@@ -579,6 +622,13 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
|
||||
Path: []string{"spec", "jobTemplate", "spec", "template", "spec", "initContainers", "envFrom", "secretRef", "name"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
{
|
||||
GroupVersionKind: &schema.GroupVersionKind{
|
||||
Kind: "CronJob",
|
||||
},
|
||||
Path: []string{"spec", "jobTemplate", "spec", "template", "spec", "imagePullSecrets", "name"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
{
|
||||
GroupVersionKind: &schema.GroupVersionKind{
|
||||
Kind: "Ingress",
|
||||
@@ -586,6 +636,13 @@ var defaultNameReferencePathConfigs = []ReferencePathConfig{
|
||||
Path: []string{"spec", "tls", "secretName"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
{
|
||||
GroupVersionKind: &schema.GroupVersionKind{
|
||||
Kind: "ServiceAccount",
|
||||
},
|
||||
Path: []string{"imagePullSecrets", "name"},
|
||||
CreateIfNotPresent: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user