Commit Graph

228 Commits

Author SHA1 Message Date
Morten Torkildsen 9135af4218 Improve error handling 2020-08-16 20:10:17 -07:00
Kubernetes Prow Robot 55b73eed69
Merge pull request #206 from mortent/RefactorPrinters
Update status command to leverage inventory and add additional output formats
2020-08-13 13:44:23 -07:00
Sean Sullivan 13c8cd4a51 Small destroyer fix removes unneeded code 2020-08-12 15:21:08 -07:00
Sean Sullivan 8e98780962 Fixes bug in destroy command 2020-08-12 13:44:00 -07:00
Sean Sullivan 1dc67ad820 Function to set inventory factory function on inventory client 2020-08-09 23:35:52 -07:00
Kubernetes Prow Robot 79bc33b14d
Merge pull request #213 from seans3/expose-inventory-func
Inventory client uses factory function
2020-08-07 11:31:56 -07:00
Sean Sullivan a4e3b45135 Inventory client uses factory function 2020-08-06 22:25:28 -07:00
Kubernetes Prow Robot 92fed4f691
Merge pull request #212 from mortent/AllowMultipleNamespacesWithApply
Allow resources in multiple namespaces
2020-08-06 21:30:19 -07:00
Morten Torkildsen ba14c45ed5 Update status command to leverage inventory and add additional output formats 2020-08-06 20:27:30 -07:00
Morten Torkildsen 8174825d31 Allow resources in multiple namespaces 2020-08-06 19:10:51 -07:00
Phani Teja Marupaka 73e5d60407 Server side preview 2020-08-04 18:01:46 -07:00
Sean Sullivan 09f09c56ed Adds random suffix to legacy default inventory name 2020-08-03 13:16:22 -07:00
Sean R. Sullivan c9e7d329da Updates prune algorithm to use one inventory object 2020-07-29 18:33:49 -07:00
Kubernetes Prow Robot 537dfbaa33
Merge pull request #205 from jijiew/live-ns
namespaced kpt live init
2020-07-29 14:00:03 -07:00
Jijie Wei 7c5aa7a1c2 remove test 2020-07-29 08:54:08 -07:00
Jijie Wei 2da9da4e26 return inventory namespace as output 2020-07-28 12:04:05 -07:00
Jijie Wei a6f98bc844 namespaced kpt live init 2020-07-27 14:07:30 -07:00
Morten Torkildsen 724553f71e Prune/destroy resources in reverse order from apply 2020-07-17 09:43:43 -07:00
Christoph Glaubitz 3757e60840 Added parsing to objmetadata_test.TestCreateObjMetadata
This commit extends TestCreateObjMetadata. The test function does not
just verify CreateObjMetadata, but also uses ParseObjMetadata to verify
back and forth between both functions. I left specific testing of
ParseObjMetadata in place, because there might be edge cases, that
should be tested on its own.

I'm aware, that the TestCreateObjMetadata now tests two things, but I
think it makes life of maintainers and new contributors far easier.
E.g. the change I introduced in #193 would have been catched by tests,
rather than someone with a mental model of all of the code.
2020-07-15 10:52:13 +02:00
Sean Sullivan 2f6a1ef017 Validates resource names before storing in inventory 2020-07-14 14:18:56 -07:00
Mikhail Mazurskiy 40e15da909
Use sigs.k8s.io/yaml for YAML 2020-06-25 12:17:31 +10:00
Sean R. Sullivan d09af58e2c Creates helper function to create prune events 2020-06-16 11:24:56 -07:00
Sean R. Sullivan 0062a265b2 Creates InventoryClient to refactor prune 2020-06-15 13:25:05 -07:00
Kubernetes Prow Robot aaa5c94bf9
Merge pull request #188 from mortent/SimplifyInfoHelper
Simplify the InfoHelper and ApplyTask
2020-06-14 23:51:56 -07:00
Sean R. Sullivan 0e01dd4817 Initial move of Inventory to its own package 2020-06-11 17:42:34 -07:00
Morten Torkildsen ae77d32ad6 Simplify the InfoHelper and ApplyTask 2020-06-10 22:22:06 -07:00
Kubernetes Prow Robot 0bf530f31e
Merge pull request #182 from fsommar/non-zero-exit-code
Exit with non-zero exit code on error
2020-06-10 15:54:57 -07:00
Fredrik Sommar fab8593a16
Use exit code 3 for timeouts
Picked arbitrarily in the 3-124 span of non-reserved exit codes.
2020-06-09 08:45:15 +02:00
Morten Torkildsen 2381432e70 Separate reading manifests into Info objects from the apply logic 2020-06-08 16:59:03 -07:00
Kubernetes Prow Robot b17c21e148
Merge pull request #178 from mortent/CRDAndCRPreview
Support preview when resource set contains both CRD and CR
2020-06-05 15:03:46 -07:00
Kubernetes Prow Robot d246e8e8f3
Merge pull request #177 from mortent/PrintAdapterToApplyTask
Move the printer adapter into the ApplyTask
2020-06-05 13:43:46 -07:00
Kubernetes Prow Robot 391d893e83
Merge pull request #171 from seans3/inventory-polymorphism
First pass at inventory polymorphism POC
2020-06-05 09:53:44 -07:00
Kubernetes Prow Robot 3f76d530c2
Merge pull request #183 from mortent/WaitBeforeUnschedulable
Only mark pods as unschedulable if they have been in that state for a while
2020-06-05 09:39:43 -07:00
Morten Torkildsen d984d5ec8d Only mark pods as unschedulable if they have been in that state for a while 2020-06-05 09:27:40 -07:00
Sean R. Sullivan ad6f42477d First pass at implementing inventory polymorphism for Load() 2020-06-05 00:36:17 -07:00
Morten Torkildsen 689e16e708 Add support for CRDs in the kstatus library 2020-06-04 20:43:00 -07:00
Sean R. Sullivan deaa215f57 First pass at inventory polymorphism POC 2020-06-04 16:40:18 -07:00
Sean R. Sullivan a2532f9e36 Expand stdin and filter inventory object for diff 2020-06-04 16:03:52 -07:00
Fredrik Sommar b0bfb0451c
Exit with non-zero exit code on error
A change in exit code behavior was introduced in #166, where printing an
error used to also cause the application to exit with a non-zero exit
code. As a result, errors in e.g. `kpt live apply` exits the process
with a 0 exit code.

This change should bring it in line with how it works before, but I'm open to
other solutions if there's a cleaner way to accomplish this without
having an error log automatically mean that the application needs to
exit.
2020-06-04 15:26:40 +02:00
Kubernetes Prow Robot 03aba2693b
Merge pull request #180 from mortent/FixPruneDeleteSkipped
Fix output from lifecycle directive with the destroy command
2020-05-29 13:31:33 -07:00
Morten Torkildsen 35c1f6c836 Fix output from lifecycle directive with the destroy command 2020-05-29 10:39:35 -07:00
Kubernetes Prow Robot 31b261c29f
Merge pull request #173 from mortent/AllowSettingCustomPoller
Make Poller property on Applier public to allow Custom poller implementation
2020-05-29 10:17:15 -07:00
Morten Torkildsen 639a191b22 Support preview when resource set contains both CRD and CR 2020-05-27 19:43:08 -07:00
Morten Torkildsen b76b6e7563 Move the printer adapter into the ApplyTask 2020-05-22 14:16:38 -07:00
Morten Torkildsen be97f4b60b Handle dryrun when applying CRDs 2020-05-22 13:00:13 -07:00
Morten Torkildsen 0058932245 Reduce the number of flags for apply and improve the naming 2020-05-20 09:27:29 -07:00
Morten Torkildsen b598bfd8bd Make Poller property on Applier public to allow Custom poller implementation 2020-05-18 21:23:46 -07:00
Morten Torkildsen 7f4ec70de2 Move CachingRESTClientGetter into its own package 2020-05-18 20:54:29 -07:00
Kubernetes Prow Robot fde6a97711
Merge pull request #168 from mortent/SupportWaitForPrune
Add flags for waiting for pruned resources to be deleted
2020-05-14 16:50:59 -07:00
Morten Torkildsen 55ace21d79 Add flags for waiting for pruned resources to be deleted 2020-05-12 21:43:26 -07:00