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