Merge pull request #390 from monopole/fixPatchNaming

Spelling nits.
This commit is contained in:
Jeff Regan
2018-10-01 11:24:25 -07:00
committed by GitHub
4 changed files with 8 additions and 8 deletions

View File

@@ -21,7 +21,7 @@ package patch
// https://github.com/kubernetes/community/blob/master/contributors/devel/strategic-merge-patch.md
type StrategicMerge string
// Append appends a slice of patch paths to a PatchStategicMerge slice
// Append appends a slice of patch paths to a StrategicMerge slice
func Append(patches []StrategicMerge, paths ...string) []StrategicMerge {
for _, p := range paths {
patches = append(patches, StrategicMerge(p))
@@ -29,7 +29,7 @@ func Append(patches []StrategicMerge, paths ...string) []StrategicMerge {
return patches
}
// Exist determines if a patch path exists in a slice of PatchStategicMerge
// Exist determines if a patch path exists in a slice of StrategicMerge
func Exist(patches []StrategicMerge, path string) bool {
for _, p := range patches {
if p == StrategicMerge(path) {

View File

@@ -206,11 +206,11 @@ func TestResources1(t *testing.T) {
fakeFs.Mkdir("/")
kt, err := NewKustTarget(l, fakeFs, transformerconfig.MakeDefaultTransformerConfig())
if err != nil {
t.Fatalf("Unexpected construction error %v", err)
t.Fatalf("unexpected construction error %v", err)
}
actual, err := kt.MakeCustomizedResMap()
if err != nil {
t.Fatalf("Unexpected Resources error %v", err)
t.Fatalf("unexpected Resources error %v", err)
}
if !reflect.DeepEqual(actual, expected) {
@@ -236,7 +236,7 @@ func TestResourceNotFound(t *testing.T) {
t.Fatalf("Didn't get the expected error for an unknown resource")
}
if !strings.Contains(err.Error(), `cannot read file "/testpath/deployment.yaml"`) {
t.Fatalf("Unpexpected error message %q", err)
t.Fatalf("unexpected error: %q", err)
}
}
@@ -257,6 +257,6 @@ func TestSecretTimeout(t *testing.T) {
t.Fatalf("Didn't get the expected error for an unknown resource")
}
if !strings.Contains(err.Error(), "killed") {
t.Fatalf("Unpexpected error message %q", err)
t.Fatalf("unexpected error: %q", err)
}
}

View File

@@ -92,7 +92,7 @@ func (pt *patchTransformer) Transform(baseResourceMap resmap.ResMap) error {
// Use Strategic-Merge-Patch to handle types w/ schema
// TODO: Change this to use the new Merge package.
// Store the name of the base object, because this name may have been munged.
// Apply this name to the StrategicMergePatched object.
// Apply this name to the patched object.
lookupPatchMeta, err := strategicpatch.NewPatchMetaFromStruct(versionedObj)
if err != nil {
return err

View File

@@ -59,7 +59,7 @@ type Kustomization struct {
// An Patch entry is very similar to an Resource entry.
// It specifies the relative paths for patch files within the package.
// URLs and globs are not supported.
// The patch files should be Stategic Merge Patch, the default patching behavior for kubectl.
// The patch files should be Strategic Merge Patch, the default patching behavior for kubectl.
// https://github.com/kubernetes/community/blob/master/contributors/devel/strategic-merge-patch.md
Patches []string `json:"patches,omitempty" yaml:"patches,omitempty"`
PatchesStrategicMerge []patch.StrategicMerge `json:"patchesStrategicMerge,omitempty" yaml:"patchesStrategicMerge,omitempty"`