* Add <...> kuberc set --section=credentialplugin
The requirement that the `--command` option be provided is no longer
valid; a solution will need to be found.
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
* Remove required mark on `--command` flag
Move the validation logic to the Validate() function
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
* Remove requirement for `--command`
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
* Add cmd test cases for kuberc
- Verify all error messages added/changed by this PR
- Verify changes are effected by at least one valid `kubectl kuberc
set` invocation with --section=credentialplugin
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
* Add unit tests for --section=credentialplugin
Additionally:
- Update allowlist-entry validation logic to check for empty string in
value of k/v pairs
- Update kuberc cmd test with this case as well
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
* Address linter complaints
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
* Update staging/src/k8s.io/kubectl/pkg/cmd/kuberc/set.go
Co-authored-by: Maciej Szulik <soltysh@gmail.com>
* Add two new test cases
Additionally:
- update error message when policy is invalid
- use utilerrors.NewAggregate instead of custom code
- add --section=credentialplugin example to cli help
- fix copypasted doc comments
- use more descriptive variable names in for loops
- avoid confusion due to variable shadowing
- fix capitalization typo
- check both validate and run errors in credentialplugin tests
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
* Improve cli help for policy flag
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
---------
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
Co-authored-by: Maciej Szulik <soltysh@gmail.com>
Kubernetes-commit: b4220f8b08949c115258abed0398512bf54ffc48
Default ShowEvents=false when describing multiple objects and
the user has not explicitly set --show-events. Single-object
describe unchanged. Applied in both Run() and
DescribeMatchingResources() using a value copy of
DescriberSettings.
Signed-off-by: Mark Liu <mark@prove.com.au>
Kubernetes-commit: 20696e1f896b4fb013248fdb919a55e6eea75eef
* Drop WorkloadRef field and introduce SchedulingGroup field in Pod API
* Introduce v1alpha2 Workload and PodGroup APIs, drop v1alpha1 Workload API
Co-authored-by: yongruilin <yongrlin@outlook.com>
* Run hack/update-codegen.sh
* Adjust kube-scheduler code and integration tests to v1alpha2 API
* Drop v1alpha1 scheduling API group and run make update
---------
Co-authored-by: yongruilin <yongrlin@outlook.com>
Kubernetes-commit: 3f094dc228318b89f1fef313543b960e35ca6e3e
* kubectl wait: Support multiple conditions
* Error out when --for is not passed
* Add examples for AND'ing and OR'ing multiple conditions
Kubernetes-commit: d37765936d2b29beede5c9a8872ccd63e2811b00
Check if delegate is nil before calling Next() in terminalSizeQueueAdapter
to prevent a nil pointer dereference.
Kubernetes-commit: 5f675740442edc32f2dcbbe1453f49484440e7a8
When a resource exists on the server, kubectl apply --dry-run=client
was outputting the unchanged server state instead of showing what
would result from applying the manifest.
Fix by computing the three-way merge patch (same as real apply) and
then applying it locally to the current server state.
Kubernetes-commit: aea05ad180edaffbb1f09b41b62d452779ed1da1
This has been replaced by `//build:...` for a long time now.
Removal of the old build tag was automated with:
for i in $(git grep -l '^// +build' | grep -v -e '^vendor/'); do if ! grep -q '^// Code generated' "$i"; then sed -i -e '/^\/\/ +build/d' "$i"; fi; done
Kubernetes-commit: ad79e479c2314d1de91e54bc5630c52027f12e21
* kubectl explain: Add -r shorthand flag for --recursive
* kubectl explain: Change --recursive shorthand flag to R
Kubernetes-commit: 8759535363ab8f5e1c49cc4e6a5716b81e3960eb
When labels are both added and removed, labels modified message is now
printed instead of labeled/unlabeled.
Kubernetes-commit: 14cf86648fad1f6e4a503d50184241928f509762
Remove reference to internal types in kuberc types
* Remove unserialized types from public APIs
Also remove defaulting
* Don't do conversion gen for plugin policy types
Because the plugin policy types are explicitly allowed to be empty, they
should not affect conversion. The autogenerated conversion functions for
the `Preference` type will leave those fields empty.
* Remove defaulting tests
Comments and simplifications (h/t jordan liggitt)
Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
Kubernetes-commit: fab280950dabfefabe6a8578b7a76372a9b21874