The contains-group-resources was an implementation error, we specified
contains-group-kinds in the KEP.
Because it is in alpha, we simply switch to the new annotation.
We will recognize the old annotation and migrate existing alpha
applysets, but support for this migration can be removed in beta/GA of
applyset.
Kubernetes-commit: 10caecb3b22cf93c7caa2ac70d40af9b550c0da2
To improve wall-clock speed, we run list operations in parallel. This
particularly helps when the round-trip time is high.
We issue requests as quickly as possible, kube-apiservers should all
have priority and fairness at this point and we don't want to
duplicate/fight that system.
Kubernetes-commit: 82eee59d0feb4b303e6ef78ebb7ec646a059f266
* Test for ApplySet with --dry-run=client|server
* Use the real format for ApplySet ID
* Incorporate feedback
* Adjustments from rebase
Kubernetes-commit: 6a31757f45693fec5ea4723bcb405ce4437e31ca
As we apply objects when using apply/prune v2, we want to be sure they
include the label that ties them back to the applyset they are part
of.
Co-Authored-By: Katrina Verey <katrina.verey@shopify.com>
Kubernetes-commit: ab058308401b35b4865424cfa43ed75a554af2a3
Changes in kubectl apply --prune to support k8s Inclusive Naming Initiative:
* Deprecated the --prune-whitelist flag.
* Deprecated the PruneWhitelist field on ApplyFlags struct.
* Removed PruneWhitelist field (not used anywhere) from ApplyOptions struct.
* Added --prune-allowlist flag.
* Added PruneAllowlist field on ApplyFlags struct.
* Added unit tests for prune with allowlist
This commit also fixes a bug where the command would fail if you specified
the sameGVK multiple times for --allow-whitelist. Now it only attempts to
prune the unique set of allowed GVKs.
Kubernetes-commit: f7ebf4d8852d4500f24100ca9a4ca665efc1fada
Currently `kubectl apply` determines correct patch type for given
GVKs by trying to register schema and if it succeeds, it uses
strategic-merge-patch.
But OpenAPI endpoint already stores which patch types are supported
by GVKs. This PR checks OpenAPI endpoint to retrieve patch type,
if OpenAPI is enabled. If it is not enabled, patch type determination
will be done as conventional registration method.
Kubernetes-commit: cddbb0c56397448ac0489f0473a26601c1feece8
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
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
* Fix: kubectl create -f and kubectl delete -f are not glob friendly
* gofmt fix
* removing unused receiver
* adding extra test
* log paths used
* fixing bad merge
* klog/v2 mod
* rebase fixes
* better error fmt
* error fmt unit test
* PR comments and tests
* Add reference to globbing to help snippets
Kubernetes-commit: 2cb3c7f706dbf266820fbde2e1b23a320e5d3de7