Commit Graph

31 Commits (750881c0ab62a9f59d53582bc33826caa167aa83)

Author SHA1 Message Date
Erik Wilson 765fd253f6 Update vendor 2019-08-19 09:17:28 -07:00
Darren Shepherd 26785edb74 Remove openapi/swagger 2019-08-19 08:33:22 -07:00
Darren Shepherd d8dd57c681 Remove ServerSideApply 2019-08-19 08:33:14 -07:00
Antoine Pelisse eb904d8fa8 Add "fieldManager" to flag to PATCH/CREATE/UPDATE
And add a corresponding flag in kubectl (for apply), even though the
value is defaulted in kubectl with "kubectl".

The flag is required for Apply patch-type, and optional for other PATCH,
CREATE and UPDATE (in which case we fallback on the user-agent).
2019-03-08 16:03:03 -08:00
Ilya Dmitrichenko 6d7a9048b6
Move printers & resources packages
These packages deserve to live at the top level of `k8s.io/cli-runtime`,
as they are potentially of wider use than genericclioptions.
2019-03-07 23:00:24 +00:00
Jingfang Liu b38cf738d6 update kubectl subcommand with -k changes 2019-02-25 16:30:50 -08:00
Antoine Pelisse 0e1d50e70f API Machinery, Kubectl and tests 2019-02-04 13:51:48 -08:00
Kubernetes Prow Robot e28c757e87
Merge pull request #72972 from liggitt/remove-alpha-initializers
Remove use of alpha initializers
2019-01-24 14:54:52 -08:00
WanLinghao 66931c57e8 Add warning info against `kubectl apply --dry-run` which direct people use --server--dry-run instead 2019-01-24 13:18:50 +08:00
Jordan Liggitt 17aa60686e Deprecate and remove use of alpha metadata.initializers field, remove IncludeUninitialized options 2019-01-23 16:34:43 -05:00
Jordan Liggitt ef4983fb52 Update generated files 2019-01-15 13:33:06 -05:00
Jordan Liggitt 9186a81489 Prune apps/v1 resources 2018-12-27 00:44:09 -05:00
Jordan Liggitt 0ff455e340 generated files 2018-12-19 11:19:12 -05:00
Jordan Liggitt fd9e9b01b1 Remove uses of extensions/v1beta1 clients 2018-12-19 11:18:53 -05:00
annehwatson 0a8a07f666 Fix typo 2018-12-10 20:16:17 -08:00
Antoine Pelisse f9ca4aafc6 apply: fix detection of non-dry-run enabled servers
Apply only checks that the server supports dry-run in the create path,
not the update path, which is pretty bad.
2018-12-07 10:54:03 -08:00
Yang Li 141d33a2a5 Fix some golint errors for packages in `pkg/kubectl/cmd`
Co-authored-by: Arijit Basu <sayanarijit@gmail.com>
2018-11-22 22:09:08 +08:00
Antoine Pelisse 89daa462ff Allow kubectl patcher to patch specific version
Give a new "ResourceVersion" option to the patch so that the patch can
be forced against a specific version. Also there is no way to customize
how many retries the patcher should do on conflicts, so also add a
"Retries" option that let's one customize it.
2018-11-20 14:34:08 -08:00
Gustav Westling 37c253aba1 Fix the TestRunApplyPrintsValidObjectList test
The fake webclient should return one ConfigMap per request, not the whole ConfigMapList

Also added additional tests to the output
2018-11-11 15:19:29 +01:00
Gustav Westling 74e63c8f00 Fix dry-run output in kubectl apply --prune
Makes dry-run output match what would happen when running in non dry-run mode.

Objects would only get added to visitedUids if running in non dry-run mode.

visitedUids is used by prune() to know if an action should be taked on the item or not.

Fixes #67863
2018-11-11 15:06:38 +01:00
Davanum Srinivas 954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Davanum Srinivas 43f523d405
Switch to sigs.k8s.io/yaml from ghodss/yaml
Change-Id: Ic72b5131bf441d159012d67a6a3d87088d0e6d31
2018-11-07 13:17:32 -05:00
Antoine Pelisse 54889d581a kubectl dry-run: Check for server didn't work on create
We changed the code to verify that the type supports dry-run, but we've
only done it for patch, not for create, which means that people can
create objects they don't want to create. We can actually simplify the
code by moving the check much earlier in the method, which fixes all
possible bug like this.
2018-10-12 11:30:49 -07:00
k8s-ci-robot 6fc89ae92d
Merge pull request #69633 from soltysh/move_templates
Move pkg/kubectl/cmd/templates -> pkg/kubectl/util/templates
2018-10-12 10:07:07 -07:00
Maciej Szulik 61899e1654
Generated changes 2018-10-11 22:01:06 +02:00
Maciej Szulik 21789b85a6
Move pkg/kubectl/cmd/templates -> pkg/kubectl/util/temlpates 2018-10-11 22:01:03 +02:00
Antoine Pelisse f2e2a930f9 dry-run: Verify if the object supports dry-run
For each object, first we verify if they have a dryRun parameter in the
openapi for the patch verb. If we can't find the object, we assume that
CRD will behave like "namespace". So we check if namespace supports
dryRun. If it does, then we verify that the resource is a CRD.
2018-10-10 08:56:09 -07:00
Maciej Szulik add731dff1
Manual changes to package visibility and test dependencies 2018-10-06 18:44:05 +02:00
Maciej Szulik 1d9617d8e1
Generated changes 2018-10-06 18:44:05 +02:00
Maciej Szulik 55d5df8a36
React to moves 2018-10-06 18:44:05 +02:00
Maciej Szulik 33adf367f9
Move each kubectl command to a separate directory 2018-10-06 18:44:05 +02:00