kubectl wait command errors out when the waited resource does not exist.
But we need to provide a way to the users about intentionally also waiting for
the creation of resources.
This PR introduces a new flag to cover waiting for the creation of resources
with preserving the default behavior.
Kubernetes-commit: e24b9a022f3b1e97ea538c9754d4d38f119f275e
Make it possible to parse jsonpath filter expressions: Split
jsonpath expressions on single '=' only and leave '==' as part of the
string.
Reported-at: https://github.com/kubernetes/kubernetes/issues/119206
Signed-off-by: Andreas Karis <ak.karis@gmail.com>
Kubernetes-commit: 41889984304c44b879d8bcae92c9ed7aa3fd8c67
add integration test to wait for json without value
refactor JSON condition value parsing and validating
adjusting test to reflect the error message refactoring
Kubernetes-commit: dbdd861ea366af50fb74983426587dad7222cb89
Extend current JSONPath condition logic to return from wait on "any" value.
Change parsing JSONPath input to support the syntax without value.
Match any simple or complex (object or array) values.
Kubernetes-commit: 9d3e55ec431f3f595a7739fcc592602f7cc1d69b
* Wire generic context to better handle timeout
* Add integration test for wait timeout
* kubectl wait: Fix integration test always passing issue
Currently, `kubectl wait` integration test always passes even if
it gets an error. Problem is object check is done after errexit is
turned off.
This PR redirects error to output and correctly assures that
object is expected status and if it is not, test should fail.
Kubernetes-commit: 369534c6ec625ed9b251b453215c9578cdeb59bc
* Prepend reactor not watch reactor
This forces the object to be created first it looks like, avoiding a race condition in testing.
Use PrependReactor instead of PrependWatchReactor
Decrease test timeouts
No need to be this long
Revert use of new scheme to reuse same scheme for all tests
Allow 1 to 2 actions in stale observed generation failure
Allow range of test action lengths
Reduce test flakiness
Fix TestWaitForJSONPathCondition/handles_watch_condition_change
Set delete wait options properly
cherry pick original changes back into branch
* Revert delete timeout setting change
* Remove validateActions functions
* Remove go-spew
Kubernetes-commit: dcc54dec19fa5f4605cf679af5289b173ce6015f
* move to using informers for getObjAndCheckCondition
* move to using informers for IsDeleted
* update tests to handle new informer methodology
* set minimum timeout to 1s because informer can't handle less for caching reasons
* fix null return for deletes issue
Kubernetes-commit: 171431ca2c009c0a576fa288b7df892b59299389
When the wait command was added in 76794643c5 (add wait, 2018-05-18, #64034),
this comparison was via ToLower. It moved to use Unicode case folding
[1,2] in f4940cf55f (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
Kubernetes-commit: f69d52338b21da938021af37f49f49a83016534d
cleanup: use i18n.T only on string literals
cleanup: sort imports
Add i18n dependency for wait.go
Remove translation on envResource
cleanup: translate string instead of variable
cleanup: sort imports
cleanup: translate string literal only
Kubernetes-commit: cc8428566ea7160c5b20410a1bee53ca7ddb998e