Commit Graph

23 Commits

Author SHA1 Message Date
Varsha Prasad Narsing
7911b2c001 [refactor]: Internalize loader api
This PR intends to move the loader api to
internal. Only the necessary methods which
are needed for the api have been put into
`pkg/loader.go`.

Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
2023-09-28 10:49:45 -04:00
Anna Song
9d8ed39d3d Localize helm additionValuesFiles (#5013) 2023-02-01 10:39:20 -08:00
Anna Song
e2aff13587 Expose path to localize destination 2023-01-30 15:42:58 -08:00
Anna Song
142360b0ed Localize ConfigMapGenerator, SecretGenerator 2023-01-27 14:06:40 -08:00
Anna Song
fb294921f5 Localize helm fields (#4978)
* Localize helm fields

* Address readability feedback

* Handle edge cases

* Improve readability

Split copyChartHome and use existence to prevent repeated copying.
2023-01-26 12:56:26 -08:00
Anna Song
7899b80a00 Localize patch, ReplacementTransformer (#4943)
* Localize PatchStrategicMergeTransformer, ReplacementTransformer

* Improve readability
2023-01-17 12:28:34 -08:00
Kubernetes Prow Robot
c6ca3ff799 Merge pull request #4929 from koba1t/refactor/cleanup_Unmarshal_kustomization
Error on duplicate fields in Kustomization
2023-01-06 10:37:59 -08:00
koba1t
6489e35b7c improve error messages 2023-01-07 03:30:16 +09:00
Anna Song
06da3b96a2 Localize resources (#4912)
* Localize resources

* Improve readability

* Add integration tests

* Group test helper functions
2023-01-05 08:47:59 -08:00
Anna Song
3022dd2931 Localize legacy fields 2022-12-22 17:21:16 -05:00
Anna Song
aec35009ed Implement locRootPath (#4909)
* Implement locRootPath, and include userinfo, port in locFilePath

* Strip userinfo, port

* Improve readability
2022-12-22 12:15:26 -08:00
Anna Song
de6162625f Localize fields: openapi, configurations, crds (#4907)
* Localize openapi, configurations, crds

* Add integration test

* Move krusty test

* Address code review feedback
2022-12-22 12:07:26 -08:00
Anna Song
a1bfab382a Localize PatchTransformer, PatchJson6902Transformer (#4920)
* Localize patches, patchesJson6902 custom transformers

* Improve readability
2022-12-16 09:52:17 -08:00
yugo kobayashi
faddb49c89 remove FixKustomizationPreUnmarshalling 2022-12-13 18:50:25 +00:00
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
Anna Song
292d18983d Localize patchesJson6902, patchesStrategicMerge, replacements (#4904)
* Localize patchesJson6902, patchesStrategicMerge, replacements

* Address code review feedback

* Improve readability
* Remove deprecation warning check
2022-12-12 10:41:33 -08:00
Anna Song
71eb865cea Localize configMapGenerator, secretGenerator fields (#4894)
* Localize configMapGenerator, secretGenerator fields

* Improve readability

* Expose kv parseFileSource

* Add localizeGenerator to Localizer

* Improve and test ParseFileSource error messages
2022-12-02 15:31:53 -08:00
Anna Song
e34d5b5608 Localize components (#4867) 2022-12-02 09:33:53 -08:00
Anna Song
b8611cf0a9 Refactor localizer code
* encapsulate kusttarget params
* change dst to string
* ConfirmDir
2022-12-01 09:53:46 -08:00
Anna Song
832b552076 Load built-in plugins for kustomize localize (#4869)
* Load and filter built-in plugins

* Improve readability

* Process plugins as resources instead of bytes

* Throw error for validators

* Differentiate generators, transformers processing

* Enable validators

* add wrapper error
* improve documentation
2022-11-28 13:23:42 -08:00
Anna Song
314b8fbefa Implement localizeFile() skeleton for patches (#4865)
* Implement localizeFile()

* Fix lint

* Address code review feedback

* Remove unnecessary String(), Error() with string formatters
* Remove processing of un-implemented methods
* Improve readability

* Remove unimplemented addLocalizeDir, hitsLocalizeDir

* Improve documentation

* Remove deprecated patchesJson6902 logic
2022-11-16 10:24:48 -08:00
Anna Song
f79e16b352 Improve localizer readability (#4860)
* Replace '%s' with %q

* Change ambiguous cli-"Arg" suffix in func arg names

* Remove repetitive "loc" in names

* Apply readability changes to localizer

* Fix comment
2022-11-16 08:42:49 -08:00
Anna Song
50e731a1d9 Implement localizer skeleton for kustomize localize (#4859)
* Add localizer outline

* Add localizer unit tests

* include previous change

* Add proper NewLocalizer, Localize unit tests

mock processKust

* Address code review feedback

* Make processKustFn public

* Remove mock testing
2022-11-10 09:24:54 -08:00