Skip to content

Commit

Permalink
Merge pull request #239 from Liujingfang1/namespace2
Browse files Browse the repository at this point in the history
Skip adding nameprefix to namespace
  • Loading branch information
k8s-ci-robot authored Aug 8, 2018
2 parents e0a09f4 + 10665c6 commit 3857a67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/app/application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ func TestResources1(t *testing.T) {
"DB_PASSWORD": base64.StdEncoding.EncodeToString([]byte("somepw")),
},
}).SetBehavior(resource.BehaviorCreate),
resource.NewResIdWithPrefixNamespace(ns, "ns1", "foo-", ""): resource.NewResourceFromMap(
resource.NewResIdWithPrefixNamespace(ns, "ns1", "", ""): resource.NewResourceFromMap(
map[string]interface{}{
"apiVersion": "v1",
"kind": "Namespace",
"metadata": map[string]interface{}{
"name": "foo-ns1",
"name": "ns1",
"labels": map[string]interface{}{
"app": "nginx",
},
Expand Down
3 changes: 3 additions & 0 deletions pkg/transformers/prefixname.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ var skipNamePrefixPathConfigs = []PathConfig{
{
GroupVersionKind: &schema.GroupVersionKind{Kind: "CustomResourceDefinition"},
},
{
GroupVersionKind: &schema.GroupVersionKind{Kind: "Namespace"},
},
}

// NewDefaultingNamePrefixTransformer construct a namePrefixTransformer with defaultNamePrefixPathConfigs.
Expand Down

0 comments on commit 3857a67

Please sign in to comment.