Skip to content

Commit

Permalink
Fix typo in 'metadata'
Browse files Browse the repository at this point in the history
Signed-off-by: Nic Cope <[email protected]>
  • Loading branch information
negz committed Aug 8, 2024
1 parent 1299198 commit 15f3bf7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ spec:
}
```

> Note that when returning multiple resources, we need to set different `metadata.name` or `matadata.annotations."krm.kcl.dev/composition-resource-name" ` to distinguish between different resources in the composition functions.
> Note that when returning multiple resources, we need to set different `metadata.name` or `metadata.annotations."krm.kcl.dev/composition-resource-name" ` to distinguish between different resources in the composition functions.

### Target Support

Expand Down
2 changes: 1 addition & 1 deletion fn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func TestRunFunctionSimple(t *testing.T) {
Results: []*fnv1beta1.Result{
{
Severity: fnv1beta1.Severity_SEVERITY_FATAL,
Message: "cannot process xr and state with the pipeline output in *v1beta1.RunFunctionResponse: duplicate resource names custom-composition-resource-name found, when returning multiple resources, you need to set different metadata.name or matadata.annotations.\"krm.kcl.dev/composition-resource-name\" to distinguish between different resources in the composition functions.",
Message: "cannot process xr and state with the pipeline output in *v1beta1.RunFunctionResponse: duplicate resource names custom-composition-resource-name found, when returning multiple resources, you need to set different metadata.name or metadata.annotations.\"krm.kcl.dev/composition-resource-name\" to distinguish between different resources in the composition functions.",
},
}},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/resource/res.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ func ProcessResources(dxr *resource.Composite, oxr *resource.Composite, desired
func CheckAndSetDesired(desired map[resource.Name]*resource.DesiredComposed, checked map[string]struct{}, cd *resource.DesiredComposed) error {
name := GetResourceName(cd)
if _, existed := checked[name]; existed {
return errors.Errorf("duplicate resource names %s found, when returning multiple resources, you need to set different metadata.name or matadata.annotations.\"krm.kcl.dev/composition-resource-name\" to distinguish between different resources in the composition functions.", name)
return errors.Errorf("duplicate resource names %s found, when returning multiple resources, you need to set different metadata.name or metadata.annotations.\"krm.kcl.dev/composition-resource-name\" to distinguish between different resources in the composition functions.", name)
}
checked[name] = struct{}{}
desired[resource.Name(name)] = cd
Expand Down

0 comments on commit 15f3bf7

Please sign in to comment.