mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 12:32:03 +00:00
kubectl: Document --for's Unicode case-folding condition-value comparison
When the wait command was added in76794643c5
(add wait, 2018-05-18, #64034), this comparison was via ToLower. It moved to use Unicode case folding [1,2] inf4940cf55f
(Staticcheck: vendor/k8s.io/kubectl/pkg/scale|describe/versioned|cmd/top|cmd/util/editor|cmd/top, 2020-01-21, #87403). [1]: https://pkg.go.dev/strings#EqualFold [2]: http://www.unicode.org/reports/tr30/tr30-1.html
This commit is contained in:
parent
1367cca8fd
commit
f69d52338b
@ -65,7 +65,7 @@ var (
|
||||
# Wait for the pod "busybox1" to contain the status condition of type "Ready"
|
||||
kubectl wait --for=condition=Ready pod/busybox1
|
||||
|
||||
# The default value of status condition is true; you can set it to false
|
||||
# The default value of status condition is true; you can wait for other targets after an equal delimiter (compared after Unicode simple case folding, which is a more general form of case-insensitivity):
|
||||
kubectl wait --for=condition=Ready=false pod/busybox1
|
||||
|
||||
# Wait for the pod "busybox1" to contain the status phase to be "Running".
|
||||
@ -142,7 +142,7 @@ func (flags *WaitFlags) AddFlags(cmd *cobra.Command) {
|
||||
flags.ResourceBuilderFlags.AddFlags(cmd.Flags())
|
||||
|
||||
cmd.Flags().DurationVar(&flags.Timeout, "timeout", flags.Timeout, "The length of time to wait before giving up. Zero means check once and don't wait, negative means wait for a week.")
|
||||
cmd.Flags().StringVar(&flags.ForCondition, "for", flags.ForCondition, "The condition to wait on: [delete|condition=condition-name|jsonpath='{JSONPath expression}'=JSONPath Condition]. The default status value of condition-name is true, you can set false with condition=condition-name=false.")
|
||||
cmd.Flags().StringVar(&flags.ForCondition, "for", flags.ForCondition, "The condition to wait on: [delete|condition=condition-name[=condition-value]|jsonpath='{JSONPath expression}'=JSONPath Condition]. The default condition-value is true. Condition values are compared after Unicode simple case folding, which is a more general form of case-insensitivity.")
|
||||
}
|
||||
|
||||
// ToOptions converts from CLI inputs to runtime inputs
|
||||
|
Loading…
Reference in New Issue
Block a user