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>
* fix a patch files accept multiple patches
* fix comments and variable name
* add error handling when using not allowed multiple strategic-merge patches
* fix error message of Multiple Strategic-Merge Patch file
* refactor transformStrategicMerge()
* add TODO comment and test for Multiple JSON patch Yaml documents are not allowed
* refactoring PatchTransformer
* add multiple patch test for PatchTransformer package
* improve error message to PatchTransformer
* refactor const and error message check
* fix some error messages
This PR is an effort towards internalizing public APIs.
It moves some of the builtinconstants to internal/
Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
This PR is an effort towards reducing the public surface
of APIs. It move image/ to internal/image
Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
(cherry picked from commit 1f5890709fdc17de6f44f42b5138dd0f7e64bc74)
* Add accumulateResources error tests for local files.
Add tests demonstrating accumulateResources errors when the resource is
a local file. Works to address #4807.
* Improve readability
When a patch appends a new node, it should honor the key style from the
patch. Prior to this commit, no style was applied, leading to problems
when the key value could be interpreted as a different type based on its
content. For example, "9110" needs quoting to ensure it is seen as a
string in yaml.
* change: components apply after all generator and transformer applied
* fix name for a test case
* add comment about when the components will be executed
* components are applied before transformer
* Fix using same helm chart with different versions
* Fix p.ValuesFile when version is set
* Updated: Fix using same helm chart with different versions
* Add test for issue #4813
* Use if/else for readability, add version check to absChartHome
Otherwise, a value consisting of a single quote character triggers a
panic:
go test krusty/configmaps_test.go
--- FAIL: TestDataIsSingleQuote (0.00s)
panic: runtime error: slice bounds out of range [1:0] [recovered]
panic: runtime error: slice bounds out of range [1:0]