Phani Teja Marupaka
eb7602fe19
Validate setters against openAPI
2020-05-13 21:34:28 -07:00
Tamal Saha
e3971ffbff
Fix linter warning
...
Signed-off-by: Tamal Saha <tamal@appscode.com >
2020-05-13 13:34:24 -07:00
Tamal Saha
802d79ae32
Fix MarshalJSON of array
...
Signed-off-by: Tamal Saha <tamal@appscode.com >
2020-05-13 13:32:19 -07:00
Phani Teja Marupaka
f81d766584
Kustomization openapi
2020-04-13 23:21:17 -07:00
Morten Torkildsen
022805b56b
Fix issue with kyaml json unmarshalling
2020-04-04 20:39:29 -07:00
Phillip Wittrock
4a7b22cf23
Implement json marshal / unmarshal so it can be used by PatchJson6902Transformer
2020-04-01 14:35:05 -07:00
Phani Teja Marupaka
17503ae9d8
Rearrange comments for yaml/V3 bug fix
2020-03-30 10:51:47 -07:00
Kubernetes Prow Robot
7840b7f949
Merge pull request #2265 from pwittrock/merge3
...
Setters: support for setting string list fields
2020-03-17 09:44:30 -07:00
Phillip Wittrock
63ff34ffe2
Walk: opt-in to visiting map keys when walking map entries
2020-03-09 10:29:26 -07:00
Phillip Wittrock
370502ed4b
Setters: support for setting string list fields
2020-03-07 13:53:24 -08:00
Khris Richardson
fcfe798b75
convert tests to exercise openapi and inference
2020-03-03 18:50:02 -08:00
Kubernetes Prow Robot
caa8fdc3cd
Merge pull request #2245 from pwittrock/merge3
...
Use OpenAPI when 3-way merging resources
2020-03-03 12:51:46 -08:00
Phillip Wittrock
5d1a0346b5
Use OpenAPI when merging (3way) resources
...
- When merging (3way) resources use the patch strategy from the openAPI if the definition exists for the field
- Allow disabling of guessing patch strategy merge keys when no definition exists
- Support defining strategy and key directly on configuration fields through line and header coments
- Support attaching schema to parent fields of lists, and propagating -- e.g. that a field is a PodTemplate
2020-03-02 20:56:53 -08:00
Phillip Wittrock
052deacbb2
Add license to kfns_test
2020-02-27 15:49:53 -08:00
Jingfang Liu
ef76575ab6
add test for SetLabel and SetAnnotation
2020-02-27 13:37:36 -08:00
Jingfang Liu
39094f2aeb
add SetLabel function in kyaml library
2020-02-27 12:11:06 -08:00
Phillip Wittrock
154939803f
better support for reading / writing single resource yaml files
2020-02-19 08:16:07 -08:00
Kubernetes Prow Robot
6d58848970
Merge pull request #2035 from pwittrock/openapi
...
Introduce OpenAPI kyaml libraries
2020-01-09 09:35:45 -08:00
Phillip Wittrock
8a2c886ab2
update kyaml go.mod and go.sum
...
also update cmd/config,cmd/kubectl,cmd/resource
2020-01-09 08:50:11 -08:00
Phillip Wittrock
04f5e6c953
Functions for identifying and fixing yaml 1.1 compatbility issues
...
- Identify if a field value would parse as a non-string yaml 1.1 value
- Using OpenAPI Schema to get Resource's field type
- Format yaml so value will be parsed as the correct type using a yaml 1.1 parser
2020-01-08 10:47:11 -08:00
Phillip Wittrock
abeab51cae
Library for getting Resource and field Schema from OpenAPI
2020-01-08 10:47:11 -08:00
Phillip Wittrock
4628705494
Parse metadata directly instead of struct serialization hack
2020-01-07 16:24:52 -08:00
Phillip Wittrock
98431f6a00
fix kyaml issue where dropping Style created issues
...
dropping the node style creates a compatibility issue where quotes around "on" are dropped
because yaml.v3 interprets it as a string.
other yaml parsers interpret on as a bool value, and parse it as a bool rather than string.
fix: retain the original style so it is kept as quoted.
- fmt: don't drop the styles
- merge2: keep the style when merging elements
- setting a field: if changing the value of a scalar field, retain its style by default
2019-12-19 20:25:31 -08:00
Phillip Wittrock
eaaefc128f
Using single quote style when setting annotations
...
Annotations must be strings. Use single-quote style
so tools don't get confused about the type.
2019-12-16 18:04:46 -08:00
Phillip Wittrock
1e14cc93c2
Merge branch 'master' into enable_gocritic
2019-12-12 06:35:33 -08:00
Phillip Wittrock
4312ab3f4d
Fix panic in merge2 comment merging
2019-12-11 19:05:51 -08:00
Morten Torkildsen
1b3b8522f9
cli for status
2019-12-11 13:13:09 -08:00
Arthur Mello
0bace652c3
Move repeated variable content to constants following linter suggestion
2019-12-08 07:12:48 -03:00
Arthur Mello
0a8d7c2be2
Fix code to address complains from gocritic (assignOp, ifElseChain and appendAssign)
2019-12-06 16:34:27 -03:00
Arthur Mello
d4fa006ccb
Remove leading/trailing newlines following whitespace linter recommendation
2019-12-05 23:49:00 -03:00
Arthur Mello
a077482e99
Rename struct field to solve issue raised by go vet
2019-12-05 23:06:19 -03:00
Arthur Mello
df7688002a
Remove init function following gochecknoinits linter recommendation
2019-12-05 22:44:14 -03:00
Arthur Mello
e811da14d8
Rename variable, constants and struct fields following stylecheck linter recommendation
2019-12-05 22:39:29 -03:00
Arthur Mello
f2c7066088
Remove leading/trailing newlines following whitespace linter recommendation
2019-12-05 22:23:35 -03:00
Phillip Wittrock
3345464b25
kyaml: refactor command documentation into .md files from go files
...
No new documentation added.
2019-11-22 12:22:25 -08:00
Igor Zibarev
301e529a4a
kyaml: fix scopelint issues
2019-11-12 23:42:02 +03:00
Phillip Wittrock
b473faccca
Improve error handling in kyaml libraries
2019-11-12 08:53:55 -08:00
Phillip Wittrock
3db1111f8e
kyaml: rename annotations and fix linting
2019-11-07 15:46:30 -08:00
Phillip Wittrock
2e33a69388
Update documentation for kyaml package
2019-11-07 09:16:27 -08:00
Phillip Wittrock
efd7c8e3f7
kyaml: initial support for yaml and resource manipulation
2019-11-04 11:36:35 -08:00