Commit Graph

16 Commits (0c026bfac163f0bb04283a7c2bf6b5a39ea1d3e0)

Author SHA1 Message Date
Antoine Pelisse 0e1d50e70f API Machinery, Kubectl and tests 2019-02-04 13:51:48 -08:00
Antoine Pelisse 95eec905c7 diff: Make filename cross-platform compatible 2018-12-11 15:36:26 -08:00
Antoine Pelisse b6135f63aa diff: Fix overlapping filenames
The filename can overlap when multiple resources have the same name (but
obviously are of a different type). Include the name of the type in the
file name to prevent the overlap.
2018-12-11 09:19:52 -08:00
Antoine Pelisse a889f37505 Optimistic-locking on diff
There is currently a race-condition when diffing, where we get the
object and then run a server-side dry-run patch and compare the two
results. If something changes the object on the server between the get
and the patch, the diff is going to show unrelated changes. We can now
specify the exact revisionversion that we want to patch, and that will
return a conflict, and we can retry multiple times to get a
non-conflicting diff. Eventually (after 3 times), we diff without
checking the version and throw a warning that the diff might be
partially wrong.
2018-11-20 14:34:37 -08:00
Davanum Srinivas 43f523d405
Switch to sigs.k8s.io/yaml from ghodss/yaml
Change-Id: Ic72b5131bf441d159012d67a6a3d87088d0e6d31
2018-11-07 13:17:32 -05:00
k8s-ci-robot 2129bc9f85
Merge pull request #69742 from apelisse/fix-diff-error
Rename KUBERNETES_EXTERNAL_DIFF to KUBECTL_EXTERNAL_DIFF
2018-10-13 09:54:52 -07:00
Antoine Pelisse 572a028148 kubectl diff: Print error when something goes wrong 2018-10-12 14:12:32 -07: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
Antoine Pelisse e31d14cb10 kubectl diff: Rename KUBERNETES_EXTERNAL_DIFF to KUBECTL_EXTERNAL_DIFF 2018-10-12 10:56:16 -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 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