Commit Graph

35 Commits

Author SHA1 Message Date
Yuwen Ma
f4382738ab [fix 4124] Skip local resource until all transformations have completed.
Resources annotated as "local-config" are expected to be ignored. This skip local resource happens in "accumulateResources" which happens before any transformation operations.
However, the local resource may be needed in transformations.
Thus, this change removes the "drop local resource" logic from accumulateResources and removes these local resource after all transformation operations and var operations are done.

Note:
None of the existing ResMap functions can drop the resource slice easily: "Clear" will ruin the resource order, "AppendAll" only adds non-existing resource, "AbsorbAll" only add or modify but not delete.
Thus, we introduce a new func "Intersection" for resourceAccumulator that specificaly removes the resource by ID and keep the original order.
2021-09-16 11:15:05 -07:00
Natasha Sarkar
1e1b9b484a exec function working dir is the kustomization that referenced it (#4125)
* exec function working dir is the kustomization that referenced it

* suggested changes

* more code review

* use a field instead of an annotation

* more code review
2021-08-19 20:15:24 -07:00
Natasha Sarkar
3350c7213c option for origin data as annotation 2021-08-12 20:09:41 -07:00
monopole
5c4e363f11 Remove delegation to RNode in Resource. 2021-05-11 10:49:17 -07:00
monopole
aa5b4814d6 upgrade to helm 3.5.4 and imdario/mergo v0.3.12 2021-04-09 15:05:41 -07:00
Natasha Sarkar
7dd0ade0f9 add openapi/path field to use custom openapi schema document 2021-02-19 14:19:22 -08:00
monopole
e33addc16b Drop hashicorp multierror due to MPL 2021-02-11 12:24:22 -08:00
Natasha Sarkar
866dbf2017 added an openapi field to the kustomization file 2021-01-22 16:06:57 -08:00
Donny Xia
abc88c56c4 support inline transformer and generator 2020-11-12 15:19:14 -08:00
Donny Xia
94d26ba53a improve the readability for multiple errors 2020-11-06 15:16:48 -08:00
jregan
1d91401772 Simplify use of the Merginator. 2020-08-22 08:07:57 -07:00
jregan
edced4b3f6 Delete newly orphaned code. 2020-08-20 13:12:06 -07:00
jregan
c878957d0b Add a test and temporarily disable some plugin tests. 2020-07-17 08:23:11 -07:00
Donny Xia
897698fb29 Uniform unmarshal function 2020-07-14 17:01:43 -07:00
Donny Xia
7e2d3ff5ab Reuse tansformer codes 2020-06-18 12:18:37 -07:00
Donny Xia
cea1154cd9 Add exception for "validated-by" label 2020-06-17 14:35:12 -07:00
Donny Xia
4843718a2b Check modification 2020-06-17 14:35:12 -07:00
Donny Xia
a0c1979798 Add validator to kustomization 2020-06-17 14:35:12 -07:00
Kubernetes Prow Robot
cedcf3ac04 Merge pull request #2168 from pgpx/feature-kustomizationpatch
Implement "kind: Component" to support composition
2020-06-03 10:32:11 -07:00
Paul Martin
34a442bbef Additional tests around reusing the same bases and components 2020-05-28 23:02:31 +01:00
jregan
07b679955e Beef up test. 2020-05-19 18:26:37 -07:00
jregan
e28af71b6f Add coverage for kusttarget.Load 2020-05-19 17:26:18 -07:00
Paul Martin
c5c53011da PoC to add Components to a separate components list (instead of resources)
If this idea is preferred, the code could really do with a refactor (probably using closures to control the behaviour of accumulate directory)
2020-05-18 19:25:29 +01:00
Paul Martin
1079d8604c Renamed KustomizationPatch to Component 2020-05-18 19:25:29 +01:00
Paul Martin
4454edc14c Implement "kind: KustomizationPatch" to support composition of Kustomize files 2020-05-18 19:25:29 +01:00
Jeff Regan
a9e998d27d Merge pull request #2424 from monopole/fixErrorMessage
Improve config failure error message.
2020-04-30 15:41:04 -07:00
jregan
de9f80c41b Improve config failure error message. 2020-04-29 19:42:56 -07:00
Donny Xia
63f7495e88 Remove inventory transformer #2392 2020-04-28 17:36:44 +00:00
Yujun Zhang
ff6250cdb4 Allow loading file from http 2020-02-29 16:19:21 +08:00
jregan
1f85ce454d More tests/examples. 2019-11-30 11:32:08 -08:00
jregan
d98af3f06a Add PrintPluginEnv plugin. 2019-11-30 09:58:11 -08:00
Jeffrey Regan
83db25d6c4 Activate lint for unused code. 2019-11-18 06:41:01 -08:00
jregan
9fa0391ce9 Remove remaining plugins packages from external API. 2019-11-06 19:32:53 -08:00
Jeffrey Regan
300383959d Remove plugins packages from external API. 2019-11-06 18:31:33 -08:00
Jeffrey Regan
d36e3f015d Remove target package from exposed API. 2019-11-06 15:10:11 -08:00