Merge pull request #556 from zoncoen/name-suffix-2

Add nameSuffix field to kustomization.yaml
This commit is contained in:
k8s-ci-robot
2018-11-20 08:50:22 -08:00
committed by GitHub
11 changed files with 186 additions and 12 deletions

View File

@@ -54,6 +54,7 @@ func determineFieldOrder() []string {
"Resources",
"Bases",
"NamePrefix",
"NameSuffix",
"Namespace",
"Crds",
"CommonLabels",

View File

@@ -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.")
}