Merge pull request #368 from droot/name-references-update

updated namereference config for missing references.
This commit is contained in:
k8s-ci-robot 2018-04-11 13:34:55 -07:00 committed by GitHub
commit 2b62d8e22d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 130 additions and 0 deletions

View File

@ -339,4 +339,134 @@ var defaultNameReferencePathConfigs = []referencePathConfig{
},
},
},
{
// StatefulSet references headless service, so need to update the references.
referencedGVK: schema.GroupVersionKind{
Version: "v1",
Kind: "Service",
},
pathConfigs: []PathConfig{
{
GroupVersionKind: &schema.GroupVersionKind{
Group: "apps",
Kind: "StatefulSet",
},
Path: []string{"spec", "serviceName"},
CreateIfNotPresent: false,
},
},
},
{
referencedGVK: schema.GroupVersionKind{
Group: "rbac.authorization.k8s.io",
Kind: "Role",
},
pathConfigs: []PathConfig{
{
GroupVersionKind: &schema.GroupVersionKind{
Group: "rbac.authorization.k8s.io",
Kind: "RoleBinding",
},
Path: []string{"roleRef", "name"},
CreateIfNotPresent: false,
},
},
},
{
referencedGVK: schema.GroupVersionKind{
Group: "rbac.authorization.k8s.io",
Kind: "ClusterRole",
},
pathConfigs: []PathConfig{
{
GroupVersionKind: &schema.GroupVersionKind{
Group: "rbac.authorization.k8s.io",
Kind: "RoleBinding",
},
Path: []string{"roleRef", "name"},
CreateIfNotPresent: false,
},
{
GroupVersionKind: &schema.GroupVersionKind{
Group: "rbac.authorization.k8s.io",
Kind: "ClusterRoleBinding",
},
Path: []string{"roleRef", "name"},
CreateIfNotPresent: false,
},
},
},
{
referencedGVK: schema.GroupVersionKind{
Version: "v1",
Kind: "ServiceAccount",
},
pathConfigs: []PathConfig{
{
GroupVersionKind: &schema.GroupVersionKind{
Group: "rbac.authorization.k8s.io",
Kind: "RoleBinding",
},
Path: []string{"subjects", "name"},
CreateIfNotPresent: false,
},
{
GroupVersionKind: &schema.GroupVersionKind{
Group: "rbac.authorization.k8s.io",
Kind: "ClusterRoleBinding",
},
Path: []string{"subjects", "name"},
CreateIfNotPresent: false,
},
{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "Pod",
},
Path: []string{"spec", "serviceAccountName"},
CreateIfNotPresent: false,
},
{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "StatefulSet",
},
Path: []string{"spec", "template", "spec", "serviceAccountName"},
CreateIfNotPresent: false,
},
{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "Deployment",
},
Path: []string{"spec", "template", "spec", "serviceAccountName"},
CreateIfNotPresent: false,
},
{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "ReplicationController",
},
Path: []string{"spec", "template", "spec", "serviceAccountName"},
CreateIfNotPresent: false,
},
{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "CronJob",
},
Path: []string{"spec", "jobTemplate", "spec", "template", "spec", "serviceAccountName"},
CreateIfNotPresent: false,
},
{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "Job",
},
Path: []string{"spec", "template", "spec", "serviceAccountName"},
CreateIfNotPresent: false,
},
{
GroupVersionKind: &schema.GroupVersionKind{
Kind: "DaemonSet",
},
Path: []string{"spec", "template", "spec", "serviceAccountName"},
CreateIfNotPresent: false,
},
},
},
}