Commit Graph

6948 Commits

Author SHA1 Message Date
Kurnianto Trilaksono
931f924189 add helper script for releasing 2024-03-24 15:22:04 +08:00
Nick
50dc813731 Add buildMetadata task and ref (#5511)
* Add buildMetadata task and ref

Move build metadata tasks, draft buildMetadata reference

Clean up buildMetadata ref

Add managed by label task

Add local non-generated task

Add local generated resource

Add remote generator task

Clean up tasks and ref

Add local transformer annotation example

Add local and remote transformer example

* Address PR feedback and general cleanup

cherrypick updates from feature branch

fix script

fix release script
2024-03-24 14:50:19 +08:00
Karl Isenberg
9db92fd28d Use a local test server instead of example.com 2024-03-21 13:14:12 -07:00
Kubernetes Prow Robot
d514df3db0 Merge pull request #5621 from karlkfi/karl-require-assert
Use require for Error and NoError
2024-03-21 02:42:00 -07:00
Kubernetes Prow Robot
22ce9c02bf Merge pull request #5620 from karlkfi/karl-fix-lint
Disable abandoned/archived linters
2024-03-21 01:39:22 -07:00
Karl Isenberg
43868688d5 Use require for Error and NoError
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.
2024-03-20 13:19:18 -07:00
Karl Isenberg
434a55a244 Disable abandoned/archived linters
This reduces the warnings printed when running `make lint`
2024-03-20 13:04:35 -07:00
Kubernetes Prow Robot
a6ea3e2bb6 Merge pull request #5567 from koba1t/remove_exp_slices_dependencies
fix 'golang.org/x/exp/slices' dependencies
2024-03-20 10:35:33 -07:00
koba1t
72f0a3cfb1 remove deprecated 'golang.org/x/exp/slices' dependencies 2024-03-21 02:12:15 +09:00
Kubernetes Prow Robot
1eccd8f4b7 Merge pull request #5555 from karlkfi/karl-go-121
chore: Update to Go v1.21
2024-03-20 10:05:07 -07:00
Karl Isenberg
4dbc0d22e1 chore: Update to Go v1.21
- 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
2024-03-15 11:47:44 -07:00
Kubernetes Prow Robot
e9fc57abd6 Merge pull request #5615 from koba1t/update_dependencies_google.golang.org/protobuf_to_v1.33.0
update dependencies google.golang.org/protobuf@v1.33.0
2024-03-14 06:23:08 -07:00
koba1t
d35edbf80d update dependencies google.golang.org/protobuf@v1.33.0 2024-03-14 17:27:48 +09:00
Kubernetes Prow Robot
da3985c284 Merge pull request #5519 from matthewhughes934/fix-null-strings-after-multiple-patches
Fix null YAML values being replaced by `"null"`
2024-03-12 08:40:24 -07:00
Ed Overton
14a9a9849f test: correct lint issues 2024-03-11 15:16:11 -04:00
Matthew Hughes
8aafbacd17 Fix null YAML values being replaced by "null"
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
2024-03-09 17:31:35 +00:00
Ed Overton
4da880d6cb Merge remote-tracking branch 'origin/master' into issue5540 2024-03-08 14:48:51 -05:00
Ed Overton
62eca858f3 test: add test for issue 5440 2024-03-08 14:33:09 -05:00
Kubernetes Prow Robot
11704312be Merge pull request #5551 from colinodell/patch-1
Improve framework documentation
2024-03-06 14:14:54 -08:00
Kubernetes Prow Robot
74ba2fb141 Merge pull request #5387 from Crystalix007/master
fix: show CronJob properties
2024-03-06 13:51:17 -08:00
Colin O'Dell
cc410bc23a Update the example to match what kustomize fn expects 2024-03-05 17:31:38 -05:00
Colin O'Dell
2252fd951a Fix lint violations 2024-03-05 17:26:35 -05:00
Tiago Silva
33caee50cb Allow importing kustomize API's without relying on plugins (#5525)
* 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>
2024-02-27 08:22:51 -08:00
Kubernetes Prow Robot
28ef9da0d9 Merge pull request #5545 from kubernetes-sigs/dependabot/github_actions/dorny/paths-filter-3
build(deps): bump dorny/paths-filter from 2 to 3
2024-02-27 08:10:19 -08:00
Kubernetes Prow Robot
db2240c9c1 Merge pull request #5541 from skitt/canonical-json-patch
Use canonical json-patch v4 import
2024-02-27 08:10:10 -08:00
Nick
d3329453a2 Add kustomization and transformer references (#5523)
* Add fields to kustomization file ref

* Address grammar feedback.

* labels.fields
2024-02-26 10:25:24 -08:00
Kubernetes Prow Robot
6ffcc08591 Merge pull request #5201 from danistrebel/fix/examples-patches
fix(examples): move examples from patchesStrategicMerge to patches
2024-02-25 12:36:03 -08:00
Colin O'Dell
facabded61 Fix other command reference 2024-02-23 11:16:15 -05:00
Colin O'Dell
9d66eb16c8 Add import statements to help users get up-and-running faster 2024-02-23 11:14:16 -05:00
Colin O'Dell
6088692165 Fix incorrect command name 2024-02-23 11:12:00 -05:00
Kubernetes Prow Robot
9e68399e04 Merge pull request #5550 from koba1t/use_StrictUnmarshal_for_read_TransformerConfig
use Strict unmarshal when read TransformerConfig
2024-02-21 17:21:49 -08:00
Colin O'Dell
e25f99ee02 Fix broken example 2024-02-21 16:56:03 -05:00
koba1t
37715863f0 use Strict unmarshal when read TransformerConfig 2024-02-22 05:39:55 +09:00
Kubernetes Prow Robot
3e69c2e36a Merge pull request #5510 from andreaskaris/kustomize-env-var-max-length
Skip KUSTOMIZE_PLUGIN_CONFIG_* env variables when too large
2024-02-21 09:35:01 -08:00
Andreas Karis
17eab513e9 Skip KUSTOMIZE_PLUGIN_CONFIG_* env variables when too large
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>
2024-02-21 17:36:09 +01:00
Kubernetes Prow Robot
800e12b5ae Merge pull request #5539 from dhaiducek/plugin-errmsg
Include exec plugin `stderr` with wrapped error
2024-02-19 17:45:08 -08:00
dependabot[bot]
96c6bbad2c build(deps): bump dorny/paths-filter from 2 to 3
Bumps [dorny/paths-filter](https://github.com/dorny/paths-filter) from 2 to 3.
- [Release notes](https://github.com/dorny/paths-filter/releases)
- [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dorny/paths-filter/compare/v2...v3)

---
updated-dependencies:
- dependency-name: dorny/paths-filter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-19 19:59:25 +00:00
Kubernetes Prow Robot
1fa02e729d Merge pull request #5546 from kubernetes-sigs/dependabot/github_actions/actions/checkout-4
build(deps): bump actions/checkout from 3 to 4
2024-02-19 11:58:51 -08:00
dependabot[bot]
f93b0ead3c build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-19 01:09:56 +00:00
Ed Overton
f80650e8ce fix: improve accumulation failure message
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.
2024-02-16 12:47:02 -05:00
Stephen Kitt
bcf100f592 Use canonical json-patch v4 import
The canonical import for json-patch v4 is
gopkg.in/evanphx/json-patch.v4 (see
https://github.com/evanphx/json-patch/blob/master/README.md#get-it for
reference).

Using the v4-specific path should also reduce the risk of unwanted v5
upgrade attempts (see
https://github.com/kubernetes/kubernetes/pull/120327 for context).

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-02-16 12:23:04 +01:00
Dale Haiducek
9546529f1d Include plugin stderr with wrapped error
This allows plugins to provide more details aside
from just `exit status 1` inside the error

Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>
2024-02-15 09:48:21 -05:00
Kubernetes Prow Robot
91ccf00ac8 Merge pull request #5533 from karlkfi/karl-version
chore: add hack/latest_version.sh
2024-02-14 12:08:33 -08:00
Kubernetes Prow Robot
f8f4203fb7 Merge pull request #5528 from Phillipdk/patch-1
Remove typo in documentation
2024-02-14 08:18:23 -08:00
Kubernetes Prow Robot
537c4fa5c2 Merge pull request #5438 from sarab97/act-skip-cond
Add condtional checks on jobs to skip on document changes.
2024-02-13 09:52:02 -08:00
Karl Isenberg
dc7ebef925 chore: add hack/latest_version.sh
Add script to lookup component version from github releases.

To sort, we're using sort -V or --version-sort, depending which
option is available. This which has some limitations:
- pre-releases (-) are sorted as post-releases
- post-releases and build metadata (+) are ignored

This is the best option available for SemVer sorting without
requiring the user to install additional depedencies, like nodejs.
2024-02-12 12:32:48 -08:00
Kubernetes Prow Robot
b154361c00 Merge pull request #5467 from stormqueen1990/feat/edit-set-secret
feat: edit set secret
2024-02-07 23:36:25 -08:00
Mauren Berti
3bb9a6d414 fix: update long description as per code review request 2024-02-06 21:12:39 -05:00
Mauren Berti
14c091aec7 fix: remove excessive quoting from error messages 2024-02-06 21:12:38 -05:00
Mauren Berti
6c1fea79ed chore: add failure test case for empty generator 2024-02-06 21:12:37 -05:00