Skip to content

Commit b5b6a71

Browse files
committed
add name validation in namespace.Update
Signed-off-by: Mike Interlandi <[email protected]>
1 parent ca23fc8 commit b5b6a71

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/cmd/namespace/update.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ import (
2525
)
2626

2727
func Update(ctx context.Context, client *containerd.Client, namespace string, options types.NamespaceUpdateOptions) error {
28+
if err := validateNamespaceName(namespace); err != nil {
29+
return err
30+
}
31+
2832
labelsArg := objectWithLabelArgs(options.Labels)
2933
namespaces := client.NamespaceService()
3034
for k, v := range labelsArg {

0 commit comments

Comments
 (0)