From 608e7495136a62219618dc79c963d451cf326aad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 15:41:22 +0000 Subject: [PATCH] vendor: bump sigs.k8s.io/kustomize/kustomize/v5 Bumps the k8s-dependencies group in /tools with 1 update: [sigs.k8s.io/kustomize/kustomize/v5](https://github.com/kubernetes-sigs/kustomize). Updates `sigs.k8s.io/kustomize/kustomize/v5` from 5.3.0 to 5.4.1 - [Release notes](https://github.com/kubernetes-sigs/kustomize/releases) - [Commits](https://github.com/kubernetes-sigs/kustomize/compare/kustomize/v5.3.0...kustomize/v5.4.1) --- updated-dependencies: - dependency-name: sigs.k8s.io/kustomize/kustomize/v5 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: k8s-dependencies ... Signed-off-by: dependabot[bot] --- tools/go.mod | 12 +- tools/go.sum | 24 +-- .../vendor/golang.org/x/sys/unix/mkerrors.sh | 2 +- .../golang.org/x/sys/unix/zerrors_linux.go | 36 +++- .../x/sys/unix/zerrors_linux_386.go | 3 + .../x/sys/unix/zerrors_linux_amd64.go | 3 + .../x/sys/unix/zerrors_linux_arm.go | 3 + .../x/sys/unix/zerrors_linux_arm64.go | 3 + .../x/sys/unix/zerrors_linux_loong64.go | 3 + .../x/sys/unix/zerrors_linux_mips.go | 3 + .../x/sys/unix/zerrors_linux_mips64.go | 3 + .../x/sys/unix/zerrors_linux_mips64le.go | 3 + .../x/sys/unix/zerrors_linux_mipsle.go | 3 + .../x/sys/unix/zerrors_linux_ppc.go | 3 + .../x/sys/unix/zerrors_linux_ppc64.go | 3 + .../x/sys/unix/zerrors_linux_ppc64le.go | 3 + .../x/sys/unix/zerrors_linux_riscv64.go | 3 + .../x/sys/unix/zerrors_linux_s390x.go | 3 + .../x/sys/unix/zerrors_linux_sparc64.go | 3 + .../x/sys/unix/zsysnum_linux_386.go | 4 + .../x/sys/unix/zsysnum_linux_amd64.go | 3 + .../x/sys/unix/zsysnum_linux_arm.go | 4 + .../x/sys/unix/zsysnum_linux_arm64.go | 4 + .../x/sys/unix/zsysnum_linux_loong64.go | 4 + .../x/sys/unix/zsysnum_linux_mips.go | 4 + .../x/sys/unix/zsysnum_linux_mips64.go | 4 + .../x/sys/unix/zsysnum_linux_mips64le.go | 4 + .../x/sys/unix/zsysnum_linux_mipsle.go | 4 + .../x/sys/unix/zsysnum_linux_ppc.go | 4 + .../x/sys/unix/zsysnum_linux_ppc64.go | 4 + .../x/sys/unix/zsysnum_linux_ppc64le.go | 4 + .../x/sys/unix/zsysnum_linux_riscv64.go | 4 + .../x/sys/unix/zsysnum_linux_s390x.go | 4 + .../x/sys/unix/zsysnum_linux_sparc64.go | 4 + .../golang.org/x/sys/unix/ztypes_linux.go | 125 +++++++------- .../golang.org/x/sys/windows/env_windows.go | 17 +- .../x/sys/windows/syscall_windows.go | 3 +- .../.gitignore | 0 .../{json-patch.v5 => json-patch.v4}/LICENSE | 0 .../README.md | 0 .../errors.go | 0 .../{json-patch.v5 => json-patch.v4}/merge.go | 0 .../{json-patch.v5 => json-patch.v4}/patch.go | 42 +++++ tools/vendor/modules.txt | 23 +-- .../kustomize/api/filters/nameref/nameref.go | 9 +- .../filters/patchjson6902/patchjson6902.go | 2 +- .../builtins/HelmChartInflationGenerator.go | 32 +++- .../builtins/PatchJson6902Transformer.go | 2 +- .../api/internal/builtins/PatchTransformer.go | 2 +- .../builtinconfig/loaddefaultconfig.go | 2 +- .../internal/plugins/execplugin/execplugin.go | 26 ++- .../internal/plugins/loader/load_go_plugin.go | 62 +++++++ .../plugins/loader/load_go_plugin_disabled.go | 24 +++ .../api/internal/plugins/loader/loader.go | 47 ----- .../api/internal/target/kusttarget.go | 9 +- .../api/internal/utils/errtimeout.go | 6 +- .../kustomize/api/pkg/util/image.go | 13 ++ .../kustomize/api/provenance/provenance.go | 35 ++++ .../kustomize/api/resource/resource.go | 25 ++- .../cmd/config/internal/commands/tree.go | 15 ++ .../config/internal/generateddocs/api/docs.go | 2 +- .../sigs.k8s.io/kustomize/kustomize/v5/OWNERS | 6 + .../kustomize/v5/commands/build/build.go | 6 + .../v5/commands/build/flagloadrestrictor.go | 16 ++ .../kustomize/v5/commands/edit/set/all.go | 7 + .../v5/commands/edit/set/setconfigmap.go | 30 ++-- .../v5/commands/edit/set/setimage.go | 79 +++++---- .../v5/commands/edit/set/setsecret.go | 160 ++++++++++++++++++ .../sigs.k8s.io/kustomize/kyaml/yaml/fns.go | 10 +- .../kustomize/kyaml/yaml/merge2/merge2.go | 5 +- .../sigs.k8s.io/kustomize/kyaml/yaml/rnode.go | 17 ++ 71 files changed, 802 insertions(+), 235 deletions(-) rename tools/vendor/gopkg.in/evanphx/{json-patch.v5 => json-patch.v4}/.gitignore (100%) rename tools/vendor/gopkg.in/evanphx/{json-patch.v5 => json-patch.v4}/LICENSE (100%) rename tools/vendor/gopkg.in/evanphx/{json-patch.v5 => json-patch.v4}/README.md (100%) rename tools/vendor/gopkg.in/evanphx/{json-patch.v5 => json-patch.v4}/errors.go (100%) rename tools/vendor/gopkg.in/evanphx/{json-patch.v5 => json-patch.v4}/merge.go (100%) rename tools/vendor/gopkg.in/evanphx/{json-patch.v5 => json-patch.v4}/patch.go (95%) create mode 100644 tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/load_go_plugin.go create mode 100644 tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/load_go_plugin_disabled.go create mode 100644 tools/vendor/sigs.k8s.io/kustomize/api/pkg/util/image.go create mode 100644 tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/OWNERS create mode 100644 tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/set/setsecret.go diff --git a/tools/go.mod b/tools/go.mod index 6720323b5..421c3a98c 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -8,7 +8,7 @@ require ( google.golang.org/protobuf v1.33.0 sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20240102165319-7f316f1309b1 sigs.k8s.io/controller-tools v0.14.0 - sigs.k8s.io/kustomize/kustomize/v5 v5.3.0 + sigs.k8s.io/kustomize/kustomize/v5 v5.4.1 ) require ( @@ -198,7 +198,7 @@ require ( golang.org/x/net v0.20.0 // indirect golang.org/x/oauth2 v0.15.0 // indirect golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.16.0 // indirect + golang.org/x/sys v0.17.0 // indirect golang.org/x/term v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect @@ -208,7 +208,7 @@ require ( google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect google.golang.org/grpc v1.60.1 // indirect - gopkg.in/evanphx/json-patch.v5 v5.6.0 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect @@ -231,9 +231,9 @@ require ( sigs.k8s.io/controller-runtime v0.16.3 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/kubebuilder/v3 v3.13.1-0.20240119130530-7fba82c768f8 // indirect - sigs.k8s.io/kustomize/api v0.16.0 // indirect - sigs.k8s.io/kustomize/cmd/config v0.13.0 // indirect - sigs.k8s.io/kustomize/kyaml v0.16.0 // indirect + sigs.k8s.io/kustomize/api v0.17.1 // indirect + sigs.k8s.io/kustomize/cmd/config v0.14.0 // indirect + sigs.k8s.io/kustomize/kyaml v0.17.0 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/tools/go.sum b/tools/go.sum index 1855de8aa..5255b4213 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -693,8 +693,8 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -773,8 +773,8 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/evanphx/json-patch.v5 v5.6.0 h1:BMT6KIwBD9CaU91PJCZIe46bDmBWa9ynTQgJIOpfQBk= -gopkg.in/evanphx/json-patch.v5 v5.6.0/go.mod h1:/kvTRh1TVm5wuM6OkHxqXtE/1nUZZpihg29RtuIyfvk= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= @@ -838,14 +838,14 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kubebuilder/v3 v3.13.1-0.20240119130530-7fba82c768f8 h1:6dc/YGQd4QVjjVHOQEz9M9w5C3Mv+q327eyJ0l8wixY= sigs.k8s.io/kubebuilder/v3 v3.13.1-0.20240119130530-7fba82c768f8/go.mod h1:ZhWtqslcUPr6eN/4Ww2Qn0OwxLuTt+HYLJRq/UTtJpw= -sigs.k8s.io/kustomize/api v0.16.0 h1:/zAR4FOQDCkgSDmVzV2uiFbuy9bhu3jEzthrHCuvm1g= -sigs.k8s.io/kustomize/api v0.16.0/go.mod h1:MnFZ7IP2YqVyVwMWoRxPtgl/5hpA+eCCrQR/866cm5c= -sigs.k8s.io/kustomize/cmd/config v0.13.0 h1:Z/bRyFQupMIqGz1KlRkLimK/VjtE4/Oj/DinJmQqTDc= -sigs.k8s.io/kustomize/cmd/config v0.13.0/go.mod h1:YlsZ9JysiHN7OjSmIZ17zvq9kl1oN2Osn+3wVyERkcM= -sigs.k8s.io/kustomize/kustomize/v5 v5.3.0 h1:OUKaQwArd1udTz3ykibOjaUwdfly6FnkQiDSSft6+Fg= -sigs.k8s.io/kustomize/kustomize/v5 v5.3.0/go.mod h1:qGalrWojwFYaT7KQXLo3kmLyuyr6VaIQYY+BWeRENus= -sigs.k8s.io/kustomize/kyaml v0.16.0 h1:6J33uKSoATlKZH16unr2XOhDI+otoe2sR3M8PDzW3K0= -sigs.k8s.io/kustomize/kyaml v0.16.0/go.mod h1:xOK/7i+vmE14N2FdFyugIshB8eF6ALpy7jI87Q2nRh4= +sigs.k8s.io/kustomize/api v0.17.1 h1:MYJBOP/yQ3/5tp4/sf6HiiMfNNyO97LmtnirH9SLNr4= +sigs.k8s.io/kustomize/api v0.17.1/go.mod h1:ffn5491s2EiNrJSmgqcWGzQUVhc/pB0OKNI0HsT/0tA= +sigs.k8s.io/kustomize/cmd/config v0.14.0 h1:TMKWBtk0Ox1EUwafT9hncg7EFrvrBlqDDHXmBHm51U8= +sigs.k8s.io/kustomize/cmd/config v0.14.0/go.mod h1:J+ukok4u7k8esCzEhRTygTW7dzDKYbC0kCDkpBK3VfI= +sigs.k8s.io/kustomize/kustomize/v5 v5.4.1 h1:97qXYnSngAvY+gUAzMfjJ73ClKZAD+JrKE+7OIMWYhw= +sigs.k8s.io/kustomize/kustomize/v5 v5.4.1/go.mod h1:nKouayWQbaro85jrNbcA+tZ6x63wYYxGPgniA/fEmgQ= +sigs.k8s.io/kustomize/kyaml v0.17.0 h1:G2bWs03V9Ur2PinHLzTUJ8Ded+30SzXZKiO92SRDs3c= +sigs.k8s.io/kustomize/kyaml v0.17.0/go.mod h1:6lxkYF1Cv9Ic8g/N7I86cvxNc5iinUo/P2vKsHNmpyE= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= diff --git a/tools/vendor/golang.org/x/sys/unix/mkerrors.sh b/tools/vendor/golang.org/x/sys/unix/mkerrors.sh index c6492020e..fdcaa974d 100644 --- a/tools/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/tools/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -584,7 +584,7 @@ ccflags="$@" $2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ || $2 ~ /^KEYCTL_/ || $2 ~ /^PERF_/ || - $2 ~ /^SECCOMP_MODE_/ || + $2 ~ /^SECCOMP_/ || $2 ~ /^SEEK_/ || $2 ~ /^SCHED_/ || $2 ~ /^SPLICE_/ || diff --git a/tools/vendor/golang.org/x/sys/unix/zerrors_linux.go b/tools/vendor/golang.org/x/sys/unix/zerrors_linux.go index a5d3ff8df..36bf8399f 100644 --- a/tools/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/tools/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -1785,6 +1785,8 @@ const ( LANDLOCK_ACCESS_FS_REMOVE_FILE = 0x20 LANDLOCK_ACCESS_FS_TRUNCATE = 0x4000 LANDLOCK_ACCESS_FS_WRITE_FILE = 0x2 + LANDLOCK_ACCESS_NET_BIND_TCP = 0x1 + LANDLOCK_ACCESS_NET_CONNECT_TCP = 0x2 LANDLOCK_CREATE_RULESET_VERSION = 0x1 LINUX_REBOOT_CMD_CAD_OFF = 0x0 LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef @@ -2465,6 +2467,7 @@ const ( PR_MCE_KILL_GET = 0x22 PR_MCE_KILL_LATE = 0x0 PR_MCE_KILL_SET = 0x1 + PR_MDWE_NO_INHERIT = 0x2 PR_MDWE_REFUSE_EXEC_GAIN = 0x1 PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_ENABLE_MANAGEMENT = 0x2b @@ -2669,8 +2672,9 @@ const ( RTAX_FEATURES = 0xc RTAX_FEATURE_ALLFRAG = 0x8 RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf + RTAX_FEATURE_MASK = 0x1f RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TCP_USEC_TS = 0x10 RTAX_FEATURE_TIMESTAMP = 0x4 RTAX_HOPLIMIT = 0xa RTAX_INITCWND = 0xb @@ -2913,9 +2917,38 @@ const ( SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x1d SC_LOG_FLUSH = 0x100000 + SECCOMP_ADDFD_FLAG_SEND = 0x2 + SECCOMP_ADDFD_FLAG_SETFD = 0x1 + SECCOMP_FILTER_FLAG_LOG = 0x2 + SECCOMP_FILTER_FLAG_NEW_LISTENER = 0x8 + SECCOMP_FILTER_FLAG_SPEC_ALLOW = 0x4 + SECCOMP_FILTER_FLAG_TSYNC = 0x1 + SECCOMP_FILTER_FLAG_TSYNC_ESRCH = 0x10 + SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV = 0x20 + SECCOMP_GET_ACTION_AVAIL = 0x2 + SECCOMP_GET_NOTIF_SIZES = 0x3 + SECCOMP_IOCTL_NOTIF_RECV = 0xc0502100 + SECCOMP_IOCTL_NOTIF_SEND = 0xc0182101 + SECCOMP_IOC_MAGIC = '!' SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_STRICT = 0x1 + SECCOMP_RET_ACTION = 0x7fff0000 + SECCOMP_RET_ACTION_FULL = 0xffff0000 + SECCOMP_RET_ALLOW = 0x7fff0000 + SECCOMP_RET_DATA = 0xffff + SECCOMP_RET_ERRNO = 0x50000 + SECCOMP_RET_KILL = 0x0 + SECCOMP_RET_KILL_PROCESS = 0x80000000 + SECCOMP_RET_KILL_THREAD = 0x0 + SECCOMP_RET_LOG = 0x7ffc0000 + SECCOMP_RET_TRACE = 0x7ff00000 + SECCOMP_RET_TRAP = 0x30000 + SECCOMP_RET_USER_NOTIF = 0x7fc00000 + SECCOMP_SET_MODE_FILTER = 0x1 + SECCOMP_SET_MODE_STRICT = 0x0 + SECCOMP_USER_NOTIF_FD_SYNC_WAKE_UP = 0x1 + SECCOMP_USER_NOTIF_FLAG_CONTINUE = 0x1 SECRETMEM_MAGIC = 0x5345434d SECURITYFS_MAGIC = 0x73636673 SEEK_CUR = 0x1 @@ -3075,6 +3108,7 @@ const ( SOL_TIPC = 0x10f SOL_TLS = 0x11a SOL_UDP = 0x11 + SOL_VSOCK = 0x11f SOL_X25 = 0x106 SOL_XDP = 0x11b SOMAXCONN = 0x1000 diff --git a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 4920821cf..42ff8c3c1 100644 --- a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -281,6 +281,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index a0c1e4112..dca436004 100644 --- a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -282,6 +282,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index c63985560..5cca668ac 100644 --- a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -288,6 +288,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index 47cc62e25..d8cae6d15 100644 --- a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -278,6 +278,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go index 27ac4a09e..28e39afdc 100644 --- a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +++ b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go @@ -275,6 +275,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index 54694642a..cd66e92cb 100644 --- a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -281,6 +281,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x80 SIOCATMARK = 0x40047307 diff --git a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index 3adb81d75..c1595eba7 100644 --- a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -281,6 +281,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x80 SIOCATMARK = 0x40047307 diff --git a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index 2dfe98f0d..ee9456b0d 100644 --- a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -281,6 +281,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x80 SIOCATMARK = 0x40047307 diff --git a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index f5398f84f..8cfca81e1 100644 --- a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -281,6 +281,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x80 SIOCATMARK = 0x40047307 diff --git a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go index c54f152d6..60b0deb3a 100644 --- a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +++ b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go @@ -336,6 +336,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 76057dc72..f90aa7281 100644 --- a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -340,6 +340,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index e0c3725e2..ba9e01503 100644 --- a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -340,6 +340,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index 18f2813ed..07cdfd6e9 100644 --- a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -272,6 +272,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index 11619d4ec..2f1dd214a 100644 --- a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -344,6 +344,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index 396d994da..f40519d90 100644 --- a/tools/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/tools/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -335,6 +335,9 @@ const ( SCM_TIMESTAMPNS = 0x21 SCM_TXTIME = 0x3f SCM_WIFI_STATUS = 0x25 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x400000 SFD_NONBLOCK = 0x4000 SF_FP = 0x38 diff --git a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go index fcf3ecbdd..0cc3ce496 100644 --- a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +++ b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go @@ -448,4 +448,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go index f56dc2504..856d92d69 100644 --- a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +++ b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -371,4 +371,7 @@ const ( SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go index 974bf2467..8d467094c 100644 --- a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +++ b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go @@ -412,4 +412,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go index 39a2739e2..edc173244 100644 --- a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +++ b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -315,4 +315,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go index cf9c9d77e..445eba206 100644 --- a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +++ b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go @@ -309,4 +309,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go index 10b7362ef..adba01bca 100644 --- a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +++ b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go @@ -432,4 +432,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 4450 SYS_CACHESTAT = 4451 SYS_FCHMODAT2 = 4452 + SYS_MAP_SHADOW_STACK = 4453 + SYS_FUTEX_WAKE = 4454 + SYS_FUTEX_WAIT = 4455 + SYS_FUTEX_REQUEUE = 4456 ) diff --git a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go index cd4d8b4fd..014c4e9c7 100644 --- a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +++ b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go @@ -362,4 +362,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 5450 SYS_CACHESTAT = 5451 SYS_FCHMODAT2 = 5452 + SYS_MAP_SHADOW_STACK = 5453 + SYS_FUTEX_WAKE = 5454 + SYS_FUTEX_WAIT = 5455 + SYS_FUTEX_REQUEUE = 5456 ) diff --git a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go index 2c0efca81..ccc97d74d 100644 --- a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +++ b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go @@ -362,4 +362,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 5450 SYS_CACHESTAT = 5451 SYS_FCHMODAT2 = 5452 + SYS_MAP_SHADOW_STACK = 5453 + SYS_FUTEX_WAKE = 5454 + SYS_FUTEX_WAIT = 5455 + SYS_FUTEX_REQUEUE = 5456 ) diff --git a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go index a72e31d39..ec2b64a95 100644 --- a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +++ b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go @@ -432,4 +432,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 4450 SYS_CACHESTAT = 4451 SYS_FCHMODAT2 = 4452 + SYS_MAP_SHADOW_STACK = 4453 + SYS_FUTEX_WAKE = 4454 + SYS_FUTEX_WAIT = 4455 + SYS_FUTEX_REQUEUE = 4456 ) diff --git a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go index c7d1e3747..21a839e33 100644 --- a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +++ b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go @@ -439,4 +439,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go index f4d4838c8..c11121ec3 100644 --- a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +++ b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go @@ -411,4 +411,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go index b64f0e591..909b631fc 100644 --- a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +++ b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go @@ -411,4 +411,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go index 95711195a..e49bed16e 100644 --- a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +++ b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go @@ -316,4 +316,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go index f94e943bc..66017d2d3 100644 --- a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +++ b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go @@ -377,4 +377,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go index ba0c2bc51..47bab18dc 100644 --- a/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +++ b/tools/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go @@ -390,4 +390,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/tools/vendor/golang.org/x/sys/unix/ztypes_linux.go b/tools/vendor/golang.org/x/sys/unix/ztypes_linux.go index bbf8399ff..dc0c955ee 100644 --- a/tools/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/tools/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -174,7 +174,8 @@ type FscryptPolicyV2 struct { Contents_encryption_mode uint8 Filenames_encryption_mode uint8 Flags uint8 - _ [4]uint8 + Log2_data_unit_size uint8 + _ [3]uint8 Master_key_identifier [16]uint8 } @@ -455,60 +456,63 @@ type Ucred struct { } type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 - Pacing_rate uint64 - Max_pacing_rate uint64 - Bytes_acked uint64 - Bytes_received uint64 - Segs_out uint32 - Segs_in uint32 - Notsent_bytes uint32 - Min_rtt uint32 - Data_segs_in uint32 - Data_segs_out uint32 - Delivery_rate uint64 - Busy_time uint64 - Rwnd_limited uint64 - Sndbuf_limited uint64 - Delivered uint32 - Delivered_ce uint32 - Bytes_sent uint64 - Bytes_retrans uint64 - Dsack_dups uint32 - Reord_seen uint32 - Rcv_ooopack uint32 - Snd_wnd uint32 - Rcv_wnd uint32 - Rehash uint32 + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 + Pacing_rate uint64 + Max_pacing_rate uint64 + Bytes_acked uint64 + Bytes_received uint64 + Segs_out uint32 + Segs_in uint32 + Notsent_bytes uint32 + Min_rtt uint32 + Data_segs_in uint32 + Data_segs_out uint32 + Delivery_rate uint64 + Busy_time uint64 + Rwnd_limited uint64 + Sndbuf_limited uint64 + Delivered uint32 + Delivered_ce uint32 + Bytes_sent uint64 + Bytes_retrans uint64 + Dsack_dups uint32 + Reord_seen uint32 + Rcv_ooopack uint32 + Snd_wnd uint32 + Rcv_wnd uint32 + Rehash uint32 + Total_rto uint16 + Total_rto_recoveries uint16 + Total_rto_time uint32 } type CanFilter struct { @@ -551,7 +555,7 @@ const ( SizeofIPv6MTUInfo = 0x20 SizeofICMPv6Filter = 0x20 SizeofUcred = 0xc - SizeofTCPInfo = 0xf0 + SizeofTCPInfo = 0xf8 SizeofCanFilter = 0x8 SizeofTCPRepairOpt = 0x8 ) @@ -3399,7 +3403,7 @@ const ( DEVLINK_PORT_FN_ATTR_STATE = 0x2 DEVLINK_PORT_FN_ATTR_OPSTATE = 0x3 DEVLINK_PORT_FN_ATTR_CAPS = 0x4 - DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x4 + DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x5 ) type FsverityDigest struct { @@ -4183,7 +4187,8 @@ const ( ) type LandlockRulesetAttr struct { - Access_fs uint64 + Access_fs uint64 + Access_net uint64 } type LandlockPathBeneathAttr struct { @@ -5134,7 +5139,7 @@ const ( NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf - NL80211_FREQUENCY_ATTR_MAX = 0x1b + NL80211_FREQUENCY_ATTR_MAX = 0x1c NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6 NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11 NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc @@ -5547,7 +5552,7 @@ const ( NL80211_REGDOM_TYPE_CUSTOM_WORLD = 0x2 NL80211_REGDOM_TYPE_INTERSECTION = 0x3 NL80211_REGDOM_TYPE_WORLD = 0x1 - NL80211_REG_RULE_ATTR_MAX = 0x7 + NL80211_REG_RULE_ATTR_MAX = 0x8 NL80211_REKEY_DATA_AKM = 0x4 NL80211_REKEY_DATA_KCK = 0x2 NL80211_REKEY_DATA_KEK = 0x1 diff --git a/tools/vendor/golang.org/x/sys/windows/env_windows.go b/tools/vendor/golang.org/x/sys/windows/env_windows.go index b8ad19250..d4577a423 100644 --- a/tools/vendor/golang.org/x/sys/windows/env_windows.go +++ b/tools/vendor/golang.org/x/sys/windows/env_windows.go @@ -37,14 +37,17 @@ func (token Token) Environ(inheritExisting bool) (env []string, err error) { return nil, err } defer DestroyEnvironmentBlock(block) - blockp := unsafe.Pointer(block) - for { - entry := UTF16PtrToString((*uint16)(blockp)) - if len(entry) == 0 { - break + size := unsafe.Sizeof(*block) + for *block != 0 { + // find NUL terminator + end := unsafe.Pointer(block) + for *(*uint16)(end) != 0 { + end = unsafe.Add(end, size) } - env = append(env, entry) - blockp = unsafe.Add(blockp, 2*(len(entry)+1)) + + entry := unsafe.Slice(block, (uintptr(end)-uintptr(unsafe.Pointer(block)))/size) + env = append(env, UTF16ToString(entry)) + block = (*uint16)(unsafe.Add(end, size)) } return env, nil } diff --git a/tools/vendor/golang.org/x/sys/windows/syscall_windows.go b/tools/vendor/golang.org/x/sys/windows/syscall_windows.go index ffb8708cc..6395a031d 100644 --- a/tools/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/tools/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -125,8 +125,7 @@ func UTF16PtrToString(p *uint16) string { for ptr := unsafe.Pointer(p); *(*uint16)(ptr) != 0; n++ { ptr = unsafe.Pointer(uintptr(ptr) + unsafe.Sizeof(*p)) } - - return string(utf16.Decode(unsafe.Slice(p, n))) + return UTF16ToString(unsafe.Slice(p, n)) } func Getpagesize() int { return 4096 } diff --git a/tools/vendor/gopkg.in/evanphx/json-patch.v5/.gitignore b/tools/vendor/gopkg.in/evanphx/json-patch.v4/.gitignore similarity index 100% rename from tools/vendor/gopkg.in/evanphx/json-patch.v5/.gitignore rename to tools/vendor/gopkg.in/evanphx/json-patch.v4/.gitignore diff --git a/tools/vendor/gopkg.in/evanphx/json-patch.v5/LICENSE b/tools/vendor/gopkg.in/evanphx/json-patch.v4/LICENSE similarity index 100% rename from tools/vendor/gopkg.in/evanphx/json-patch.v5/LICENSE rename to tools/vendor/gopkg.in/evanphx/json-patch.v4/LICENSE diff --git a/tools/vendor/gopkg.in/evanphx/json-patch.v5/README.md b/tools/vendor/gopkg.in/evanphx/json-patch.v4/README.md similarity index 100% rename from tools/vendor/gopkg.in/evanphx/json-patch.v5/README.md rename to tools/vendor/gopkg.in/evanphx/json-patch.v4/README.md diff --git a/tools/vendor/gopkg.in/evanphx/json-patch.v5/errors.go b/tools/vendor/gopkg.in/evanphx/json-patch.v4/errors.go similarity index 100% rename from tools/vendor/gopkg.in/evanphx/json-patch.v5/errors.go rename to tools/vendor/gopkg.in/evanphx/json-patch.v4/errors.go diff --git a/tools/vendor/gopkg.in/evanphx/json-patch.v5/merge.go b/tools/vendor/gopkg.in/evanphx/json-patch.v4/merge.go similarity index 100% rename from tools/vendor/gopkg.in/evanphx/json-patch.v5/merge.go rename to tools/vendor/gopkg.in/evanphx/json-patch.v4/merge.go diff --git a/tools/vendor/gopkg.in/evanphx/json-patch.v5/patch.go b/tools/vendor/gopkg.in/evanphx/json-patch.v4/patch.go similarity index 95% rename from tools/vendor/gopkg.in/evanphx/json-patch.v5/patch.go rename to tools/vendor/gopkg.in/evanphx/json-patch.v4/patch.go index 4bce5936d..dc2b7e51e 100644 --- a/tools/vendor/gopkg.in/evanphx/json-patch.v5/patch.go +++ b/tools/vendor/gopkg.in/evanphx/json-patch.v4/patch.go @@ -568,6 +568,29 @@ func (p Patch) replace(doc *container, op Operation) error { return errors.Wrapf(err, "replace operation failed to decode path") } + if path == "" { + val := op.value() + + if val.which == eRaw { + if !val.tryDoc() { + if !val.tryAry() { + return errors.Wrapf(err, "replace operation value must be object or array") + } + } + } + + switch val.which { + case eAry: + *doc = &val.ary + case eDoc: + *doc = &val.doc + case eRaw: + return errors.Wrapf(err, "replace operation hit impossible case") + } + + return nil + } + con, key := findObject(doc, path) if con == nil { @@ -634,6 +657,25 @@ func (p Patch) test(doc *container, op Operation) error { return errors.Wrapf(err, "test operation failed to decode path") } + if path == "" { + var self lazyNode + + switch sv := (*doc).(type) { + case *partialDoc: + self.doc = *sv + self.which = eDoc + case *partialArray: + self.ary = *sv + self.which = eAry + } + + if self.equal(op.value()) { + return nil + } + + return errors.Wrapf(ErrTestFailed, "testing value %s failed", path) + } + con, key := findObject(doc, path) if con == nil { diff --git a/tools/vendor/modules.txt b/tools/vendor/modules.txt index 495a1b052..d2bdcc3be 100644 --- a/tools/vendor/modules.txt +++ b/tools/vendor/modules.txt @@ -1061,7 +1061,7 @@ golang.org/x/oauth2/internal golang.org/x/sync/errgroup golang.org/x/sync/semaphore golang.org/x/sync/singleflight -# golang.org/x/sys v0.16.0 +# golang.org/x/sys v0.17.0 ## explicit; go 1.18 golang.org/x/sys/execabs golang.org/x/sys/plan9 @@ -1250,9 +1250,9 @@ google.golang.org/protobuf/types/known/structpb google.golang.org/protobuf/types/known/timestamppb google.golang.org/protobuf/types/known/wrapperspb google.golang.org/protobuf/types/pluginpb -# gopkg.in/evanphx/json-patch.v5 v5.6.0 +# gopkg.in/evanphx/json-patch.v4 v4.12.0 ## explicit -gopkg.in/evanphx/json-patch.v5 +gopkg.in/evanphx/json-patch.v4 # gopkg.in/inf.v0 v0.9.1 ## explicit gopkg.in/inf.v0 @@ -1838,8 +1838,8 @@ sigs.k8s.io/kubebuilder/v3/pkg/plugins/optional/grafana/v1alpha sigs.k8s.io/kubebuilder/v3/pkg/plugins/optional/grafana/v1alpha/scaffolds sigs.k8s.io/kubebuilder/v3/pkg/plugins/optional/grafana/v1alpha/scaffolds/internal/templates sigs.k8s.io/kubebuilder/v3/pkg/rescaffold -# sigs.k8s.io/kustomize/api v0.16.0 -## explicit; go 1.20 +# sigs.k8s.io/kustomize/api v0.17.1 +## explicit; go 1.21 sigs.k8s.io/kustomize/api/filters/annotations sigs.k8s.io/kustomize/api/filters/fieldspec sigs.k8s.io/kustomize/api/filters/filtersutil @@ -1882,13 +1882,14 @@ sigs.k8s.io/kustomize/api/krusty sigs.k8s.io/kustomize/api/krusty/localizer sigs.k8s.io/kustomize/api/kv sigs.k8s.io/kustomize/api/pkg/loader +sigs.k8s.io/kustomize/api/pkg/util sigs.k8s.io/kustomize/api/provenance sigs.k8s.io/kustomize/api/provider sigs.k8s.io/kustomize/api/resmap sigs.k8s.io/kustomize/api/resource sigs.k8s.io/kustomize/api/types -# sigs.k8s.io/kustomize/cmd/config v0.13.0 -## explicit; go 1.20 +# sigs.k8s.io/kustomize/cmd/config v0.14.0 +## explicit; go 1.21 sigs.k8s.io/kustomize/cmd/config/completion sigs.k8s.io/kustomize/cmd/config/configcobra sigs.k8s.io/kustomize/cmd/config/ext @@ -1898,8 +1899,8 @@ sigs.k8s.io/kustomize/cmd/config/internal/generateddocs/api sigs.k8s.io/kustomize/cmd/config/internal/generateddocs/commands sigs.k8s.io/kustomize/cmd/config/internal/generateddocs/tutorials sigs.k8s.io/kustomize/cmd/config/runner -# sigs.k8s.io/kustomize/kustomize/v5 v5.3.0 -## explicit; go 1.20 +# sigs.k8s.io/kustomize/kustomize/v5 v5.4.1 +## explicit; go 1.21 sigs.k8s.io/kustomize/kustomize/v5 sigs.k8s.io/kustomize/kustomize/v5/commands sigs.k8s.io/kustomize/kustomize/v5/commands/build @@ -1917,8 +1918,8 @@ sigs.k8s.io/kustomize/kustomize/v5/commands/openapi sigs.k8s.io/kustomize/kustomize/v5/commands/openapi/fetch sigs.k8s.io/kustomize/kustomize/v5/commands/openapi/info sigs.k8s.io/kustomize/kustomize/v5/commands/version -# sigs.k8s.io/kustomize/kyaml v0.16.0 -## explicit; go 1.20 +# sigs.k8s.io/kustomize/kyaml v0.17.0 +## explicit; go 1.21 sigs.k8s.io/kustomize/kyaml/comments sigs.k8s.io/kustomize/kyaml/errors sigs.k8s.io/kustomize/kyaml/ext diff --git a/tools/vendor/sigs.k8s.io/kustomize/api/filters/nameref/nameref.go b/tools/vendor/sigs.k8s.io/kustomize/api/filters/nameref/nameref.go index 4815f10a2..ff83420cb 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/api/filters/nameref/nameref.go +++ b/tools/vendor/sigs.k8s.io/kustomize/api/filters/nameref/nameref.go @@ -284,9 +284,9 @@ func (f Filter) roleRefFilter() sieveFunc { return previousIdSelectedByGvk(roleRefGvk) } -func prefixSuffixEquals(other resource.ResCtx) sieveFunc { +func prefixSuffixEquals(other resource.ResCtx, allowEmpty bool) sieveFunc { return func(r *resource.Resource) bool { - return r.PrefixesSuffixesEquals(other) + return r.PrefixesSuffixesEquals(other, allowEmpty) } } @@ -325,7 +325,10 @@ func (f Filter) selectReferral( if len(candidates) == 1 { return candidates[0], nil } - candidates = doSieve(candidates, prefixSuffixEquals(f.Referrer)) + candidates = doSieve(candidates, prefixSuffixEquals(f.Referrer, true)) + if len(candidates) > 1 { + candidates = doSieve(candidates, prefixSuffixEquals(f.Referrer, false)) + } if len(candidates) == 1 { return candidates[0], nil } diff --git a/tools/vendor/sigs.k8s.io/kustomize/api/filters/patchjson6902/patchjson6902.go b/tools/vendor/sigs.k8s.io/kustomize/api/filters/patchjson6902/patchjson6902.go index d41859465..671567d9a 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/api/filters/patchjson6902/patchjson6902.go +++ b/tools/vendor/sigs.k8s.io/kustomize/api/filters/patchjson6902/patchjson6902.go @@ -6,7 +6,7 @@ package patchjson6902 import ( "strings" - jsonpatch "gopkg.in/evanphx/json-patch.v5" + jsonpatch "gopkg.in/evanphx/json-patch.v4" "sigs.k8s.io/kustomize/kyaml/kio" "sigs.k8s.io/kustomize/kyaml/yaml" k8syaml "sigs.k8s.io/yaml" diff --git a/tools/vendor/sigs.k8s.io/kustomize/api/internal/builtins/HelmChartInflationGenerator.go b/tools/vendor/sigs.k8s.io/kustomize/api/internal/builtins/HelmChartInflationGenerator.go index d0380f0c5..c93c18c00 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/api/internal/builtins/HelmChartInflationGenerator.go +++ b/tools/vendor/sigs.k8s.io/kustomize/api/internal/builtins/HelmChartInflationGenerator.go @@ -12,11 +12,12 @@ import ( "regexp" "strings" - "github.com/imdario/mergo" "sigs.k8s.io/kustomize/api/resmap" "sigs.k8s.io/kustomize/api/types" "sigs.k8s.io/kustomize/kyaml/errors" "sigs.k8s.io/kustomize/kyaml/kio" + kyaml "sigs.k8s.io/kustomize/kyaml/yaml" + "sigs.k8s.io/kustomize/kyaml/yaml/merge2" "sigs.k8s.io/yaml" ) @@ -201,18 +202,33 @@ func (p *HelmChartInflationGeneratorPlugin) replaceValuesInline() error { if err != nil { return err } - chValues := make(map[string]interface{}) - if err = yaml.Unmarshal(pValues, &chValues); err != nil { - return err + chValues, err := kyaml.Parse(string(pValues)) + if err != nil { + return errors.WrapPrefixf(err, "could not parse values file into rnode") + } + inlineValues, err := kyaml.FromMap(p.ValuesInline) + if err != nil { + return errors.WrapPrefixf(err, "could not parse values inline into rnode") } + var outValues *kyaml.RNode switch p.ValuesMerge { + // Function `merge2.Merge` overrides values in dest with values from src. + // To achieve override or merge behavior, we pass parameters in different order. + // Object passed as dest will be modified, so we copy it just in case someone + // decides to use it after this is called. case valuesMergeOptionOverride: - err = mergo.Merge( - &chValues, p.ValuesInline, mergo.WithOverride) + outValues, err = merge2.Merge(inlineValues, chValues.Copy(), kyaml.MergeOptions{}) case valuesMergeOptionMerge: - err = mergo.Merge(&chValues, p.ValuesInline) + outValues, err = merge2.Merge(chValues, inlineValues.Copy(), kyaml.MergeOptions{}) + } + if err != nil { + return errors.WrapPrefixf(err, "could not merge values") + } + mapValues, err := outValues.Map() + if err != nil { + return errors.WrapPrefixf(err, "could not parse merged values into map") } - p.ValuesInline = chValues + p.ValuesInline = mapValues return err } diff --git a/tools/vendor/sigs.k8s.io/kustomize/api/internal/builtins/PatchJson6902Transformer.go b/tools/vendor/sigs.k8s.io/kustomize/api/internal/builtins/PatchJson6902Transformer.go index d704dff0f..04625e510 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/api/internal/builtins/PatchJson6902Transformer.go +++ b/tools/vendor/sigs.k8s.io/kustomize/api/internal/builtins/PatchJson6902Transformer.go @@ -6,7 +6,7 @@ package builtins import ( "fmt" - jsonpatch "gopkg.in/evanphx/json-patch.v5" + jsonpatch "gopkg.in/evanphx/json-patch.v4" "sigs.k8s.io/kustomize/api/filters/patchjson6902" "sigs.k8s.io/kustomize/api/ifc" "sigs.k8s.io/kustomize/api/resmap" diff --git a/tools/vendor/sigs.k8s.io/kustomize/api/internal/builtins/PatchTransformer.go b/tools/vendor/sigs.k8s.io/kustomize/api/internal/builtins/PatchTransformer.go index 86ee28728..8e6eb4112 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/api/internal/builtins/PatchTransformer.go +++ b/tools/vendor/sigs.k8s.io/kustomize/api/internal/builtins/PatchTransformer.go @@ -7,7 +7,7 @@ import ( "fmt" "strings" - jsonpatch "gopkg.in/evanphx/json-patch.v5" + jsonpatch "gopkg.in/evanphx/json-patch.v4" "sigs.k8s.io/kustomize/api/filters/patchjson6902" "sigs.k8s.io/kustomize/api/resmap" "sigs.k8s.io/kustomize/api/resource" diff --git a/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/loaddefaultconfig.go b/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/loaddefaultconfig.go index bf5e3f8a3..434941b6e 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/loaddefaultconfig.go +++ b/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig/loaddefaultconfig.go @@ -33,7 +33,7 @@ func loadDefaultConfig( // makeTransformerConfigFromBytes returns a TransformerConfig object from bytes func makeTransformerConfigFromBytes(data []byte) (*TransformerConfig, error) { var t TransformerConfig - err := yaml.Unmarshal(data, &t) + err := yaml.UnmarshalStrict(data, &t) if err != nil { return nil, err } diff --git a/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/execplugin/execplugin.go b/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/execplugin/execplugin.go index 001731f78..71c52884f 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/execplugin/execplugin.go +++ b/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/execplugin/execplugin.go @@ -6,6 +6,7 @@ package execplugin import ( "bytes" "fmt" + "log" "os" "os/exec" "runtime" @@ -21,6 +22,7 @@ import ( const ( tmpConfigFilePrefix = "kust-plugin-config-" + maxArgStringLength = 131071 ) // ExecPlugin record the name and args of an executable @@ -169,23 +171,35 @@ func (p *ExecPlugin) invokePlugin(input []byte) ([]byte, error) { p.path, append([]string{f.Name()}, p.args...)...) cmd.Env = p.getEnv() cmd.Stdin = bytes.NewReader(input) - cmd.Stderr = os.Stderr + var stdErr bytes.Buffer + cmd.Stderr = &stdErr if _, err := os.Stat(p.h.Loader().Root()); err == nil { cmd.Dir = p.h.Loader().Root() } result, err := cmd.Output() if err != nil { return nil, errors.WrapPrefixf( - err, "failure in plugin configured via %s; %v", - f.Name(), err.Error()) + fmt.Errorf("failure in plugin configured via %s; %w", + f.Name(), err), stdErr.String()) } return result, os.Remove(f.Name()) } func (p *ExecPlugin) getEnv() []string { env := os.Environ() - env = append(env, - "KUSTOMIZE_PLUGIN_CONFIG_STRING="+string(p.cfg), - "KUSTOMIZE_PLUGIN_CONFIG_ROOT="+p.h.Loader().Root()) + pluginConfigString := "KUSTOMIZE_PLUGIN_CONFIG_STRING=" + string(p.cfg) + if len(pluginConfigString) <= maxArgStringLength { + env = append(env, pluginConfigString) + } else { + log.Printf("KUSTOMIZE_PLUGIN_CONFIG_STRING exceeds hard limit of %d characters, the environment variable "+ + "will be omitted", maxArgStringLength) + } + pluginConfigRoot := "KUSTOMIZE_PLUGIN_CONFIG_ROOT=" + p.h.Loader().Root() + if len(pluginConfigRoot) <= maxArgStringLength { + env = append(env, pluginConfigRoot) + } else { + log.Printf("KUSTOMIZE_PLUGIN_CONFIG_ROOT exceeds hard limit of %d characters, the environment variable "+ + "will be omitted", maxArgStringLength) + } return env } diff --git a/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/load_go_plugin.go b/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/load_go_plugin.go new file mode 100644 index 000000000..3757cfc64 --- /dev/null +++ b/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/load_go_plugin.go @@ -0,0 +1,62 @@ +// Copyright 2024 The Kubernetes Authors. +// SPDX-License-Identifier: Apache-2.0 +//go:build !kustomize_disable_go_plugin_support + +package loader + +import ( + "fmt" + "log" + "plugin" + "reflect" + + "sigs.k8s.io/kustomize/api/internal/plugins/utils" + "sigs.k8s.io/kustomize/api/konfig" + "sigs.k8s.io/kustomize/api/resmap" + "sigs.k8s.io/kustomize/kyaml/errors" + "sigs.k8s.io/kustomize/kyaml/resid" +) + +// registry is a means to avoid trying to load the same .so file +// into memory more than once, which results in an error. +// Each test makes its own loader, and tries to load its own plugins, +// but the loaded .so files are in shared memory, so one will get +// "this plugin already loaded" errors if the registry is maintained +// as a Loader instance variable. So make it a package variable. +var registry = make(map[string]resmap.Configurable) //nolint:gochecknoglobals + +func copyPlugin(c resmap.Configurable) resmap.Configurable { + indirect := reflect.Indirect(reflect.ValueOf(c)) + newIndirect := reflect.New(indirect.Type()) + newIndirect.Elem().Set(reflect.ValueOf(indirect.Interface())) + newNamed := newIndirect.Interface() + return newNamed.(resmap.Configurable) //nolint:forcetypeassert +} + +func (l *Loader) loadGoPlugin(id resid.ResId, absPath string) (resmap.Configurable, error) { + regId := relativePluginPath(id) + if c, ok := registry[regId]; ok { + return copyPlugin(c), nil + } + if !utils.FileExists(absPath) { + return nil, fmt.Errorf( + "expected file with Go object code at: %s", absPath) + } + log.Printf("Attempting plugin load from %q", absPath) + p, err := plugin.Open(absPath) + if err != nil { + return nil, errors.WrapPrefixf(err, "plugin %s fails to load", absPath) + } + symbol, err := p.Lookup(konfig.PluginSymbol) + if err != nil { + return nil, errors.WrapPrefixf( + err, "plugin %s doesn't have symbol %s", + regId, konfig.PluginSymbol) + } + c, ok := symbol.(resmap.Configurable) + if !ok { + return nil, fmt.Errorf("plugin %q not configurable", regId) + } + registry[regId] = c + return copyPlugin(c), nil +} diff --git a/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/load_go_plugin_disabled.go b/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/load_go_plugin_disabled.go new file mode 100644 index 000000000..654e22da3 --- /dev/null +++ b/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/load_go_plugin_disabled.go @@ -0,0 +1,24 @@ +// Copyright 2024 The Kubernetes Authors. +// SPDX-License-Identifier: Apache-2.0 + +// The build tag "kustomize_disable_go_plugin_support" is used to deactivate the +// kustomize API's dependency on the "plugins" package. This is beneficial for +// applications that need to embed it but do not have requirements for dynamic +// Go plugins. +// Including plugins as a dependency can lead to an increase in binary size due +// to the population of ELF's sections such as .dynsym and .dynstr. +// By utilizing this flag, applications have the flexibility to exclude the +// import if they do not require support for dynamic Go plugins. +//go:build kustomize_disable_go_plugin_support + +package loader + +import ( + "sigs.k8s.io/kustomize/api/resmap" + "sigs.k8s.io/kustomize/kyaml/errors" + "sigs.k8s.io/kustomize/kyaml/resid" +) + +func (l *Loader) loadGoPlugin(_ resid.ResId, _ string) (resmap.Configurable, error) { + return nil, errors.New("plugin load is disabled") +} diff --git a/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/loader.go b/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/loader.go index 1758e5cf6..e494df767 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/loader.go +++ b/tools/vendor/sigs.k8s.io/kustomize/api/internal/plugins/loader/loader.go @@ -5,18 +5,14 @@ package loader import ( "fmt" - "log" "os" "path/filepath" - "plugin" - "reflect" "strings" "sigs.k8s.io/kustomize/api/ifc" "sigs.k8s.io/kustomize/api/internal/plugins/builtinhelpers" "sigs.k8s.io/kustomize/api/internal/plugins/execplugin" "sigs.k8s.io/kustomize/api/internal/plugins/fnplugin" - "sigs.k8s.io/kustomize/api/internal/plugins/utils" "sigs.k8s.io/kustomize/api/konfig" "sigs.k8s.io/kustomize/api/resmap" "sigs.k8s.io/kustomize/api/resource" @@ -287,46 +283,3 @@ func (l *Loader) loadExecOrGoPlugin(resId resid.ResId) (resmap.Configurable, err return c, nil } -// registry is a means to avoid trying to load the same .so file -// into memory more than once, which results in an error. -// Each test makes its own loader, and tries to load its own plugins, -// but the loaded .so files are in shared memory, so one will get -// "this plugin already loaded" errors if the registry is maintained -// as a Loader instance variable. So make it a package variable. -var registry = make(map[string]resmap.Configurable) - -func (l *Loader) loadGoPlugin(id resid.ResId, absPath string) (resmap.Configurable, error) { - regId := relativePluginPath(id) - if c, ok := registry[regId]; ok { - return copyPlugin(c), nil - } - if !utils.FileExists(absPath) { - return nil, fmt.Errorf( - "expected file with Go object code at: %s", absPath) - } - log.Printf("Attempting plugin load from '%s'", absPath) - p, err := plugin.Open(absPath) - if err != nil { - return nil, errors.WrapPrefixf(err, "plugin %s fails to load", absPath) - } - symbol, err := p.Lookup(konfig.PluginSymbol) - if err != nil { - return nil, errors.WrapPrefixf( - err, "plugin %s doesn't have symbol %s", - regId, konfig.PluginSymbol) - } - c, ok := symbol.(resmap.Configurable) - if !ok { - return nil, fmt.Errorf("plugin '%s' not configurable", regId) - } - registry[regId] = c - return copyPlugin(c), nil -} - -func copyPlugin(c resmap.Configurable) resmap.Configurable { - indirect := reflect.Indirect(reflect.ValueOf(c)) - newIndirect := reflect.New(indirect.Type()) - newIndirect.Elem().Set(reflect.ValueOf(indirect.Interface())) - newNamed := newIndirect.Interface() - return newNamed.(resmap.Configurable) -} diff --git a/tools/vendor/sigs.k8s.io/kustomize/api/internal/target/kusttarget.go b/tools/vendor/sigs.k8s.io/kustomize/api/internal/target/kusttarget.go index eefa1ac63..44c82bc59 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/api/internal/target/kusttarget.go +++ b/tools/vendor/sigs.k8s.io/kustomize/api/internal/target/kusttarget.go @@ -425,7 +425,14 @@ func (kt *KustTarget) accumulateResources( } ldr, err := kt.ldr.New(path) if err != nil { - if kusterr.IsMalformedYAMLError(errF) { // Some error occurred while tyring to decode YAML file + // If accumulateFile found malformed YAML and there was a failure + // loading the resource as a base, then the resource is likely a + // file. The loader failure message is unnecessary, and could be + // confusing. Report only the file load error. + // + // However, a loader timeout implies there is a git repo at the + // path. In that case, both errors could be important. + if kusterr.IsMalformedYAMLError(errF) && !utils.IsErrTimeout(err) { return nil, errF } return nil, errors.WrapPrefixf( diff --git a/tools/vendor/sigs.k8s.io/kustomize/api/internal/utils/errtimeout.go b/tools/vendor/sigs.k8s.io/kustomize/api/internal/utils/errtimeout.go index c1761d2c6..a0d861c7b 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/api/internal/utils/errtimeout.go +++ b/tools/vendor/sigs.k8s.io/kustomize/api/internal/utils/errtimeout.go @@ -15,11 +15,11 @@ type errTimeOut struct { cmd string } -func NewErrTimeOut(d time.Duration, c string) errTimeOut { - return errTimeOut{duration: d, cmd: c} +func NewErrTimeOut(d time.Duration, c string) *errTimeOut { + return &errTimeOut{duration: d, cmd: c} } -func (e errTimeOut) Error() string { +func (e *errTimeOut) Error() string { return fmt.Sprintf("hit %s timeout running '%s'", e.duration, e.cmd) } diff --git a/tools/vendor/sigs.k8s.io/kustomize/api/pkg/util/image.go b/tools/vendor/sigs.k8s.io/kustomize/api/pkg/util/image.go new file mode 100644 index 000000000..8c11898de --- /dev/null +++ b/tools/vendor/sigs.k8s.io/kustomize/api/pkg/util/image.go @@ -0,0 +1,13 @@ +// Copyright 2024 The Kubernetes Authors. +// SPDX-License-Identifier: Apache-2.0 + +package util + +import ( + "sigs.k8s.io/kustomize/api/internal/image" +) + +// Splits image string name into name, tag and digest +func SplitImageName(imageName string) (name string, tag string, digest string) { + return image.Split(imageName) +} diff --git a/tools/vendor/sigs.k8s.io/kustomize/api/provenance/provenance.go b/tools/vendor/sigs.k8s.io/kustomize/api/provenance/provenance.go index 0e24fc36c..c637ac2e1 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/api/provenance/provenance.go +++ b/tools/vendor/sigs.k8s.io/kustomize/api/provenance/provenance.go @@ -8,6 +8,8 @@ import ( "runtime" "runtime/debug" "strings" + + "github.com/blang/semver/v4" ) // These variables are set at build time using ldflags. @@ -62,9 +64,42 @@ func GetProvenance() Provenance { p.GitCommit = setting.Value } } + + for _, dep := range info.Deps { + if dep != nil && dep.Path == "sigs.k8s.io/kustomize/kustomize/v5" { + if dep.Version != "devel" { + continue + } + v, err := GetMostRecentTag(*dep) + if err != nil { + fmt.Printf("failed to get most recent tag for %s: %v\n", dep.Path, err) + continue + } + p.Version = v + } + } + return p } +func GetMostRecentTag(m debug.Module) (string, error) { + for m.Replace != nil { + m = *m.Replace + } + + split := strings.Split(m.Version, "-") + sv, err := semver.Parse(strings.TrimPrefix(split[0], "v")) + + if err != nil { + return "", fmt.Errorf("failed to parse version %s: %w", m.Version, err) + } + + if len(split) > 1 && sv.Patch > 0 { + sv.Patch -= 1 + } + return fmt.Sprintf("v%s", sv.FinalizeVersion()), nil +} + // Short returns the shortened provenance stamp. func (v Provenance) Short() string { return fmt.Sprintf( diff --git a/tools/vendor/sigs.k8s.io/kustomize/api/resource/resource.go b/tools/vendor/sigs.k8s.io/kustomize/api/resource/resource.go index ae1a98be0..9884a672c 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/api/resource/resource.go +++ b/tools/vendor/sigs.k8s.io/kustomize/api/resource/resource.go @@ -287,12 +287,25 @@ func (r *Resource) getCsvAnnotation(name string) []string { return strings.Split(annotations[name], ",") } -// PrefixesSuffixesEquals is conceptually doing the same task -// as OutermostPrefixSuffix but performs a deeper comparison -// of the suffix and prefix slices. -func (r *Resource) PrefixesSuffixesEquals(o ResCtx) bool { - return utils.SameEndingSubSlice(r.GetNamePrefixes(), o.GetNamePrefixes()) && - utils.SameEndingSubSlice(r.GetNameSuffixes(), o.GetNameSuffixes()) +// PrefixesSuffixesEquals is conceptually doing the same task as +// OutermostPrefixSuffix but performs a deeper comparison of the suffix and +// prefix slices. +// The allowEmpty flag determines whether an empty prefix/suffix +// should be considered a match on anything. +// This is used when filtering, starting with a coarser pass allowing empty +// matches, before requiring exact matches if there are multiple +// remaining candidates. +func (r *Resource) PrefixesSuffixesEquals(o ResCtx, allowEmpty bool) bool { + if allowEmpty { + eitherPrefixEmpty := len(r.GetNamePrefixes()) == 0 || len(o.GetNamePrefixes()) == 0 + eitherSuffixEmpty := len(r.GetNameSuffixes()) == 0 || len(o.GetNameSuffixes()) == 0 + + return (eitherPrefixEmpty || utils.SameEndingSubSlice(r.GetNamePrefixes(), o.GetNamePrefixes())) && + (eitherSuffixEmpty || utils.SameEndingSubSlice(r.GetNameSuffixes(), o.GetNameSuffixes())) + } else { + return utils.SameEndingSubSlice(r.GetNamePrefixes(), o.GetNamePrefixes()) && + utils.SameEndingSubSlice(r.GetNameSuffixes(), o.GetNameSuffixes()) + } } // RemoveBuildAnnotations removes annotations created by the build process. diff --git a/tools/vendor/sigs.k8s.io/kustomize/cmd/config/internal/commands/tree.go b/tools/vendor/sigs.k8s.io/kustomize/cmd/config/internal/commands/tree.go index 7504bda91..bea5769d3 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/cmd/config/internal/commands/tree.go +++ b/tools/vendor/sigs.k8s.io/kustomize/cmd/config/internal/commands/tree.go @@ -101,12 +101,14 @@ func (r *TreeRunner) runE(c *cobra.Command, args []string) error { fields = append(fields, newField("spec", "containers", "[name=.*]", "name"), newField("spec", "template", "spec", "containers", "[name=.*]", "name"), + newField("spec", "jobTemplate", "spec", "template", "spec", "containers", "[name=.*]", "name"), ) } if r.images || (r.all && !c.Flag("image").Changed) { fields = append(fields, newField("spec", "containers", "[name=.*]", "image"), newField("spec", "template", "spec", "containers", "[name=.*]", "image"), + newField("spec", "jobTemplate", "spec", "template", "spec", "containers", "[name=.*]", "image"), ) } @@ -114,18 +116,21 @@ func (r *TreeRunner) runE(c *cobra.Command, args []string) error { fields = append(fields, newField("spec", "containers", "[name=.*]", "command"), newField("spec", "template", "spec", "containers", "[name=.*]", "command"), + newField("spec", "jobTemplate", "spec", "template", "spec", "containers", "[name=.*]", "command"), ) } if r.args || (r.all && !c.Flag("args").Changed) { fields = append(fields, newField("spec", "containers", "[name=.*]", "args"), newField("spec", "template", "spec", "containers", "[name=.*]", "args"), + newField("spec", "jobTemplate", "spec", "template", "spec", "containers", "[name=.*]", "args"), ) } if r.env || (r.all && !c.Flag("env").Changed) { fields = append(fields, newField("spec", "containers", "[name=.*]", "env"), newField("spec", "template", "spec", "containers", "[name=.*]", "env"), + newField("spec", "jobTemplate", "spec", "template", "spec", "containers", "[name=.*]", "env"), ) } @@ -138,12 +143,14 @@ func (r *TreeRunner) runE(c *cobra.Command, args []string) error { fields = append(fields, newField("spec", "containers", "[name=.*]", "resources"), newField("spec", "template", "spec", "containers", "[name=.*]", "resources"), + newField("spec", "jobTemplate", "spec", "template", "spec", "containers", "[name=.*]", "resources"), ) } if r.ports || (r.all && !c.Flag("ports").Changed) { fields = append(fields, newField("spec", "containers", "[name=.*]", "ports"), newField("spec", "template", "spec", "containers", "[name=.*]", "ports"), + newField("spec", "jobTemplate", "spec", "template", "spec", "containers", "[name=.*]", "ports"), newField("spec", "ports"), ) } @@ -176,6 +183,14 @@ func newField(val ...string) kio.TreeWriterField { } } + if strings.HasPrefix(strings.Join(val, "."), "spec.jobTemplate.spec.template.spec.containers") { + return kio.TreeWriterField{ + Name: "spec.jobTemplate.spec.template.spec.containers", + PathMatcher: yaml.PathMatcher{Path: val, StripComments: true}, + SubName: val[len(val)-1], + } + } + if strings.HasPrefix(strings.Join(val, "."), "spec.containers") { return kio.TreeWriterField{ Name: "spec.containers", diff --git a/tools/vendor/sigs.k8s.io/kustomize/cmd/config/internal/generateddocs/api/docs.go b/tools/vendor/sigs.k8s.io/kustomize/cmd/config/internal/generateddocs/api/docs.go index 412bf6d24..ba03f8ddf 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/cmd/config/internal/generateddocs/api/docs.go +++ b/tools/vendor/sigs.k8s.io/kustomize/cmd/config/internal/generateddocs/api/docs.go @@ -144,7 +144,7 @@ The script wraps itself using ` + "`" + `config run wrap -- $0` + "`" + ` which ` + "`" + `Dockerfile` + "`" + ` installs ` + "`" + `kustomize fn` + "`" + ` and copies the script into the container image. - FROM golang:1.20-bullseye + FROM golang:1.21-bullseye RUN go get sigs.k8s.io/kustomize/cmd/config RUN mv /go/bin/config /usr/bin/config COPY nginx-template.sh /usr/bin/nginx-template.sh diff --git a/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/OWNERS b/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/OWNERS new file mode 100644 index 000000000..b1a4ec99f --- /dev/null +++ b/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/OWNERS @@ -0,0 +1,6 @@ +# See https://github.com/kubernetes/community/blob/master/community-membership.md +approvers: + - commands-approvers + +reviewers: + - commands-reviewers diff --git a/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/build/build.go b/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/build/build.go index 5914f8959..96dcc7260 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/build/build.go +++ b/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/build/build.go @@ -102,12 +102,18 @@ func NewCmdBuild( return err }, } + AddFlagOutputPath(cmd.Flags()) AddFunctionBasicsFlags(cmd.Flags()) AddFlagLoadRestrictor(cmd.Flags()) AddFlagEnablePlugins(cmd.Flags()) AddFlagReorderOutput(cmd.Flags()) AddFlagEnableManagedbyLabel(cmd.Flags()) + + if err := AddFlagLoadRestrictorCompletion(cmd); err != nil { + log.Fatalf("Error adding completion for flag '--%s': %v", flagLoadRestrictorName, err) + } + msg := "Error marking flag '%s' as deprecated: %v" err := cmd.Flags().MarkDeprecated(flagReorderOutputName, "use the new 'sortOptions' field in kustomization.yaml instead.") diff --git a/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/build/flagloadrestrictor.go b/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/build/flagloadrestrictor.go index 928a53075..71e336b0a 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/build/flagloadrestrictor.go +++ b/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/build/flagloadrestrictor.go @@ -6,6 +6,7 @@ package build import ( "fmt" + "github.com/spf13/cobra" "github.com/spf13/pflag" "sigs.k8s.io/kustomize/api/types" ) @@ -23,6 +24,21 @@ func AddFlagLoadRestrictor(set *pflag.FlagSet) { "relocatability of the kustomization.") } +func AddFlagLoadRestrictorCompletion(cmd *cobra.Command) error { + err := cmd.RegisterFlagCompletionFunc(flagLoadRestrictorName, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { + return []string{ + types.LoadRestrictionsNone.String(), + types.LoadRestrictionsRootOnly.String(), + }, cobra.ShellCompDirectiveNoFileComp + }) + + if err != nil { + return fmt.Errorf("unable to add completion for --%s flag: %w", flagLoadRestrictorName, err) + } + + return nil +} + func validateFlagLoadRestrictor() error { switch theFlags.loadRestrictor { case types.LoadRestrictionsRootOnly.String(), diff --git a/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/set/all.go b/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/set/all.go index 0c716c91b..961aee7d4 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/set/all.go +++ b/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/set/all.go @@ -27,12 +27,19 @@ func NewCmdSet( # Sets the namesuffix field kustomize edit set namesuffix + + # Edits a field in an existing configmap in the kustomization file + kustomize edit set configmap my-configmap --from-literal=key1=value1 + + # Edits a field in an existing secret in the kustomization file + kustomize edit set secret my-secret --from-literal=key1=value1 `, Args: cobra.MinimumNArgs(1), } c.AddCommand( newCmdSetConfigMap(fSys, ldr, rf), + newCmdSetSecret(fSys, ldr, rf), newCmdSetNamePrefix(fSys), newCmdSetNameSuffix(fSys), newCmdSetNamespace(fSys, v), diff --git a/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/set/setconfigmap.go b/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/set/setconfigmap.go index 71aae88da..21e69201b 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/set/setconfigmap.go +++ b/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/set/setconfigmap.go @@ -1,13 +1,17 @@ // Copyright 2023 The Kubernetes Authors. // SPDX-License-Identifier: Apache-2.0 - +// +//nolint:dupl package set import ( "fmt" + "sigs.k8s.io/kustomize/api/konfig" + + "slices" + "github.com/spf13/cobra" - "golang.org/x/exp/slices" "sigs.k8s.io/kustomize/api/ifc" "sigs.k8s.io/kustomize/api/resource" "sigs.k8s.io/kustomize/api/types" @@ -24,16 +28,22 @@ func newCmdSetConfigMap( var flags util.ConfigMapSecretFlagsAndArgs cmd := &cobra.Command{ Use: "configmap NAME [--from-literal=key1=value1] [--namespace=namespace-name] [--new-namespace=new-namespace-name]", - Short: "Edits the value for an existing key for a configmap in the kustomization file", - Long: `Edits the value for an existing key in an existing configmap in the kustomization file. -Both configmap name and key name must exist for this command to succeed.`, - Example: ` - # Edits an existing configmap in the kustomization file, changing value of key1 to 2 + Short: fmt.Sprintf("Edits the value for an existing key for a ConfigMap in the %s file", konfig.DefaultKustomizationFileName()), + Long: fmt.Sprintf(`Edits the value for an existing key in an existing ConfigMap in the %[1]s file. +ConfigMap name, ConfigMap namespace, and key name must match an existing entry in the %[1]s file for this command to succeed. +When namespace is omitted, the default namespace is used. Conversely, when an entry without a specified namespace exists +in the %[1]s file, it can be updated by either omitting the namespace on the kustomize edit set configmap invocation or by +specifying --namespace=default.`, konfig.DefaultKustomizationFileName()), + Example: fmt.Sprintf(` + # Edits an existing ConfigMap in the %[1]s file, changing value of key1 to 2, and namespace is implicitly defined as "default" kustomize edit set configmap my-configmap --from-literal=key1=2 - # Edits an existing configmap in the kustomization file, changing namespace to 'new-namespace' + # Edits an existing ConfigMap in the %[1]s file, changing value of key1 to 2, and explicitly define namespace as "default" + kustomize edit set configmap my-configmap --from-literal=key1=2 --namespace default + + # Edits an existing ConfigMap in the %[1]s file, changing namespace to "new-namespace" kustomize edit set configmap my-configmap --namespace=current-namespace --new-namespace=new-namespace -`, +`, konfig.DefaultKustomizationFileName()), RunE: func(_ *cobra.Command, args []string) error { return runEditSetConfigMap(flags, fSys, args, ldr, rf) }, @@ -144,7 +154,7 @@ func findConfigMapArgs(m *types.Kustomization, name, namespace string) (*types.C }) if cmIndex == -1 { - return nil, fmt.Errorf("unable to find ConfigMap with name '%q'", name) + return nil, fmt.Errorf("unable to find ConfigMap with name %q", name) } return &m.ConfigMapGenerator[cmIndex], nil diff --git a/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/set/setimage.go b/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/set/setimage.go index f03501dcf..0af5541e2 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/set/setimage.go +++ b/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/set/setimage.go @@ -9,6 +9,7 @@ import ( "sort" "strings" + "sigs.k8s.io/kustomize/api/pkg/util" "sigs.k8s.io/kustomize/api/types" "github.com/spf13/cobra" @@ -31,8 +32,10 @@ var ( errImageInvalidArgs = errors.New(`invalid format of image, use one of the following options: - =: - =@ +- =:@ - = - : +- :@ - @`) ) @@ -76,7 +79,7 @@ images: to the kustomization file if it doesn't exist, and overwrite the previous ones if the image name exists. -The image tag can only contain alphanumeric, '.', '_' and '-'. Passing * (asterisk) either as the new name, +The image tag can only contain alphanumeric, '.', '_' and '-'. Passing * (asterisk) either as the new name, the new tag, or the digest will preserve the appropriate values from the kustomization file. `, RunE: func(cmd *cobra.Command, args []string) error { @@ -204,52 +207,46 @@ func replaceDigest(image types.Image, digest string) types.Image { } func parse(arg string) (types.Image, error) { - // matches if there is an image name to overwrite - // =<:|@> - if s := strings.Split(arg, separator); len(s) == 2 { - p, err := parseOverwrite(s[1], true) - return types.Image{ - Name: s[0], - NewName: p.name, - NewTag: p.tag, - Digest: p.digest, - }, err + // matches if there is an image name + // =:@ + // supports digest and tag and override the image name + key, value, err := imageArgParse(arg) + if err != nil { + return types.Image{}, err } - // matches only for overwrites - // <:|@> - p, err := parseOverwrite(arg, false) - return types.Image{ - Name: p.name, - NewTag: p.tag, - Digest: p.digest, - }, err -} + name, tag, digest := util.SplitImageName(value) + if name == arg { + return types.Image{}, errImageInvalidArgs + } -// parseOverwrite parses the overwrite parameters -// from the given arg into a struct -func parseOverwrite(arg string, overwriteImage bool) (overwrite, error) { - // match @ - if d := strings.Split(arg, "@"); len(d) > 1 { - return overwrite{ - name: d[0], - digest: d[1], - }, nil + newImage := types.Image{ + NewTag: tag, + Digest: digest, } - // match : - if t := pattern.FindStringSubmatch(arg); len(t) == 3 { - return overwrite{ - name: t[1], - tag: t[2], - }, nil + if key == "" { + newImage.Name = name + } else { + newImage.Name = key + newImage.NewName = name } - // match - if len(arg) > 0 && overwriteImage { - return overwrite{ - name: arg, - }, nil + return newImage, nil +} + +func imageArgParse(arg string) (key string, value string, err error) { + const maxArgsSeparatorCount = 2 + const keyAndValueArgsCount = 2 + + s := strings.SplitN(arg, separator, maxArgsSeparatorCount) + if len(s) == keyAndValueArgsCount { + // If separator is found it returns the key and value + return s[0], s[1], nil + } else if len(s) == 1 { + // If no separator is found it returns the whole string as value + // and the key is empty + return "", s[0], nil } - return overwrite{}, errImageInvalidArgs + return "", "", errImageInvalidArgs } diff --git a/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/set/setsecret.go b/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/set/setsecret.go new file mode 100644 index 000000000..0ac61ea32 --- /dev/null +++ b/tools/vendor/sigs.k8s.io/kustomize/kustomize/v5/commands/edit/set/setsecret.go @@ -0,0 +1,160 @@ +// Copyright 2023 The Kubernetes Authors. +// SPDX-License-Identifier: Apache-2.0 +// +//nolint:dupl +package set + +import ( + "fmt" + + "slices" + + "github.com/spf13/cobra" + "sigs.k8s.io/kustomize/api/ifc" + "sigs.k8s.io/kustomize/api/konfig" + "sigs.k8s.io/kustomize/api/resource" + "sigs.k8s.io/kustomize/api/types" + "sigs.k8s.io/kustomize/kustomize/v5/commands/internal/kustfile" + "sigs.k8s.io/kustomize/kustomize/v5/commands/internal/util" + "sigs.k8s.io/kustomize/kyaml/filesys" +) + +func newCmdSetSecret( + fSys filesys.FileSystem, + ldr ifc.KvLoader, + rf *resource.Factory, +) *cobra.Command { + var flags util.ConfigMapSecretFlagsAndArgs + cmd := &cobra.Command{ + Use: "secret NAME [--from-literal=key1=value1] [--namespace=namespace-name] [--new-namespace=new-namespace-name]", + Short: fmt.Sprintf("Edits the value for an existing key for a Secret in the %s file", konfig.DefaultKustomizationFileName()), + Long: fmt.Sprintf(`Edits the value for an existing key in an existing Secret in the %[1]s file. +Secret name, Secret namespace, and key name must match an existing entry in the %[1]s file for this command to succeed. +When namespace is omitted, the default namespace is used. Conversely, when an entry without a specified namespace exists +in the %[1]s file, it can be updated by either omitting the namespace on the kustomize edit set secret invocation or by +specifying --namespace=default.`, konfig.DefaultKustomizationFileName()), + Example: fmt.Sprintf(` + # Edits an existing Secret in the %[1]s file, changing the value of key1 to 2, and namespace is implicitly defined as "default" + kustomize edit set secret my-secret --from-literal=key1=2 + + # Edits an existing Secret in the %[1]s file, changing the value of key1 to 2, and explicitly define namespace as "default" + kustomize edit set secret my-secret --from-literal=key1=2 --namespace default + + # Edits an existing Secret in the %[1]s file, changing namespace to "new-namespace" + kustomize edit set secret my-secret --namespace=current-namespace --new-namespace=new-namespace +`, konfig.DefaultKustomizationFileName()), + RunE: func(_ *cobra.Command, args []string) error { + return runEditSetSecret(flags, fSys, args, ldr, rf) + }, + } + + cmd.Flags().StringArrayVar( + &flags.LiteralSources, + util.FromLiteralFlag, + []string{}, + "Specify an existing key and a new value to update a Secret (i.e. mykey=newvalue)") + cmd.Flags().StringVar( + &flags.Namespace, + util.NamespaceFlag, + "", + "Current namespace of the target Secret") + cmd.Flags().StringVar( + &flags.NewNamespace, + util.NewNamespaceFlag, + "", + "New namespace value for the target Secret") + + return cmd +} + +func runEditSetSecret( + flags util.ConfigMapSecretFlagsAndArgs, + fSys filesys.FileSystem, + args []string, + ldr ifc.KvLoader, + rf *resource.Factory, +) error { + err := flags.ExpandFileSource(fSys) + if err != nil { + return fmt.Errorf("failed to expand file source: %w", err) + } + + err = flags.ValidateSet(args) + if err != nil { + return fmt.Errorf("failed to validate flags: %w", err) + } + + // Load the kustomization file. + mf, err := kustfile.NewKustomizationFile(fSys) + if err != nil { + return fmt.Errorf("failed to load kustomization file: %w", err) + } + + kustomization, err := mf.Read() + if err != nil { + return fmt.Errorf("failed to read kustomization file: %w", err) + } + + // Updates the existing Secret + err = setSecret(ldr, kustomization, flags, rf) + if err != nil { + return fmt.Errorf("failed to create secret: %w", err) + } + + // Write out the kustomization file with added secret. + err = mf.Write(kustomization) + if err != nil { + return fmt.Errorf("failed to write kustomization file: %w", err) + } + + return nil +} + +func setSecret( + ldr ifc.KvLoader, + k *types.Kustomization, + flags util.ConfigMapSecretFlagsAndArgs, + rf *resource.Factory, +) error { + args, err := findSecretArgs(k, flags.Name, flags.Namespace) + if err != nil { + return fmt.Errorf("could not set new Secret value: %w", err) + } + + if len(flags.LiteralSources) > 0 { + err := util.UpdateLiteralSources(&args.GeneratorArgs, flags) + if err != nil { + return fmt.Errorf("failed to update literal sources: %w", err) + } + } + + // update namespace to new one + if flags.NewNamespace != "" { + args.Namespace = flags.NewNamespace + } + + // Validate by trying to create corev1.secret. + args.Options = types.MergeGlobalOptionsIntoLocal( + args.Options, k.GeneratorOptions) + + _, err = rf.MakeSecret(ldr, args) + if err != nil { + return fmt.Errorf("failed to validate Secret structure: %w", err) + } + + return nil +} + +// findSecretArgs finds the generator arguments corresponding to the specified +// Secret name. Secret must exist for this command to be successful. +func findSecretArgs(m *types.Kustomization, name, namespace string) (*types.SecretArgs, error) { + cmIndex := slices.IndexFunc(m.SecretGenerator, func(cmArgs types.SecretArgs) bool { + return name == cmArgs.Name && util.NamespaceEqual(namespace, cmArgs.Namespace) + }) + + if cmIndex == -1 { + return nil, fmt.Errorf("unable to find Secret with name %q", name) + } + + return &m.SecretGenerator[cmIndex], nil +} diff --git a/tools/vendor/sigs.k8s.io/kustomize/kyaml/yaml/fns.go b/tools/vendor/sigs.k8s.io/kustomize/kyaml/yaml/fns.go index e80eb48bf..e0802a897 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/kyaml/yaml/fns.go +++ b/tools/vendor/sigs.k8s.io/kustomize/kyaml/yaml/fns.go @@ -724,8 +724,14 @@ func (s FieldSetter) Filter(rn *RNode) (*RNode, error) { return rn, nil } - // Clear the field if it is empty, or explicitly null - if s.Value == nil || s.Value.IsTaggedNull() { + // Clearing nil fields: + // 1. Clear any fields with no value + // 2. Clear any "null" YAML fields unless we explicitly want to keep them + // This is to balance + // 1. Persisting 'null' values passed by the user (see issue #4628) + // 2. Avoiding producing noisy documents that add any field defaulting to + // 'nil' even if they weren't present in the source document + if s.Value == nil || (s.Value.IsTaggedNull() && !s.Value.ShouldKeep) { return rn.Pipe(Clear(s.Name)) } diff --git a/tools/vendor/sigs.k8s.io/kustomize/kyaml/yaml/merge2/merge2.go b/tools/vendor/sigs.k8s.io/kustomize/kyaml/yaml/merge2/merge2.go index 8b328ab9d..3b23019e1 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/kyaml/yaml/merge2/merge2.go +++ b/tools/vendor/sigs.k8s.io/kustomize/kyaml/yaml/merge2/merge2.go @@ -45,9 +45,9 @@ func MergeStrings(srcStr, destStr string, infer bool, mergeOptions yaml.MergeOpt } type Merger struct { - // for forwards compatibility when new functions are added to the interface } +// for forwards compatibility when new functions are added to the interface var _ walk.Visitor = Merger{} func (m Merger) VisitMap(nodes walk.Sources, s *openapi.ResourceSchema) (*yaml.RNode, error) { @@ -66,8 +66,7 @@ func (m Merger) VisitMap(nodes walk.Sources, s *openapi.ResourceSchema) (*yaml.R // If Origin is missing, preserve explicitly set null in Dest ("null", "~", etc) if nodes.Origin().IsNil() && !nodes.Dest().IsNil() && len(nodes.Dest().YNode().Value) > 0 { - // Return a new node so that it won't have a "!!null" tag and therefore won't be cleared. - return yaml.NewScalarRNode(nodes.Dest().YNode().Value), nil + return yaml.MakePersistentNullNode(nodes.Dest().YNode().Value), nil } return nodes.Origin(), nil diff --git a/tools/vendor/sigs.k8s.io/kustomize/kyaml/yaml/rnode.go b/tools/vendor/sigs.k8s.io/kustomize/kyaml/yaml/rnode.go index bf3b5347f..07c782d73 100644 --- a/tools/vendor/sigs.k8s.io/kustomize/kyaml/yaml/rnode.go +++ b/tools/vendor/sigs.k8s.io/kustomize/kyaml/yaml/rnode.go @@ -24,6 +24,20 @@ func MakeNullNode() *RNode { return NewRNode(&Node{Tag: NodeTagNull}) } +// MakePersistentNullNode returns an RNode that should be persisted, +// even when merging +func MakePersistentNullNode(value string) *RNode { + n := NewRNode( + &Node{ + Tag: NodeTagNull, + Value: value, + Kind: yaml.ScalarNode, + }, + ) + n.ShouldKeep = true + return n +} + // IsMissingOrNull is true if the RNode is nil or explicitly tagged null. // TODO: make this a method on RNode. func IsMissingOrNull(node *RNode) bool { @@ -214,6 +228,9 @@ type RNode struct { // object root: object root value *yaml.Node + // Whether we should keep this node, even if otherwise we would clear it + ShouldKeep bool + Match []string }