Commit Graph

835 Commits

Author SHA1 Message Date
koba1t
68e507eb6f update otel lib to v1.40.0 2026-03-04 23:30:01 +09:00
koba1t
793f58251c remove old go build tag 2026-02-13 20:55:17 +09:00
koba1t
5231e099e5 bump go-git and x/crypt 2026-02-13 20:46:17 +09:00
koba1t
8eb136f67e update go 1.25.7 2026-02-12 01:26:18 +09:00
Joseph Cumines
87617912bf fix(kyaml/yaml): minor nil safety fix for RNode.Content etc (#5985)
* Fix kyaml/yaml field access deref nil value for methods that look "nil-safe"

This change is addressing observed panics within kustomize that obscure the
actual failure. The primary observed problem case involves RNode.Content.

* Fix test case

* Fixes from review
2025-11-02 18:34:07 -08:00
koba1t
2a1862d8b7 fix nit 2025-09-30 06:48:35 +09:00
koba1t
bbe53c2c45 implements nested structure replacements 2025-09-05 19:37:24 +09:00
koba1t
2dc0d0da8b implements to replacements value in the structured data 2025-08-28 04:44:52 +09:00
Kubernetes Prow Robot
11f9435b50 Merge pull request #5962 from koba1t/chore/update_dependencies_from_security_alert
chore: update dependencies from security alert
2025-08-18 09:45:08 -07:00
koba1t
c8d3d5709e bump github.com/go-git/go-git/v5 from 5.11.0 to 5.13.0 2025-08-18 06:30:17 +09:00
koba1t
785fce97df refactor: nested format string 2025-08-18 06:16:24 +09:00
yugo kobayashi
87d0629bd1 update go 1.24.6 (#5959)
* 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
2025-08-17 13:05:12 -07:00
Davanum Srinivas
a7703f685c Drop usage of forked copies of goyaml.v2 and goyaml.v3
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-06-25 13:13:52 -04:00
Stephen Kitt
6b830658d1 Bump to github.com/spf13/viper v1.20.0
This includes the go-difflib and go-spew reverts, which means the
corresponding exclusions can be removed. cmd/gorepomod/go.mod loses a
number of indirect dependencies thanks to the spf13/viper cleanup, but
hack/go.mod gains a few.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2025-03-15 17:13:59 +01:00
Matthias Riegler
cc7a71c288 feat: add exec-plugin argument and environment support (#5316)
* feat: add exec-plugin argument and environment support

Previously, the documentation lead to think that this is working, but
it's not been implemented.

This PR is fixing this

Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com>

* chore: disable linting for env var split

Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com>

---------

Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com>
2025-02-16 13:28:21 -08:00
Sebastiaan van Stijn
2867f353c2 downgrade go-difflib and go-spew to tagged releases (#5830)
* workspace sync

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

* downgrade go-difflib and go-spew to tagged releases

commit d35edbf80d updated these dependencies
to untagged versions. The diff in both dependencies show that there's no
code changes, and it's unlikely for those modules to do new releases.

Unfortunate, because of that change all projects depending on kubernetes
or any of it's modules now had to upgrade to unreleased versions of
these.

This patch reverts those updates (but it may take some time before
all other projects can be reverted).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

---------

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-07 03:48:28 +01:00
Davanum Srinivas
84e6594e9b Update golangci/golangci-lint to v1.56.2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-12-14 19:28:39 -05:00
Davanum Srinivas
b79c5f652d Update to latest kube-opeapi to drop govalidator dependency
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-12-12 18:48:06 -05:00
Davanum Srinivas
d32eacf034 Remove starlark support
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-09-23 16:52:05 -04:00
koba1t
b67ce5bb73 go work sync && ./hack/doGoMod.sh tidy 2024-09-15 01:43:03 +09:00
koba1t
5ba8523df7 update go 1.22.7 2024-09-15 01:40:50 +09:00
Kubernetes Prow Robot
c1de0301f5 Merge pull request #5413 from crenshaw-dev/patch-1
chore(docs): fix grammar error in comment
2024-06-30 11:45:02 -07:00
Kubernetes Prow Robot
e3a7615ccb Merge pull request #5506 from cloud-native-team/master
fix some comments
2024-06-18 12:37:52 -07:00
koba1t
72d95b5f41 chore: restore version for github.com/asaskevich/govalidator 2024-04-25 17:21:05 +09:00
Mauren Berti
5d127e4138 chore(deps): bump dependencies of kustomize + sync go workspace
* Bump the golang.org/x dependencies.
* Run `go work sync` to synchronize dependencies across Go workspaces.
2024-04-21 20:03:38 -04:00
Karl Isenberg
ed2ca23400 Pin tool versions with hack/go.mod (#5622)
* 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
2024-04-02 12:34:13 -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
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
koba1t
d35edbf80d update dependencies google.golang.org/protobuf@v1.33.0 2024-03-14 17:27:48 +09: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
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
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
Colin O'Dell
e25f99ee02 Fix broken example 2024-02-21 16:56:03 -05:00
cui fliter
d56e1d0f46 fix some comments
Signed-off-by: cui fliter <imcusg@gmail.com>
2024-01-05 16:25:48 +08:00
Arnaud Tournier
665bfbc32d fix typo 2023-12-13 17:50:41 +01:00
Kubernetes Prow Robot
e219b8864e Merge pull request #5421 from prashantrewar/swap-yaml-library
Replace gopkg.in/yaml.v2 with sigs.k8s.io/yaml/goyaml.v2
2023-11-10 17:14:41 +01:00
koba1t
67a0b43c81 fix failed tests for testing fn framework about get value from env 2023-11-02 02:37:00 +09:00
Prashant Rewar
2ab117166f replace gopkg.in/yaml.v2 with sigs.k8s.io/yaml/goyaml.v2
Signed-off-by: Prashant Rewar <108176843+prashantrewar@users.noreply.github.com>
2023-11-01 14:40:41 +05:30
Sylvain Rabot
b1f100e3da Run go work sync and go mod tidy
```shell
go work sync
for i in $(find . -name go.mod); do (cd $(dirname $i); go mod tidy); done
```

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2023-10-28 13:05:11 +02:00
Natasha Sarkar
96ad106ee1 Use upstream go-yaml fork and remove our internal one (#5412)
* test new yaml fork

* delete old kyaml fork

* update to sigs yaml 1.4.0

* remove comments
2023-10-25 19:48:22 +02:00
Michael Crenshaw
71546359b8 Add a comment 2023-10-24 09:22:30 -04:00
Michael Crenshaw
234ab80086 chore(docs): fix grammar error in comment 2023-10-23 14:00:29 -04:00
Kubernetes Prow Robot
bde28b1320 Merge pull request #5324 from charles-chenzz/fix_doc_refs
update deprecated doc refs
2023-10-18 17:41:01 +02:00
Jan-Otto Kröpke
d64ac13447 kustomize: Add support for OCI based helm repos (#5167)
* kustomize: Add support for OCI based helm repos

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>

* Update api/internal/builtins/HelmChartInflationGenerator.go

* Update plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go

* go fmt

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>

* s/expectedHelmExternalDns/expectedHelmExternalDNS

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>

* commit

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>

* commit with content

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>

* Apply suggestions from maintainer

* go work sync

* added test

---------

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
2023-10-17 21:24:00 +02:00
charles-chenzz
944c72a275 update deprecated doc refs 2023-10-11 22:30:43 +08:00
Paul
46e2d72213 merge2: fix duplicate test case 2023-10-10 14:12:07 +02:00
Ed Overton
985835f96f perf: limit initSchema calls from openapi.IsNamespaceScoped (#5076)
* test: add openapi.IsNamespaceScoped benchmark

Add a benchmark test for IsNamespaceScoped performance when the default
schema is in use.

* perf: limit initSchema calls from openapi.IsNamespaceScoped

Avoid calling initSchema from openapi.IsNamespaceScoped when possible.
Work done in #4152 introduced a precomputed namespace scope map based on
the default built-in schema. This commit extends that work by avoiding
calls to initSchema when a resource is not found in the precomputed map
and the default built-in schema is in use. In those cases, there is no
benefit to calling initSchema since the precomputed map is exactly what
will be calculated by parsing the default built-in schema.

* fix: delay parsing of default built-in schema

When namespace scope can be determined by the precomputed map but the
type is not present in the precomputed map, delay the parsing of the
default built-in schema.

If the schema to be initialized is the default built-in schema and the
type is not in the precomputed map, then the type will not be found in
the default built-in schema. There is no need to parse the default
built-in schema for that answer; its parsing may be delayed until it
is needed for some other purpose.

In cases where the schema is used solely for namespace scope checks, the
schema might not ever be parsed. Skipping the parsing reduces both
execution time and memory use.

* fix: correct openapi.go's schemaNotParsed value

openapiData initializes with defaultBuiltInSchemaParseStatus set to 0,
so schemaNotParsed should have 0 as its value.
2023-09-08 12:34:30 -07:00