The following flags, which do not apply to kubectl run,
have been removed:
--cascade
--filename
--force
--grace-period
--kustomize
--recursive
--timeout
--wait
These flags were being added to the run command to support
pod deletion after attach, but they are not used if set, so
they effectively do nothing.
This PR also displays an error message if the pod fails to be
deleted (when the --rm flag is used). Previously any error
during deletion would be suppressed and the pod would remain.
This PR also adds some unit tests for run and attach with and
without the --rm flag. As such, some minor refactoring of the
run command has been done to support mocking dependencies.
Kubernetes-commit: 25e713ba777ec1158fad749e9467601526ba096a
This commit removes passing source field as parameter. Instead,
this commit returns error verb and error functions to caller function.
Caller function can add source field by generating correct message.
Kubernetes-commit: d336f7df874dc978ebd97971e1fc93d891c21e7d
Patch type determination is done by checking existence
of resource in schema and if it exists, it uses strategic merge patch.
Otherwise, like for CRDs, it uses merge patch type.
Currently, this code portion is not easily extensible and this PR
splits required checks into their own function to increase extensibility.
Kubernetes-commit: 15512210e3e14b0c827d13334394d658dc7ddc88
This commit makes adjustments in rollout status command to make it
unit testable. In addition to that, unit tests for rollout status
command is added.
Kubernetes-commit: f21e5983a95ab4e72aa0ddd9ae465a613490b422
This PR adds validation to check that `dry-run` and `force` flags
are not used at the same time. Because when `force` flag is set,
`dry-run` is discarded and objects are replaced already.
Kubernetes-commit: e389b2723e6af29a9f70509fe8ff6e5121c30681
The `newlineReporter` intends to print a new line after the test to
prevent the something print to the stdout and mess up the test result
while cause the tool like `go-junit-report` fail to parse the result.
But this is no longer needed based on following evidence.
- The issue that was first introduced in `go-junit-report` has already fixed in the version
referenced in `go.mod`.
- The `newlineReporter` report doesn't fix anything for `Ginkgo` v1 or V2 or `go test`, it just prints a
new line before the test summarization.
Signed-off-by: Dave Chen <dave.chen@arm.com>
Kubernetes-commit: 9953dde65dfaede9f1d481296053adc301ad9773
Validate function is used to validate command options and should not get
any additional parameter. To preserve compatibility across all
kubectl commands, this PR removes all parameters in validate functions.
Kubernetes-commit: 8fb423bfabe0d53934cc94c154c7da2dc3ce1332
In order to promote kubectl alpha events to beta,
it should at least support flags which is already
supported by kubectl get events as well as new flags.
This PR adds;
--output: json|yaml support and does essential refactorings to
integrate other printing options easier in the future.
--no-headers: kubectl get events can hide headers when this flag is set for default printing.
Adds this ability to hide headers also for kubectl alpha events.
This flag has no effect when output is json or yaml for both commands.
--types: This will be used to filter certain events to be printed and
discard others(default behavior is same with --event=Normal,Warning).
Kubernetes-commit: 63b8684cd32f96f3a1e5c5a5fd05e8194f2140fc