Commit Graph

651 Commits

Author SHA1 Message Date
jregan
99c9edfc3d Drop close in timed call. 2020-12-28 08:31:42 -08:00
jregan
24c4c66403 Close 3343 2020-12-26 10:43:58 -08:00
jregan
6a3bb5df44 Drop another difference between kyaml and apimachinery 2020-12-26 10:12:33 -08:00
jregan
dd1df5a30e Remaining problems. 2020-12-26 09:28:01 -08:00
jregan
eb26d79fa0 Isolate patch conflation problem to one test.
See #3394
2020-12-26 08:41:48 -08:00
jregan
1426137883 Isolate scalar quoting oddities to one test set.
The apimachinery code path, in its final marshalling
for output, calls Marshall

  https://github.com/go-yaml/yaml/blob/v2/yaml.go#L199

This code path (via apimachinery Unstructured types)
has no JSON schema tags

  https://yaml.org/spec/1.2/spec.html#id2803311

so it adds quotes to values that smell like
booleans and ints (e.g. `false` becomes `"false"`).

The kyaml code path, OTOH, uses such tags,
so generally does not quote ints and booleans.

This PR isolates this difference in behavior to
one set of tests (using data fields in configmaps
in api/krusty/configmaps_test.go) so that
they don't confuse other tests that cover
completely different behaviors.
2020-12-23 17:08:25 -08:00
Jeff Regan
1ffd790cfb Merge pull request #3388 from Shell32-Natsu/secret-type
Fix type ignored in secret generator
2020-12-22 17:51:07 -08:00
Jeff Regan
454906d093 Merge pull request #3389 from monopole/moreMergeTests
More merge tests, clearer method names.
2020-12-22 17:49:26 -08:00
jregan
8b97274af3 More merge tests, clearer method names. 2020-12-22 17:26:12 -08:00
Donny Xia
b1056b43cb Merge pull request #3383 from antoninbas/add-role-resourceNames-to-configMap-builtin-nameref-resolver
Add Role / ClusterRole resourceNames to ConfigMap nameref resolver
2020-12-22 14:43:19 -08:00
Donny Xia
e411942a74 Fix type ignored in secret generator 2020-12-22 14:37:13 -08:00
jregan
9ddf0fe304 Eliminate extraneous label and anno maps. 2020-12-22 08:37:40 -08:00
Jeff Regan
8a952a1b26 Merge pull request #3384 from monopole/badBlank
Fix roleref test failing under enableKyaml
2020-12-22 06:47:55 -08:00
jregan
fff484e98b Fix test failing under enableKyaml 2020-12-22 06:24:27 -08:00
Antonin Bas
e819a2ba9d Add Role / ClusterRole resourceNames to ConfigMap nameref resolver
While it is possible to use a kustomizeconfig.yml for this, with a
custom namereference, this functionality should probably be built-in.

This is similar to previous PRs, like this one:
https://github.com/kubernetes-sigs/kustomize/pull/592
2020-12-21 21:02:19 -08:00
jregan
735befef19 Add kunstruct impl of Get/SetDataMap, replace Resource.Merge 2020-12-21 07:22:03 -08:00
jregan
338910d36c In module replacements, drop specific version numbers. 2020-12-20 16:23:23 -08:00
jregan
002215d719 Unpin kyaml 2020-12-20 10:31:17 -08:00
jregan
c32a809dbd Fix formatting nit with enableKyaml 2020-12-17 11:21:46 -08:00
jregan
bd27d5f8bb Fix apiversion slash 2020-12-17 08:42:15 -08:00
Kubernetes Prow Robot
0aa250c6e2 Merge pull request #3359 from Shell32-Natsu/resmap-from-rnodes
Avoid error when the node has local-config
2020-12-16 11:00:30 -08:00
Jeff Regan
e269ad4a80 Merge pull request #3356 from JaredTan95/update_extension_version
upgrade admissionregistration.k8s.io/v1beta1 version to v1
2020-12-16 10:44:08 -08:00
JaredTan95
2361b70967 fix unit test 2020-12-16 10:05:04 +08:00
Donny Xia
d016326877 avoid error when the node has local-config 2020-12-15 13:29:19 -08:00
Donny Xia
67e445c10b Merge pull request #3353 from epcim/helmValuesOnInflatorConfig-plugin
Helm values on inflator config plugin
2020-12-15 10:21:47 -08:00
Petr Michalec
494977b9d0 helm values on inflator config - builtin
Signed-off-by: Petr Michalec <epcim@apealive.net>
2020-12-15 08:38:59 +01:00
Petr Michalec
fa69d4ba9d helm values on inflator config - types
Signed-off-by: Petr Michalec <epcim@apealive.net>
2020-12-15 08:37:34 +01:00
JaredTan95
97402f1136 update crd_test.go api version. 2020-12-15 12:20:10 +08:00
JaredTan95
1329afa3ca update imagetag_test.go api version. 2020-12-15 12:19:37 +08:00
Takao Shibata
a3bf3ba608 Add topologySpreadConstraints to builtin label field 2020-12-14 14:18:02 +09:00
Donny Xia
485b8121d3 fix wnode get slice issue 2020-12-10 15:12:57 -08:00
jregan
81ca271e62 Flip default value of --enable_kyaml from false to true. 2020-12-10 10:12:49 -08:00
jregan
6bbc829593 Add a loader test. 2020-12-09 17:17:21 -08:00
Jeff Regan
05eccab823 Update loader.go 2020-12-09 15:17:52 -08:00
jregan
575b4efc18 Pin to kyaml v0.10.3 cliutils v0.22.1 2020-12-07 16:26:52 -08:00
jregan
e1fd74bb61 Automated Go mod cache updates. 2020-12-07 13:23:20 -08:00
Jeff Regan
8a673b82bd Merge pull request #3287 from yujunz/getter
Upgrade go-getter
2020-12-07 13:11:26 -08:00
Jeff Regan
d2e995b3e2 Merge pull request #3306 from thatsmydoing/single-fetch
Don't fetch default branch if ref is specified
2020-12-07 13:10:26 -08:00
Jeff Regan
51ba54ad82 Revert "helm values on inflator config" 2020-12-07 12:52:31 -08:00
Jeff Regan
4144775a3b Merge pull request #3316 from epcim/helmValuesOnInflatorConfigSpec
helm values on inflator config
2020-12-07 12:51:42 -08:00
jregan
d08b9c30ee What is this? 2020-12-07 10:16:30 -08:00
Petr Michalec
f6e5eedee2 helm values on inflator config spec. 2020-12-07 13:49:30 +01: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
1a5aa63d54 Spelling nits. 2020-12-04 12:29:39 -08:00
Natasha Sarkar
deb2b21cbe added allowresourceidchanges bool to options struct 2020-12-02 18:02:09 -08:00
jregan
dbaa2d6092 hacking 2020-12-02 10:23:13 -08:00
Thomas Dy
6445e03d1a Don't fetch default branch if ref is specified
Currently, we always fetch the default branch with an initial git clone
and then fetch the ref after if it's specified. This changes it to only
make one fetch instead of two if a ref is specified.
2020-12-02 16:16:30 +09:00
Kubernetes Prow Robot
a6c2e982f9 Merge pull request #3292 from Shell32-Natsu/helm-extra-args
Add field extraArgs to helm generator
2020-11-30 19:50:49 -08:00
jregan
d5ce26e423 Patchtransformers - drop copied code, improve deletion handling. 2020-11-30 18:43:35 -08:00
jregan
32dd194aca Automated go.sum updates. 2020-11-30 18:16:23 -08:00