Commit Graph

7173 Commits

Author SHA1 Message Date
dependabot[bot]
7ace76239e build(deps): bump go.opentelemetry.io/otel/sdk in /hack
Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.44.0 to 1.45.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.44.0...v1.45.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-version: 1.45.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-18 00:22:54 +00:00
kubernetes-prow[bot]
078ab6cf8e Merge pull request #6264 from PragalvaXFREZ/fix-inpututil-wrap-error-with-file
fix: report the real file and index in kyaml input errors
2026-09-17 18:33:25 +00:00
kubernetes-prow[bot]
18dc3298be Merge pull request #6263 from PragalvaXFREZ/fix-openapi-fetch-invalid-json
fix: report an error when the fetched openapi schema is not JSON
2026-09-17 18:25:31 +00:00
Pragalva Sapkota
1767aab3cf fix: report an error when the fetched openapi schema is not JSON
printSchema runs kubectl get --raw /openapi/v2 and unmarshals stdout.
The json.Unmarshal error is discarded, not even assigned to _:

	var jsonSchema map[string]interface{}
	output := stdout.Bytes()
	json.Unmarshal(output, &jsonSchema)
	output, _ = json.MarshalIndent(jsonSchema, "", "  ")

When kubectl succeeds but the response is not JSON, for example an auth
portal or corporate proxy returning HTML, jsonSchema is left nil,
MarshalIndent renders it as null, and the command prints that and exits
0:

	$ kustomize openapi fetch
	null
	$ echo $?
	0

The function already guards the two neighbouring failures, kubectl
exiting non-zero and empty stdout, and both reuse the errMsg advice.
Only "kubectl succeeded but returned something that is not a schema"
was unguarded, so a scripted fetch writes null to a file and nothing
notices.

After the fix the same input reports the parse error alongside the
existing advice and exits 1. A valid schema still round-trips unchanged
in both --format=json and --format=yaml.

Signed-off-by: Pragalva Sapkota <sapkotapragalva@gmail.com>
2026-09-16 09:13:51 +05:45
Pragalva Sapkota
57b2fec2b6 test: cover openapi fetch with a stub kubectl
Add tests that place a stub kubectl on PATH and verify that invalid
JSON from a successful kubectl fails without writing null, that valid
JSON is printed indented, and that --format=yaml still succeeds.

The invalid JSON case fails until the parse error is reported.

Signed-off-by: Pragalva Sapkota <sapkotapragalva@gmail.com>
2026-09-16 09:13:18 +05:45
kubernetes-prow[bot]
d31d6a2780 Merge pull request #6274 from koba1t/chore/download-golangci-lint
build: use the golangci-lint v2 with release binary
2026-09-15 22:41:28 +00:00
kubernetes-prow[bot]
ee88c612d7 Merge pull request #6152 from koba1t/chore/auto-bump_go_runtime_version
chore: add a script to auto-bump go runtime version
2026-09-15 22:41:19 +00:00
kubernetes-prow[bot]
697a49e77d Merge pull request #6242 from pujitha24/auto/issue-6241
fix: reject flag-like helmCharts releaseName and name values
2026-09-15 19:29:20 +00:00
Yugo Kobayashi
79fa36c78d build: use golangci-lint release binary 2026-09-16 03:53:10 +09:00
Yugo Kobayashi
f046d36815 bump go-git, kin-openapi and k8s.io (#6273)
* update dependencies: go-git, kin-openapi

* update k8s.io dependencies to v0.37.0
2026-09-14 20:21:21 +00:00
kubernetes-prow[bot]
e6f99f842d Merge pull request #6267 from kubernetes-sigs/dependabot/go_modules/golang.org/x/sys-0.48.0
build(deps): bump golang.org/x/sys from 0.47.0 to 0.48.0
2026-09-14 20:05:19 +00:00
dependabot[bot]
4b777f98bc build(deps): bump golang.org/x/sys from 0.47.0 to 0.48.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.47.0 to 0.48.0.
- [Commits](https://github.com/golang/sys/compare/v0.47.0...v0.48.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.48.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-14 19:22:18 +00:00
kubernetes-prow[bot]
2f31bf90bd Merge pull request #6266 from kubernetes-sigs/dependabot/go_modules/golang.org/x/text-0.42.0
build(deps): bump golang.org/x/text from 0.41.0 to 0.42.0
2026-09-14 19:19:19 +00:00
dependabot[bot]
798273ebe5 build(deps): bump golang.org/x/text from 0.41.0 to 0.42.0
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.41.0 to 0.42.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.41.0...v0.42.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-version: 0.42.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-13 00:44:00 +00:00
kubernetes-prow[bot]
19002092f6 Merge pull request #6261 from kubernetes-sigs/dependabot/go_modules/hack/google.golang.org/grpc-1.83.2
build(deps): bump google.golang.org/grpc from 1.83.1 to 1.83.2 in /hack
2026-09-09 21:16:34 +00:00
kubernetes-prow[bot]
727e1cf358 Merge pull request #6258 from kubernetes-sigs/dependabot/go_modules/github.com/spf13/viper-1.21.0
build(deps): bump github.com/spf13/viper from 1.20.0 to 1.21.0
2026-09-09 21:08:42 +00:00
Pragalva Sapkota
0906013bff fix: report the real file and index in kyaml input errors
WrapErrorWithFile reads the path and index annotations into local
variables, then passes those values back through meta.Annotations as if
they were keys. The second lookup almost always misses, so every error
returned by inpututil.MapInputs and MapInputsE is prefixed with " []: "
instead of naming the file and document that failed.

The legacy fallback for the index also read LegacyPathAnnotation rather
than LegacyIndexAnnotation, so resources carrying only the legacy
annotations resolved the index to the file path.

Use the values that were already resolved, and read the index from
LegacyIndexAnnotation. This matches kioutil.GetFileAnnotations, which
resolves the same pair of annotations correctly.

Adds a test for the internal and legacy annotation forms; the package
previously had none.

Signed-off-by: Pragalva Sapkota <sapkotapragalva@gmail.com>
2026-09-09 10:26:14 +05:45
dependabot[bot]
e8c627fa8c build(deps): bump google.golang.org/grpc from 1.83.1 to 1.83.2 in /hack
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.83.1 to 1.83.2.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.83.1...v1.83.2)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.83.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-09 01:18:37 +00:00
dependabot[bot]
b44e6d0972 build(deps): bump github.com/spf13/viper from 1.20.0 to 1.21.0
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.20.0 to 1.21.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.20.0...v1.21.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-version: 1.21.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-06 00:44:21 +00:00
Yugo Kobayashi
7a3bab80fb fix: preserve Secret stringData during generator merge (#6237)
* test: reproduce secretGenerator stringData merge failure

* fix: preserve Secret stringData during generator merge
2026-09-04 19:12:20 +00:00
kubernetes-prow[bot]
3f00f0aa94 Merge pull request #6249 from kubernetes-sigs/dependabot/go_modules/go.yaml.in/yaml/v2-2.4.4
build(deps): bump go.yaml.in/yaml/v2 from 2.4.2 to 2.4.4
2026-09-04 04:18:19 +00:00
dependabot[bot]
3706332901 build(deps): bump go.yaml.in/yaml/v2 from 2.4.2 to 2.4.4
Bumps [go.yaml.in/yaml/v2](https://github.com/yaml/go-yaml) from 2.4.2 to 2.4.4.
- [Commits](https://github.com/yaml/go-yaml/compare/v2.4.2...v2.4.4)

---
updated-dependencies:
- dependency-name: go.yaml.in/yaml/v2
  dependency-version: 2.4.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-04 03:51:11 +00:00
kubernetes-prow[bot]
9a8deba118 Merge pull request #6255 from kubernetes-sigs/dependabot/go_modules/google.golang.org/protobuf-1.36.12
build(deps): bump google.golang.org/protobuf from 1.36.11 to 1.36.12
2026-09-04 03:48:19 +00:00
dependabot[bot]
7b13237178 build(deps): bump google.golang.org/protobuf from 1.36.11 to 1.36.12
Bumps google.golang.org/protobuf from 1.36.11 to 1.36.12.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-version: 1.36.12
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-04 03:39:08 +00:00
kubernetes-prow[bot]
b747ba9572 Merge pull request #6252 from kubernetes-sigs/dependabot/go_modules/golang.org/x/mod-0.40.0
build(deps): bump golang.org/x/mod from 0.38.0 to 0.40.0
2026-09-04 03:36:20 +00:00
kubernetes-prow[bot]
64e65c2f6d Merge pull request #6254 from kubernetes-sigs/dependabot/go_modules/github.com/google/gnostic-models-0.7.1
build(deps): bump github.com/google/gnostic-models from 0.7.0 to 0.7.1
2026-09-04 03:26:21 +00:00
dependabot[bot]
25d21bbb92 build(deps): bump golang.org/x/mod from 0.38.0 to 0.40.0
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.38.0 to 0.40.0.
- [Commits](https://github.com/golang/mod/compare/v0.38.0...v0.40.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-version: 0.40.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-04 03:21:20 +00:00
kubernetes-prow[bot]
21322bdea3 Merge pull request #6248 from kubernetes-sigs/dependabot/go_modules/golang.org/x/text-0.41.0
build(deps): bump golang.org/x/text from 0.38.0 to 0.41.0
2026-09-04 03:18:20 +00:00
dependabot[bot]
2645f78639 build(deps): bump github.com/google/gnostic-models from 0.7.0 to 0.7.1
Bumps [github.com/google/gnostic-models](https://github.com/google/gnostic-models) from 0.7.0 to 0.7.1.
- [Commits](https://github.com/google/gnostic-models/compare/v0.7.0...v0.7.1)

---
updated-dependencies:
- dependency-name: github.com/google/gnostic-models
  dependency-version: 0.7.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-04 03:13:03 +00:00
kubernetes-prow[bot]
aa78ac0846 Merge pull request #6251 from kubernetes-sigs/dependabot/go_modules/github.com/go-errors/errors-1.5.1
build(deps): bump github.com/go-errors/errors from 1.4.2 to 1.5.1
2026-09-04 03:10:31 +00:00
kubernetes-prow[bot]
31c1273bc1 Merge pull request #6250 from kubernetes-sigs/dependabot/go_modules/sigs.k8s.io/application-0.8.3
build(deps): bump sigs.k8s.io/application from 0.8.2 to 0.8.3
2026-09-04 03:10:22 +00:00
dependabot[bot]
a2dbe836ae build(deps): bump golang.org/x/text from 0.38.0 to 0.41.0
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.38.0 to 0.41.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.38.0...v0.41.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-version: 0.41.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-04 03:03:13 +00:00
kubernetes-prow[bot]
2a2ae088b9 Merge pull request #6256 from kubernetes-sigs/dependabot/go_modules/golang.org/x/sys-0.47.0
build(deps): bump golang.org/x/sys from 0.45.0 to 0.47.0
2026-09-04 03:00:18 +00:00
kubernetes-prow[bot]
640eac43fc Merge pull request #6245 from kubernetes-sigs/dependabot/npm_and_yarn/site/browserslist-4.28.8
build(deps-dev): bump browserslist from 4.19.3 to 4.28.8 in /site
2026-09-04 02:38:19 +00:00
dependabot[bot]
39d6506d85 build(deps): bump golang.org/x/sys from 0.45.0 to 0.47.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.45.0 to 0.47.0.
- [Commits](https://github.com/golang/sys/compare/v0.45.0...v0.47.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.47.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-04 01:59:36 +00:00
dependabot[bot]
cba85e8c30 build(deps): bump github.com/go-errors/errors from 1.4.2 to 1.5.1
Bumps [github.com/go-errors/errors](https://github.com/go-errors/errors) from 1.4.2 to 1.5.1.
- [Release notes](https://github.com/go-errors/errors/releases)
- [Commits](https://github.com/go-errors/errors/compare/v1.4.2...v1.5.1)

---
updated-dependencies:
- dependency-name: github.com/go-errors/errors
  dependency-version: 1.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-04 01:57:37 +00:00
dependabot[bot]
2be553c77f build(deps): bump sigs.k8s.io/application from 0.8.2 to 0.8.3
Bumps [sigs.k8s.io/application](https://github.com/kubernetes-sigs/application) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/kubernetes-sigs/application/releases)
- [Changelog](https://github.com/kubernetes-sigs/application/blob/master/docs/release.md)
- [Commits](https://github.com/kubernetes-sigs/application/compare/v0.8.2...v0.8.3)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/application
  dependency-version: 0.8.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-04 01:57:11 +00:00
kubernetes-prow[bot]
8c9719bb22 Merge pull request #6246 from koba1t/fix/dependabot-go-workspace-root
configure Dependabot for the Go workspace
2026-09-04 01:54:19 +00:00
Yugo Kobayashi
5c240a1d0a configure Dependabot for the Go workspace 2026-09-03 22:34:56 +09:00
kubernetes-prow[bot]
0c85ead867 Merge pull request #6244 from kubernetes-sigs/dependabot/go_modules/hack/google.golang.org/grpc-1.83.1
build(deps): bump google.golang.org/grpc from 1.82.1 to 1.83.1 in /hack
2026-09-03 11:38:17 +00:00
dependabot[bot]
dee9d76dd4 build(deps-dev): bump browserslist from 4.19.3 to 4.28.8 in /site
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.19.3 to 4.28.8.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.19.3...4.28.8)

---
updated-dependencies:
- dependency-name: browserslist
  dependency-version: 4.28.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-02 08:27:19 +00:00
dependabot[bot]
f509176c32 build(deps): bump google.golang.org/grpc from 1.82.1 to 1.83.1 in /hack
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.82.1 to 1.83.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.82.1...v1.83.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.83.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-02 08:20:41 +00:00
yugo kobayashi
a87baa5639 sync Go workspace for Dependabot updates (#6240)
* ci: sync Go workspace for Dependabot updates

* ci: preserve Dependabot automatic rebases

* build: monitor all Go modules with Dependabot
2026-09-01 11:42:12 +00:00
Pujitha Paladugu
65279bb0c2 fix: reject flag-like helmCharts releaseName and name values
Motivation:
HelmChart.AsHelmArgs() appends ReleaseName as the first bare
positional argument to `helm template`, and pullCommand() appends
Name as a bare positional argument to `helm pull` (when a repo is
set and the chart isn't already cached locally). Neither value is
preceded by a `--` delimiter before being handed to exec.Command.
Helm's own flag parser does not distinguish a bare positional
argument from a flag: if a kustomization.yaml sets, for example,
releaseName: --post-renderer=./evil.sh, helm interprets that as a
--post-renderer flag rather than a release name, and executes the
attacker-supplied script during `kustomize build --enable-helm`
(or `kubectl kustomize --enable-helm`). This is a real,
demonstrated flag-injection path reachable from an untrusted
kustomization.yaml plus --enable-helm; it is not a claim about
every possible helm argument, only the two fields that are passed
as bare positionals. Other HelmChart fields (Namespace, ValuesFile,
KubeVersion, etc.) are passed as `--flag value` pairs, where helm's
pflag-based parser consumes the very next token as the flag's value
regardless of its content, so they are not exploitable the same way
and are out of scope for this change.

Approach:
Reject a releaseName or name that starts with '-' in validateArgs(),
which runs during Config() before any helm subprocess is spawned.
The check is added to the plugin source
(plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go)
and mirrored into the generated copy
(api/internal/builtins/HelmChartInflationGenerator.go) via
`go generate .` (pluginator), matching how this plugin is normally
maintained. A small test harness helper,
ErrorFromLoadAndRunGenerator, was added to
api/testutils/kusttest/harnessenhanced.go, modeled on the existing
ErrorFromLoadAndRunTransformer helper, so the new tests can assert
on the Config()-time validation error without needing an actual
helm binary installed.

Validation:
- `cd api && go build ./... && go vet ./...` pass.
- `cd plugin/builtin/helmchartinflationgenerator && go vet ./...`
  passes. (`go build ./...` in that directory fails with "function
  main is undeclared" both before and after this change; it's a
  //go:generate pluginator source file compiled specially, not a
  standalone main package, so plain `go build` there is not
  meaningful.)
- Added TestHelmChartInflationGeneratorRejectsFlagLikeReleaseName
  and TestHelmChartInflationGeneratorRejectsFlagLikeChartName in
  plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator_test.go.
  Verified both fail-then-pass: with each new HasPrefix check
  temporarily removed, `go test ./... -run
  TestHelmChartInflationGeneratorRejectsFlagLike... -v` fails with
  an "unable to run: helmV3 ... executable file not found" error,
  proving execution reaches the real helm subprocess call with the
  injected flag; restoring the check makes the same test pass with
  the expected "must not start with '-'" error, confirming
  validation now happens before any subprocess is spawned.
- `go test ./types/... ./testutils/... ./internal/builtins/...` in
  api/ pass. `go test ./krusty/...` has one unrelated pre-existing
  failure, TestAddManagedbyLabel, which fails identically on
  unmodified master: it expects a version string baked in via
  -ldflags during `make test` that plain `go test` does not set.
- golangci-lint v1.64.8 (the version pinned in hack/go.mod, matching
  what CI's `make lint` installs) run against the changed packages
  is clean.

Report: https://github.com/kubernetes-sigs/kustomize/issues/6241
Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
Assisted-by: claude-sonnet-5 (via Claude Code)
2026-08-31 07:27:46 -07:00
kubernetes-prow[bot]
c44f66d54f Merge pull request #6239 from superbrothers/feat/image-volume-cronjob
fix: add CronJob Image Volume support to images transformer
2026-08-31 04:00:11 +00:00
Kazuki Suda
12135e1563 fix: add CronJob Image Volume support to images transformer
The default images field spec covers spec/volumes[]/image/reference
under Pod and PodTemplateSpec, but CronJob's Image Volume under
spec/jobTemplate/spec/template/spec was missing from the list. This
adds the missing path.
2026-08-29 18:53:27 +09:00
kubernetes-prow[bot]
3fd96a0bfb Merge pull request #6236 from koba1t/chore/bump_stretchr_testify_to_remove_old_dependencies
chore: bump stretch/testify pkg to remove old yaml dependencies
2026-08-24 18:57:01 +00:00
kubernetes-prow[bot]
12f9e63914 Merge pull request #6235 from kubernetes-sigs/revert-6223-codex/fix-integer-key-json
Revert "fix: support integer keys when marshaling resources to JSON"
2026-08-20 16:59:14 +00:00
kubernetes-prow[bot]
cf33ea71bf Merge pull request #6229 from kubernetes-sigs/dependabot/go_modules/hack/software.sslmate.com/src/go-pkcs12-0.7.2
build(deps): bump software.sslmate.com/src/go-pkcs12 from 0.7.0 to 0.7.2 in /hack
2026-08-20 00:13:10 +00:00
Yugo Kobayashi
84168ddd1b chore: bump stretch/testify pkg to remove old yaml dependencies 2026-08-20 09:04:11 +09:00