Removing this restrictions will allow us to use these commands with the
new resize subresource.
Kubernetes-commit: e1ca63489f2b788f893ab37a27242ce319e1eaf6
The canonical import for json-patch v4 is
gopkg.in/evanphx/json-patch.v4 (see
https://github.com/evanphx/json-patch/blob/master/README.md#get-it for
reference).
Using the v4-specific path should also reduce the risk of unwanted v5
upgrade attempts, because they won't be offered as automated upgrades
by dependency upgrade management tools, and they won't happen through
indirect dependencies (see
https://github.com/kubernetes/kubernetes/pull/120327 for context).
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Kubernetes-commit: 5300466a5c8988b479a151ceb77f49dd00065c83
`f.ToRawKubeConfigLoader().Namespace()` throws `ErrEmptyConfig` when
default configuration file can not be found, even if it invalid.
However, when user explicitly passes `--local` flag, that means
we can gracefully handle this error and continue. This commit does that
for the commands having `--local` flag.
Kubernetes-commit: ba49ccdbc9b4761d0c9589ab7ca9f41029a99568
`kubectl patch` commands fails when patch type is strategic merge
patch for CRDs. This PR handles `UnsupportedMediaType` error and
shows descriptive message to user.
Kubernetes-commit: dc2c0ad831f71349befdfa57d4367c4ea57d4a6c
Currently, server-side dry-run fetches the OpenAPI schema for every
single object.
This change fetches the OpenAPI schema only once.
Kubernetes-commit: caa158610dfb53de3582ed6df0eb37359206fc66
The current structure is limited in the size of the patch it can
accept depending on the shell of the environment (for instance, a
900kb patch cannot be applied in bash 4 on Fedora 32). Allow a user
to specify `--patch-file` to provide a file containing the patch
rather than directly on the command line.
Kubernetes-commit: 6c165083ce4665dbdbc29fbdea03e538e87abaa2
* Extend --dry-run to support string values for dry run strategies
'client', 'server', and 'none'
* Ensure --dry-run is set and accessed via cmdutil
* Deprecate --dry-run (unset), --dry-run=true, and --dry-run=false
Kubernetes-commit: af52beda260257e81cc9e19e9e5108b682ee93d6