Anna Song
4cccb838ce
Load legacy kustomization fields for localize ( #4918 )
...
* Load legacy kustomization
* Expose loadKustFile in kusttarget
2022-12-13 08:19:34 -08:00
Katrina Verey
fb0f567b63
Remove local-only resources at the last minute
...
This allows name references to them to be correctly resolved
2022-11-29 19:05:16 -05:00
Kubernetes Prow Robot
b20e611413
Merge pull request #4723 from koba1t/emit_a_warning_when_deprecated_fields_are_used
...
Emit a warning on build when deprecated fields are used
2022-11-16 08:32:50 -08:00
Ahmed AbouZaid
ea21b37d67
proposal v2
2022-10-22 03:16:41 +02:00
Ahmed AbouZaid
d29febecb7
Fix krm exec function working dir
2022-10-22 03:16:41 +02:00
yugo kobayashi
21ee7f7125
Emit a warning when deprecated fields are used
2022-09-01 23:02:50 +00:00
Natasha Sarkar
8868d91670
Revert "Load and calculate Destination of files for kustomize localize ( #4652 )"
...
This reverts commit bf17fe1d8f .
2022-08-26 13:26:23 -05:00
Anna Song
bf17fe1d8f
Load and calculate Destination of files for kustomize localize ( #4652 )
...
* Implement file localization for localize
Implement file localization for new command kustomize localize
* Patch file localization
Fix lint errors, address feedback, begin transition to file loader from
localizer
* Add Repo() to Loader
* Implement locLoader factory + cleanup
* Add domain to RepoSpec
Fix ssh relative url host parsing for non-github domain on the side
* Implement Load(), New(), Root(), Dst() for LocLoader
* Address repospec code review comments
* Address 1st round of code review feedback
* Address feedback #2
Removed localized path calculations to cover edge case and improve readability.
* Remove ldr Cleanup logging
* Address code review round #3
* Address code review feedback #4
2022-08-19 14:33:53 -07:00
Anna Song
d1102fb726
Move demandDirectoryRoot into kyaml/filesys ( #4677 )
...
* Move demandDirectoryRoot into kyaml/filesys
* Make root directory platform-agnostic
Support windows root directory. Dogfood own error package.
* Use cleaner windows support implementation
* Address feedback
* Address feedback x2
* Re-apply go.sum changes to avoid CI errors
2022-06-30 11:12:07 -07:00
Kubernetes Prow Robot
d3d92157fa
Merge pull request #4567 from mvgmb/master
...
Add support for remote OpenAPI schema
2022-05-10 11:01:43 -07:00
Mohd Bilal
66e4e1582b
fix kustomize 4.5.3+ breaking remote resources (4559)
2022-04-23 06:25:24 +00:00
Mário Bezerra
94af647556
Add support for remote OpenAPI schema
2022-04-19 23:58:04 -03:00
Jennifer Cwagenberg
7888aef305
Raise error for external generators or transformers ( #4565 )
...
* Raise error if duplicate orgids for external transformers or external generators are configured
* Remove output of resources in error message
* Remove trailing newline
2022-04-06 15:46:25 -07:00
Mohd Bilal
6dabba1d23
misspell corrected
2022-02-27 07:47:59 +00:00
Mohd Bilal
bd05631887
Error type MalformedYamlError created. api.internal.target.kusttarget.accumulateResources checks for this new error type
2022-02-27 07:21:16 +00:00
Natasha Sarkar
bcebad1664
new command kustomize edit add buildmetadata ( #4413 )
...
* new command kustomize edit add buildmetadata
* new commands kustomize edit set buildmetadata and kustomize edit remove buildmetadata
2022-01-26 15:34:50 -08:00
natasha41575
9577d61167
move origin to be an attribute of KustTarget
2022-01-19 17:26:19 -08:00
natasha41575
2c23b960ff
set transformer annotation when the option is specified
2022-01-19 17:17:47 -08:00
Kubernetes Prow Robot
13e26004fd
Merge pull request #4357 from natasha41575/TransformerAnnotations
...
define methods, types, and unit tests for transformer annotations
2022-01-10 15:32:28 -08:00
Kubernetes Prow Robot
59c8268245
Merge pull request #4334 from sylr/handle-http-errors
...
Handle HTTP error codes in file loader
2021-12-30 16:18:51 -08:00
natasha41575
4f21d60045
helper methods, types, and unit tests for transformer annotations
2021-12-29 15:27:34 -08:00
Natasha Sarkar
964bb38ba2
add origin annotation for resources generated by generators ( #4341 )
...
* add origin annotation for resources generated by builtin and custom generators
* decouple origin data from generator data and account for inline generators
2021-12-23 10:40:29 -08:00
natasha41575
a8f58b4080
collect origin data only when the option is set
2021-12-13 11:38:03 -08:00
Sylvain Rabot
738573b079
Error on HTTP resources are not nescessarly protocol related
...
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr >
2021-12-10 09:27:37 +01:00
Sylvain Rabot
e65e571ed1
Do not try to load HTTP resources from FS when error occurs
...
It is useless and it clogs the error message.
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr >
2021-12-08 18:24:29 +01:00
Yuwen Ma
a1c5d79d94
Move api/builtin to internal
2021-11-22 15:54:18 -08:00
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