mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 09:02:53 +00:00
Merge pull request #556 from zoncoen/name-suffix-2
Add nameSuffix field to kustomization.yaml
This commit is contained in:
@@ -54,6 +54,7 @@ func determineFieldOrder() []string {
|
||||
"Resources",
|
||||
"Bases",
|
||||
"NamePrefix",
|
||||
"NameSuffix",
|
||||
"Namespace",
|
||||
"Crds",
|
||||
"CommonLabels",
|
||||
|
||||
@@ -33,6 +33,7 @@ func TestFieldOrder(t *testing.T) {
|
||||
"Resources",
|
||||
"Bases",
|
||||
"NamePrefix",
|
||||
"NameSuffix",
|
||||
"Namespace",
|
||||
"Crds",
|
||||
"CommonLabels",
|
||||
@@ -86,6 +87,7 @@ func TestWriteAndRead(t *testing.T) {
|
||||
func TestDeprecationOfPatches(t *testing.T) {
|
||||
hasDeprecatedFields := []byte(`
|
||||
namePrefix: acme
|
||||
nameSuffix: emca
|
||||
patches:
|
||||
- alice
|
||||
patchesStrategicMerge:
|
||||
@@ -104,6 +106,9 @@ patchesStrategicMerge:
|
||||
if k.NamePrefix != "acme" {
|
||||
t.Fatalf("Unexpected name prefix")
|
||||
}
|
||||
if k.NameSuffix != "emca" {
|
||||
t.Fatalf("Unexpected name suffix")
|
||||
}
|
||||
if len(k.Patches) > 0 {
|
||||
t.Fatalf("Expected nothing in Patches.")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user