Commit Graph

40 Commits

Author SHA1 Message Date
Alexey Odinokov
28cdcc2e46 Allowing RunFns not to stop on empty result
Introducing the additional flag
ContinueOnEmptyResult that is false by default
to keep compatibility with the previous behavior.
Based on [1]

[1]
https://github.com/kubernetes-sigs/kustomize/pull/3112
2020-11-05 07:19:20 +00:00
Donny Xia
acdfd9a920 remove error from NewContainer 2020-09-24 11:37:49 -07:00
Donny Xia
52016b22dd test without system call 2020-09-24 11:37:48 -07:00
Donny Xia
11049fa0bb add as-current-user for fn run 2020-09-24 11:37:48 -07:00
Donny Xia
87d2187436 remove --network-name flag from kpt fn run 2020-09-18 12:39:49 -07:00
Donny Xia
f6c06b58ef Change network to a boolean 2020-09-16 16:20:50 -07:00
Donny Xia
c202be0338 Remove redundant env field 2020-08-26 12:49:42 -07:00
Donny Xia
46194b3385 code review 2020-08-25 12:15:37 -07:00
Donny Xia
904a9dea08 explicitly specify envs to be exported in function 2020-08-25 12:14:46 -07:00
Donny Xia
893c99da1c code review 2020-08-24 16:27:55 -07:00
Donny Xia
fa15242719 refactor network name in kyaml container 2020-08-24 11:40:57 -07:00
Donny Xia
451c5c32c9 code review 2020-08-21 12:05:11 -07:00
Donny Xia
d03cf061e8 Update kyaml to specify user for function 2020-08-20 15:24:59 -07:00
jregan
edced4b3f6 Delete newly orphaned code. 2020-08-20 13:12:06 -07:00
Gongpu Zhu
b407675fc0 Enable logging in runfn 2020-08-11 18:02:22 -07:00
Phani Teja Marupaka
28307bc435 Simplify parsing 2020-06-19 17:21:13 -07:00
Phani Teja Marupaka
e994b3b566 E2e test for run with json 2020-06-19 12:33:08 -07:00
Phillip Wittrock
f17cec0b3f Address kyaml windows compatibility issues 2020-05-19 15:44:30 -07:00
Phillip Wittrock
6ae53cb732 Support publishing starlark functions from urls 2020-05-13 11:36:49 -07:00
Phillip Wittrock
dab0f3cf22 Add documentation and simplify framework 2020-05-07 12:51:02 -07:00
Phillip Wittrock
95f0a44fc0 Enable exec functions (Alpha) 2020-05-06 08:59:54 -07:00
Phillip Wittrock
174b2ed62e Refactor starlark runtime ontop of runtimeutil 2020-05-06 08:16:14 -07:00
Phillip Wittrock
594c48d19a Refactor container function runtime into its own package 2020-05-06 08:16:14 -07:00
Phillip Wittrock
6d9702561a Enable functions to defer failures
so multiple validators can be run sequentially without shortcircuiting the pipeline
2020-04-17 20:27:58 -07:00
Phillip Wittrock
8d22cbdcca Support writing results from container filter 2020-04-15 08:01:49 -07:00
Phillip Wittrock
4f926df7cf Fix path in runfn
- Calculate path relative to the functionConfig file
- Do not allow absolute paths or traversal to parent directories
2020-04-06 16:53:20 -07:00
Prachi Pendse
38973a80c3 Use mount flag to pass storage mounts to functions 2020-04-01 15:03:57 -07:00
Prachi Pendse
39fe903498 Support mounting volumes to containers 2020-03-31 01:08:54 -07:00
Phillip Wittrock
7164e55831 Allow functions to enable the starlark filter (off by default) 2020-03-25 13:29:20 -07:00
Phillip Wittrock
efdd812cc1 refactor function filters 2020-03-24 11:18:46 -07:00
Eddie Zaneski
6cdcb1f436 Support network in functions
Signed-off-by: Eddie Zaneski <eddiezane@gmail.com>
2020-02-07 17:31:33 -07:00
Phillip Wittrock
474dfc916b kyaml/rnfn: support explicit fn list and reading from an io.Reader
- Support specifying an io.Reader as Input.  Use this instead of Path for reading Resources.
- Default io.Writer to os.Stdout if no Path is specified
- Default io.Reader to os.Stdin if no Path is specified
- Support specifying an explicit list of Functions.
  If specified, use these in place of reading from the Input or Directory source by default.
2020-01-14 18:19:13 -08:00
Phillip Wittrock
778f92ca0d runfns: sort ContainerFilters depth first
- run ContainerFilters most deeply nested in the hierarchy before others
- test refactoring
2020-01-14 13:43:31 -08:00
Phillip Wittrock
7bbcba5d23 Re-introduce global scope for cmd/config run as flag 2020-01-13 08:42:20 -08:00
Phillip Wittrock
2f5be62387 cmd/config run scoping and path defaulting
- default the path and index for Resources generated by functions
- scope functions to only operate against resources in subdirectories
2020-01-08 22:13:58 -08:00
Frank Farzan
a4c69d9cde Fix 'config run' by removing default mount.
In, pull #1822 mount logic was refactored where the default
mount using zero-value no longer makes sense and leads to
this failure:

"invalid argument "type=,src=,dst=:ro" for "--mount" flag: type is
required"

I think the intent here was to remove default mount.
2019-12-09 14:37:57 -08:00
Arthur Mello
0bace652c3 Move repeated variable content to constants following linter suggestion 2019-12-08 07:12:48 -03:00
Jonathan Wong
dff30b926e Nit fixes and proper RunFns integration 2019-12-03 00:17:12 -08:00
Jonathan Wong
e46108ada0 Add in struct for mounted storage options 2019-11-28 15:43:17 -08:00
Phillip Wittrock
c99278c67b Add kyaml command for invoking container filters 2019-11-13 07:33:28 -08:00