* Pin tool versions with hack/go.mod
This change centralizes the tracking of versions for tools used for
development and testing. This way, the tools and all their
dependencies have their checksums stored in hack/go.sum, which
improves supply chain security.
* Workspace Sync & Tidy
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.
- go mod tidy (all modules)
- go work sync
- Fixed plugin generation for Go 1.21
- Updated linting for Go 1.21
- Fixed minecraft example for Helm v3 pull download path
- Update dev docs to mention Go 1.21
- Regenerate plugins with Go 1.21
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
* Allow importing kustomize API's without relying on `plugins`
Introduce `kustomize_disable_go_plugin_support` go build tag to decouple the kustomize
API from the `plugins` package dependency. This is advantageous for applications
embedding the kusstomize API without the need for dynamic Go plugins, mitigating an
increase in binary size associated with the inclusion of the plugins dependency
and the population of ELF sections like `.dynsym` and `.dynstr`.
The flag provides applications with the flexibility to exclude the import, catering to
scenarios where dynamic Go plugin support is unnecessary.
Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
* fix golint by disabling some lint checks
* handle code review suggestions
---------
Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Kustomize sets the legacy KUSTOMIZE_PLUGIN_CONFIG_STRING and
KUSTOMIZE_PLUGIN_CONFIG_ROOT environment variables. When these
environment variables exceed a hardcoded length (PAGE_SIZE * 32 on most
Linux systems), the kernel will return `argument list too long`. Given
that the environment variables are legacy, log a warning and do not set
them if they exceed 131071 bytes.
Reported-at: https://github.com/kubernetes-sigs/kustomize/issues/5480
Signed-off-by: Andreas Karis <ak.karis@gmail.com>
For accumulation errors when the file load fails due to malformed
YAML and the base load fails due to a timeout, report both errors.
Previously only the malformed YAML error was returned, masking the
git repo timeout.
This reverts commit b692e49b1e.
The json-patch bump in k/k was reverted, so the corresponding bump in
kustomize should be reverted too.
Signed-off-by: Stephen Kitt <skitt@redhat.com>
It makes sense to add that as a CLI args since you could use one single
kustomization file/helm chart for multiple clusters. Also it's easier to
have those on the CLI if the user has some kind of tooling that will end
up calling kustomize and that could pass those (i.e.: ArgoCD is doing
that for Helm so it could do that for Kustomize as well that will end up
calling Helm as well).
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@ledger.fr>
* 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