* fix: performance recession when propagating namespace to helm
* fix: handle passing namespace downstream more elegant
* Revert "fix: handle passing namespace downstream more elegant"
This reverts commit 976a7cf2aa.
* Revert "fix: performance recession when propagating namespace to helm"
This reverts commit c7612d1dba.
* fix: use annotation to identify helm chart generated resources
* fix: deduplicate code
* fix: missing import in NamespaceTransformer.go
* ci: allow manual trigger of pipeline in fork
* Revert "ci: allow manual trigger of pipeline in fork"
This reverts commit 8948788fe2.
* fix: test cases
* chore: fix code comment was on wrong line
* chore: fix code comment was on wrong line pt2
* 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
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.
Related issues:
* https://github.com/kubernetes-sigs/kustomize/issues/5031
* https://github.com/kubernetes-sigs/kustomize/issues/5171
After noting this behaviour was not present in
d89b448c74 a `git bisect` pointed to the
change 1b7db20504. The issue with that
change is that upon seeing a `null` node it would replace it with a node
whose value was equivalent but without a `!!null` tag. This meant that
one application of a patch would have the desired approach: the result
would be `null` in the output, but on a second application of a similar
patch the field would be rendered as `"null"`.
To avoid this, define a new attribute on `RNode`s that is checked before
clearing any node we should keep. The added
`TestApplySmPatch_Idempotency` test verifies this behaviour.
See also https://github.com/kubernetes-sigs/kustomize/pull/5365 for an
alternative approach
* hotfix: return error instead of log at `FromMapAndOption`
* chore: show error message
* hotfix: use correct function
* hotix: use `t.Helper()` and fix `t *testing.T order
* hotfix: wrapt the error of `FromMapAndOption`
* hotfix: meaningful message for an error
* hotfix: summarize in one line
* hotfix: fix the abandoned error and show meaningful message
* hotfix: start with helper function
* Keep TODO comment
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>
* Better error message when git clone fails
* support file:// URLs
* rewrite remoteload_test
* lint and test fix
* fixes for kverey's comments
* document file:// remote load
* replace assert with require where appropriate
* add tests for file:// without git suffix
* fixes plus pr review from natasha
* fixes for review, lint
* revert changes to error handling
* fix skipped test
Otherwise, it is incompatible with filters like fieldSpec.Filter that recurse through a tree of RNodes. In the case of the bug this commit fixes, the leaf RNode is a metadata.annotation value field, and appendCsvAnnotation is called immediately before updating that leaf's value. If appendCsvAnnotation replaces the entire metadata.annotation RNode on the resource, the leaf RNode that gets updated is no longer attached to the resource.
Alternatively, `func (f Filter) setScalar` could be updated to change
the value of the leaf RNode BEFORE calling appendCsvAnnotation. However,
the modification of the entire metadata segment of the RNode in a
function that nominally just edits an annotation feels like a
side-effect prone to creating other difficult-to-debug situations,
beyond this ordering dependency.
* WIP
* Fix merge corner cases
* Add test for explicit !!merge tag
* Fix tests
* Cleanup
* Cleanup
* Fix deanchoring lists
* Add test case for keeping comments
* Add MapEntrySetter and fix json marshalling after deanchoring
* Keep duplicated keys
* Move MergeTag definition to yaml alias
* Remove go-spew from api
* Add support for sequence nodes on merge tags
* Add docstring to MapEntrySetter.Key
* Add docstring to MapEntrySetter struct
* Add tests to MapEntrySetter
* Fix duplicate merge key
* Revert whitespace changes on forked go-yaml
* Remove AssocMapEntry function
* Refactoring merge order
* Return errors on VisitFields and PipeE
* Add tests for each non-conforming map merges
* add origin annotation for resources generated by builtin and custom generators
* decouple origin data from generator data and account for inline generators
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.
* Move api/filesys to kyaml/filesys
* Add deprecated version of api/filesys with aliases to new code
* Use new kyaml/filesys package and update dependencies
* Migrate to kyaml/filesys and update dependencies
* Skip tests that break on Windows