Add test to validate that empty files don't produce an error when using
the `path` option of the `patches` convenience.
Add test to validate that using the deprecated patchesStrategicMerge
still produces an error and no changes have been introduced in old
features.
* update go 1.24.6
* fix non-constant format string error
* update golang.org/x/tools@v0.36.0 and github.com/golangci/golangci-lint@v1.64.8 to pass execute golangci-lint
* add a verpose diff output to prow test
* remove pluginator binary version from generated files
* feat: Add regex support for Replacement selectors
* Add new tests for regex support
* Earlier exit with rejectAny, and fix linting
* Add example Use cases using regex
Ensure consistent error message matching by setting LC_ALL=C in
TestRemoteLoad_LocalProtocol, preventing locale-based variations
in Git output.
Signed-off-by: Arthur Diniz <arthurbdiniz@gmail.com>
Include configuration for the new `ValidatingAdmissionPolicy` and
`ValidationAdmissionPolicyBinding` APIs so that Kustomize can natively configure
the `policyName` field in `ValidatingAdmissionPolicyBinding` with the transformed
name of `ValidatingAdmissionPolicy`.
* feat: support labels key in transformer configuration
Allow the usage of a separate transformer configuration for the labels key,
similar to what is currently available for commonLabels and commonAnnotations.
This aims to provide the same functionality that commonLabels currently provide
for labels, since commonLabels is deprecated and slated for removal in a future
release.
* chore(transformerconfig): add nolint hint
Add a nolint hint to the new method so the returns can stay consistent with
one another.
* fix: changes from code review
* Rename methods `AddCommonLabelFieldSpec` and `AddLabelFieldSpec` to
`AddCommonLabelsFieldSpec` and `AddLabelsFieldSpec`.
* Add extra test to verify scenarios applying labels to Custom Resource Definitions.
Assert keeps going after failure, but require immediately fails
the tests, making it easier to find the output related to the test
failure, rather than having to comb through a bunch of subsequent
assertion failures. For equality tests, we may or may not want to
continue, but for error checks we almost always want to immediately
fail the test. Exceptions can be changed as-needed.
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
* 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
* 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
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]