From 7c7d79b0583e76b389881e6980c4ff31ff391a0e Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sun, 25 Dec 2022 14:16:44 -0800 Subject: [PATCH] Make the warning about pod name clearer Previously this was cut-paste from deployment. It didn't make much sense for pod. --- pkg/registry/core/pod/strategy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/registry/core/pod/strategy.go b/pkg/registry/core/pod/strategy.go index 4f48457530f..bca362709ce 100644 --- a/pkg/registry/core/pod/strategy.go +++ b/pkg/registry/core/pod/strategy.go @@ -114,7 +114,7 @@ func (podStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []s newPod := obj.(*api.Pod) var warnings []string if msgs := utilvalidation.IsDNS1123Label(newPod.Name); len(msgs) != 0 { - warnings = append(warnings, fmt.Sprintf("metadata.name: this is used in Pod names and hostnames, which can result in surprising behavior; a DNS label is recommended: %v", msgs)) + warnings = append(warnings, fmt.Sprintf("metadata.name: this is used in the Pod's hostname, which can result in surprising behavior; a DNS label is recommended: %v", msgs)) } warnings = append(warnings, podutil.GetWarningsForPod(ctx, newPod, nil)...) return warnings