Jeffrey Regan
3a01a63a01
Simplify code base.
...
- In ResMap, drop concept of internal Id to Resource
map. The ResMap is now (just) a list, allowing only
very particular edits.
- Resources should now be maintained in the order
loaded. A later PR can adjust tests to remove the
internal legacy sorting, and confirm order-out is
predictable from order-in. The PR would suppress
the sort in tests, and reorder the output to make
all tests pass again, and confirm that the new order
matched depth-first input traversal. The FromMap
fixture function was removed from all test inputs to
establish a predictable input order.
- Resources now have two 'Ids', OriginalId and
CurrentId. The former is fixed as
GVK-name-namespace at load time, the latter changes
during transformations. The latter can be used to
narrow name references when the former maps to
multiple resources. We allow bases to be loaded
more than once in a build (a diamond pattern), so
the OriginalId is not unique across the resources
set. The CurrentId is (and must be) unique, but is
constantly mutating. Failing to make this
distinction clear, and attempting to maintain a
mapping from a single mutating Id to a resource was
making the code too complex.
- Drop prefix/suffix from ResId - the ResId is now
immutable. A later PR can remove the distinction
with ItemId.
- This PR increases coverage of ResMap is since this
is a large refactor. Higher level tests didn't need
much change outside reordering of results at the
resource level.
2019-06-17 10:50:45 -07:00
jregan
755dd3d024
Add some utilities.
2019-06-12 20:43:39 -07:00
Jeffrey Regan
9c36ac28fa
Improve comments in name transform code.
2019-06-10 16:58:16 -07:00
Jeffrey Regan
449175e3a6
Add a sorting plugin.
2019-06-07 15:06:12 -07:00
jregan
0e4f9acb6e
Rename ErrorIfNotEqual to ErrorIfNotEqualSets
2019-06-06 20:20:48 -07:00
Jeffrey Regan
c63ebbdfc4
Preserve order when merging.
2019-06-06 20:01:39 -07:00
Jeffrey Regan
4162dbc2d8
Maintain resources in order loaded.
2019-06-06 15:55:57 -07:00
rohitsardesai83
b67d713bc0
Remove dependency on ghodss/yaml
2019-04-25 23:47:01 +05:30
jregan
6bfd7cff72
Improve error handling during var resolution.
2019-02-26 14:05:38 -08:00
jregan
d4d993a53c
Add more resid test coverage.
2019-02-16 14:26:43 -08:00
Jingfang Liu
84057436d6
Combine generatorArgs and generatorOptions into options of Resource
2019-01-31 15:32:32 -08:00
Jingfang Liu
38f0ca9f03
Allow namespaced object to refer cluster level object
2019-01-14 15:54:09 -08:00
Jeffrey Regan
77b44f570a
Reduce log noise.
2018-12-13 16:29:11 -08:00
Jeffrey Regan
e9b19281b2
Add some resId tests to support refactor.
2018-12-13 14:19:04 -08:00
zoncoen
a14609f730
add suffix field to ResId
2018-11-14 12:44:33 +09:00
Jingfang Liu
83bc67c8ad
remove glog dependency from kustomize code ( #542 )
2018-11-12 11:35:00 -08:00
Jeffrey Regan
d05bb6b199
Add/fix some documentation and vars names.
2018-11-07 12:36:25 -08:00
Jingfang Liu
90c88d7f96
skip filtering resmap when the resource is a cluster level resource
2018-10-18 11:09:24 -07:00
Jeffrey Regan
1af119db80
Further isolate unstructured with factories.
2018-10-08 14:21:48 -07:00
jregan
4eb2757847
Further isolate unstructured with factories.
2018-10-08 11:52:38 -07:00
jregan
0f5a39f328
Hide unstructured.Unstructured behind interface.
2018-10-08 11:12:06 -07:00
Ryan Cox
f2f1125e44
add tests for resmap
2018-10-07 21:57:20 -07:00
Jeffrey Regan
c9887e8c15
WIP residPackage
2018-10-05 12:58:48 -07:00
Jeffrey Regan
56e11b57e3
Isolate generator calls.
2018-10-03 12:09:53 -07:00
jregan
8f150d84ae
Introduce k8sdeps package to isolate k8s deps.
2018-10-02 11:36:53 -07:00
jregan
24733315d7
Add tests for patch/resource reading.
2018-10-01 14:25:15 -07:00
jregan
6d935b6a4a
Fix some Go nits.
2018-09-28 18:08:36 -07:00
Jeffrey Regan
fb355eb320
Introduce gvk package to isolate apimachinery schema.
2018-09-26 15:02:38 -07:00
Jingfang Liu
64fdb8d760
change github.com/kubernetes-sigs to sigs.k8s.io ( #343 )
...
* change github.com/kubernetes-sigs to sigs.k8s.io
* change go_import_path in .travis.yml
2018-09-12 12:41:38 -07:00
Jingfang Liu
829cb2baa3
address comments
2018-09-05 16:08:24 -07:00
Jingfang Liu
7b301446fa
filter by namespace and nameprefix in namereference transformer
2018-09-05 13:17:44 -07:00
Jingfang Liu
d782abb214
Update patch factory and add multi transformer with checking conflicts
2018-09-04 09:13:26 -07:00
Jingfang Liu
3d9d4bd36f
address comments
2018-08-27 15:44:42 -07:00
Jeffrey Regan
735a93d000
Fix some Go nits.
2018-08-23 10:30:32 -07:00
Ivan Shvedunov
2ae00db6a9
Don't crash on resource load errors
2018-08-14 22:14:12 +03:00
Jingfang Liu
de4d8b7dfa
remove glob support from kustomization.yaml
2018-07-30 16:28:40 -07:00
Jingfang Liu
2e7093e67f
ignore the empty YAML object
2018-07-30 12:58:11 -07:00
Jingfang Liu
58bc4b14a2
Add support for using common base
2018-07-27 10:16:44 -07:00
Jeffrey Regan
564b0d6827
Fix cluster of silly Go nits.
2018-07-18 17:45:17 -07:00
Jingfang Liu
6392e6629f
Add glob support
2018-06-27 10:54:12 -07:00
fanzhangio
6a67183ed7
Enhancement for format error message
...
- add yaml format error handler
- silent usage when build command fails
2018-06-25 07:35:43 -07:00
Jingfang Liu
934e37d781
add unit test and address comments
2018-06-11 14:52:31 -07:00
Jingfang Liu
e017d04a16
make generated configmaps composable
2018-06-11 12:07:16 -07:00
jregan
211cda054e
Some cleanup refactoring in app package.
2018-06-11 09:51:03 -07:00
jregan
e002b69ffa
Add more test coverage for RawResources.
2018-06-10 20:09:31 -07:00
Jeff Regan
71b7e07b02
Merge pull request #77 from uthark/golint
...
Fix go lint error and add golint checks to a pre-commit hook
2018-06-10 10:35:56 -07:00
Oleg Atamanenko
c994130005
Fix go lint error and add golint checks to a pre-commit hook
2018-06-09 23:05:26 -04:00
jregan
ccd255f323
Reduce unstruct notation noise in Resource construction.
2018-06-09 08:10:57 -07:00
jregan
a42c72b2e0
Reduce indirection.
2018-06-07 21:53:55 -07:00
Jeffrey Regan
2e0e43cd76
Improve package doc.
2018-06-06 14:15:50 -07:00