Commit Graph

39 Commits

Author SHA1 Message Date
koba1t
3866a30826 introduce one const value that indicate to no quote in ShlexSplit() 2025-07-14 20:12:00 +09:00
koba1t
b6128950c9 add ShlexSplit() as an alternative to shlex.Split() 2025-07-14 03:54:29 +09:00
koba1t
042a2cf177 add testcases for shlexsplit 2025-07-12 07:14:17 +09:00
koba1t
7664c4ba38 replace github.com/google/shlex with https://github.com/carapace-sh/carapace-shlex 2025-01-16 14:54:26 +09:00
Davanum Srinivas
84e6594e9b Update golangci/golangci-lint to v1.56.2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-12-14 19:28:39 -05:00
Yusuke Abe
ed09399cd1 fix: return error instead of log.Fatalf() (#5625)
* fix: return error instead of log.Fatalf()

* chore: add meaningful message to error output

* chore: add meaningful message to fatal function
2024-04-18 03:56:51 -07:00
koba1t
91b92b52c1 remove klog/v1 dependencies due to that is in the unwanted dependencies in k/k 2024-03-28 00:30:27 +09:00
Kubernetes Prow Robot
3e69c2e36a Merge pull request #5510 from andreaskaris/kustomize-env-var-max-length
Skip KUSTOMIZE_PLUGIN_CONFIG_* env variables when too large
2024-02-21 09:35:01 -08:00
Andreas Karis
17eab513e9 Skip KUSTOMIZE_PLUGIN_CONFIG_* env variables when too large
Kustomize sets the legacy KUSTOMIZE_PLUGIN_CONFIG_STRING and
KUSTOMIZE_PLUGIN_CONFIG_ROOT environment variables. When these
environment variables exceed a hardcoded length (PAGE_SIZE * 32 on most
Linux systems), the kernel will return `argument list too long`. Given
that the environment variables are legacy, log a warning and do not set
them if they exceed 131071 bytes.

Reported-at: https://github.com/kubernetes-sigs/kustomize/issues/5480
Signed-off-by: Andreas Karis <ak.karis@gmail.com>
2024-02-21 17:36:09 +01:00
Dale Haiducek
9546529f1d Include plugin stderr with wrapped error
This allows plugins to provide more details aside
from just `exit status 1` inside the error

Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>
2024-02-15 09:48:21 -05:00
Varsha Prasad Narsing
7911b2c001 [refactor]: Internalize loader api
This PR intends to move the loader api to
internal. Only the necessary methods which
are needed for the api have been put into
`pkg/loader.go`.

Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
2023-09-28 10:49:45 -04:00
Cailyn
8ab4b8d167 remove direct dependency on github/pkg/errors (#4970) 2023-01-13 10:52:25 -08:00
Katrina Verey
f6b72077c8 Stop using deprecated ioutil functions 2022-08-10 18:22:46 -04:00
Katrina Verey
14947e449b Address new linter complaints 2022-03-31 11:37:26 -04:00
Francesc Campoy
7fae7d1bd6 Move api/filesys to kyaml/filesys (#3997)
* Move api/filesys to kyaml/filesys

* Add deprecated version of api/filesys with aliases to new code

* Use new kyaml/filesys package and update dependencies

* Migrate to kyaml/filesys and update dependencies

* Skip tests that break on Windows
2021-06-16 11:42:00 -07:00
Mikhail Mazurskiy
a3ed120efb Handle errors 2021-06-05 09:43:13 +10:00
monopole
aa5b4814d6 upgrade to helm 3.5.4 and imdario/mergo v0.3.12 2021-04-09 15:05:41 -07:00
Katrina Verey
3255c73c71 Loader FS and empty env fix 2021-03-24 18:44:29 -07:00
Katrina Verey
e77c284924 Do no require exec/go plugin home to use fn plugins 2021-03-23 10:47:16 -07:00
monopole
6f6d41f17f Remove dead merge conflict code. 2021-03-17 06:35:30 -07:00
monopole
2cb972de3b Rename id annotations to build annotations. 2021-01-15 06:43:13 -08:00
Natasha Sarkar
bd4580d73a Manage name changes (prefix/suffix) via YAML annotations rather than via in-memory-only fields. 2021-01-11 13:08:45 -08:00
jregan
f66e5bb923 Extract conflict detection to it's own interface.
This PR
 - defines a patch conflict detector interface,
 - extracts implementations of the interface from the
   merginator code, making the merginator code
   independent of --enable_kyaml.
 - injects those implementations into kustomize
   as a function of --enable_kyaml.

So, instead of using different merginators to combine
resmaps, this pr allows the use of a single patch merge
code path that uses different conflict detectors.

So instead of debating how to merge, we're now only
considering whether to warn on conflict detection
in one transformer.

This PR is in service of #3304, eliminating seven
instances where --enable_kyaml was consulted.  These
were cases where conflict detection wasn't an issue
(but merging patches was).
2020-12-06 08:38:45 -08:00
jregan
a5f3d5c823 Use DepProvider in tests to access kyaml impls. 2020-11-21 14:49:44 -08:00
June Yi
51ecca8f2f Add a comment about the behavior in Windows 2020-10-03 09:49:56 +09:00
June Yi
85f79edc97 Add testcase for ErrIfNotExecutable 2020-09-26 18:01:39 +09:00
June Yi
551841b789 Support exec plugin on Windows 2020-09-22 22:42:18 +09:00
Donny Xia
8d543d8483 Refactor 2020-06-29 11:12:20 -07:00
Alexey Odinokov
919bdb84c9 Refactoring to get rid of duplicated code 2020-06-26 04:28:38 +00:00
jregan
e783af2881 Delegate to Kunstructured. 2020-06-19 15:06:13 -07:00
jregan
c4db0f9a60 checkpoint 2020-04-10 11:01:31 -07:00
Jeff Regan
7cdb157a55 Update execplugin_test.go 2019-12-12 13:57:00 -08:00
Jeff Regan
6dd48142cf Update execplugin_test.go 2019-12-12 13:41:08 -08:00
lalyos
95ad5d05b3 fix exec plugin args handling 2019-12-06 13:34:42 +01:00
Jeffrey Regan
caa71a73fe Get rid of the fake loader. 2019-12-05 10:50:42 -08:00
Jeffrey Regan
362454413a Activate lint typecheck 2019-11-18 07:46:43 -08:00
Jeffrey Regan
83db25d6c4 Activate lint for unused code. 2019-11-18 06:41:01 -08:00
Jeffrey Regan
75b8103215 Raise the golinter bar. 2019-11-14 16:37:49 -08:00
jregan
9fa0391ce9 Remove remaining plugins packages from external API. 2019-11-06 19:32:53 -08:00