Skip to content

Commit 564f438

Browse files
authored
Merge pull request kubernetes#114691 from thockin/fix-pod-warning-string
Make the warning about pod name clearer
2 parents 5a896bf + 7c7d79b commit 564f438

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/registry/core/pod/strategy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func (podStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []s
114114
newPod := obj.(*api.Pod)
115115
var warnings []string
116116
if msgs := utilvalidation.IsDNS1123Label(newPod.Name); len(msgs) != 0 {
117-
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))
117+
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))
118118
}
119119
warnings = append(warnings, podutil.GetWarningsForPod(ctx, newPod, nil)...)
120120
return warnings

0 commit comments

Comments
 (0)