mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-14 10:30:59 +00:00
updated namereference config for missing references.
highlights: RBAC references ServiceAccountName reference StatefulSet headless service reference
This commit is contained in:
@@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user