Compare commits

...

142 Commits

Author SHA1 Message Date
Jeff Regan
4ac0f59b8a Merge pull request #3637 from monopole/pinToCmdConfig
Pin to cmd/config v0.9.3
2021-02-25 07:56:06 -08:00
monopole
2b9c69f964 Pin to cmd/config v0.9.3 2021-02-25 07:03:38 -08:00
Jeff Regan
437c960d86 Merge pull request #3636 from monopole/moregosum
More go sum changes.
2021-02-25 07:02:01 -08:00
monopole
131aba8f14 More go sum changes. 2021-02-25 07:01:32 -08:00
Jeff Regan
ada02703cf Merge pull request #3634 from monopole/pinToKyamlAndCliUtils
Pin to kyaml v0.10.11
2021-02-25 07:00:31 -08:00
monopole
f96dfb5772 Pin to kyaml v0.10.11 2021-02-24 21:30:40 -08:00
Jeff Regan
57b3e70cef Merge pull request #3633 from monopole/goSumFix
More go tidy adjustments.
2021-02-24 20:09:02 -08:00
monopole
f4fbcc6fb4 More go tidy adjustments.
ALLOW_MODULE_SPAN
2021-02-24 19:50:37 -08:00
Jeff Regan
867da9631a Merge pull request #3632 from monopole/dropMoreDeps
Remove tool deps from shippable modules.
2021-02-24 18:09:20 -08:00
monopole
cd2b0fce7e Remove tool deps from shippable modules. 2021-02-24 17:37:16 -08:00
Kubernetes Prow Robot
66504c263c Merge pull request #3631 from natasha41575/KrustyTestPaths
Change paths for krusty tests to relative, and have top level be '.'
2021-02-24 16:55:25 -08:00
Jeff Regan
bce4f75fc5 Merge pull request #3630 from natasha41575/UseCustomOpenApiSchema
kustomization openapi data should be parsed for custom schema
2021-02-24 16:32:05 -08:00
Natasha Sarkar
8b082aff5a Change paths for krusty tests to relative, and have top level be '.' instead of 'app' 2021-02-24 16:23:45 -08:00
Natasha Sarkar
48e4cad72e kustomization openapi data should be parsed for custom schema 2021-02-24 15:27:50 -08:00
Kubernetes Prow Robot
30e53a992b Merge pull request #3617 from natasha41575/UseCustomOpenApiSchema
add openapi/path field to use custom openapi schema document
2021-02-24 15:03:24 -08:00
Kubernetes Prow Robot
2df9f85a20 Merge pull request #3621 from natasha41575/OpenApiFetchCommand
added `kustomize openapi fetch` command to get schema from local cluster
2021-02-24 14:37:24 -08:00
Jeff Regan
01733d970a Merge pull request #3608 from argyle-systems/repeat-base-test
Add repeatbase_test.
2021-02-24 14:22:16 -08:00
Kubernetes Prow Robot
ac178c539c Merge pull request #3629 from pwittrock/main
Fork starlib/util for serialization libs.
2021-02-24 14:11:26 -08:00
Phillip Wittrock
61dcb3f548 Fork starlib/util for serialization libs.
Prevents pulling in excessive transitive deps.

See: https://github.com/kubernetes/kubernetes/pull/98946
2021-02-24 11:17:08 -08:00
Chico Venancio
6f15b1e56d Simplify paths and rename objects 2021-02-24 15:13:32 -03:00
Kubernetes Prow Robot
9a94c5ecd3 Merge pull request #3613 from phanimarupaka/DefaultRFalseForListSetters
List setters default false for recurse-subpackages
2021-02-24 07:56:50 -08:00
Kubernetes Prow Robot
2ba148d9b5 Merge pull request #3615 from pwittrock/main
fn framework support for legacy kustomize plugin io
2021-02-24 07:40:51 -08:00
Natasha Sarkar
5a0e193002 moved common resource definitions to separate function 2021-02-23 17:21:16 -08:00
Jeff Regan
3265f64cd5 Merge pull request #3546 from zhijianli88/master
Fix ineffectual assignment to err
2021-02-22 10:24:11 -08:00
Jeff Regan
c2b1ab8303 Add makeKubectlPr.sh 2021-02-22 06:51:37 -08:00
Natasha Sarkar
7dd0ade0f9 add openapi/path field to use custom openapi schema document 2021-02-19 14:19:22 -08:00
Natasha Sarkar
316e4314ed added openapi fetch command to get schema from local cluster 2021-02-19 11:08:31 -08:00
Donny Xia
324353eaf6 Merge pull request #3619 from natasha41575/PatchDeleteOnObjectPanic
fixed panic on patch delete for objects
2021-02-19 10:32:36 -08:00
Natasha Sarkar
6361c3b1b7 fixed panic on patch delete for objects 2021-02-18 10:47:13 -08:00
Phillip Wittrock
f7d13ade35 fn framework support for legacy kustomize plugin io 2021-02-17 09:19:02 -08:00
Kubernetes Prow Robot
99e82890e1 Merge pull request #3606 from qrilka/patch-1
Add name reference for fastcgi-params-configmap
2021-02-17 08:39:09 -08:00
Kubernetes Prow Robot
4a35bfa84c Merge pull request #3612 from Shell32-Natsu/edit-metadata
fix edit commands remove metadata
2021-02-16 15:09:06 -08:00
Phani Teja Marupaka
27f28d5fe0 List setters default false for recurse-subpackages 2021-02-16 14:48:19 -08:00
Donny Xia
c04cf01b45 fix test 2021-02-16 14:31:32 -08:00
Donny Xia
5614852b33 fix edit commands remove metadata 2021-02-16 14:17:09 -08:00
Kubernetes Prow Robot
4f23ae5e1a Merge pull request #3611 from Shell32-Natsu/release-doc
add doc for releasing image
2021-02-16 13:25:06 -08:00
Donny Xia
3bd088a77c update links 2021-02-16 12:57:41 -08:00
Chico Venancio
fe30a9321a Adds repeatbase_test 2021-02-16 16:23:53 -03:00
Donny Xia
c715b82ad7 add doc for releasing image 2021-02-16 11:03:08 -08:00
Kirill Zaborsky
44d308cbba Add name reference for fastcgi-params-configmap
See https://kubernetes.github.io/ingress-nginx/user-guide/fcgi-services/#the-nginxingresskubernetesiofastcgi-params-configmap-annotation
2021-02-15 12:38:41 +03:00
Jeff Regan
c9e7f627fe Update makeKubectlPr.sh 2021-02-13 15:29:39 -08:00
Jeff Regan
00fa7e636c Merge pull request #3604 from monopole/tweakMake
git stTweak make
2021-02-13 14:04:49 -08:00
monopole
c7a504c9cf Add 4.0.1 to example tests and unpin. 2021-02-13 13:51:59 -08:00
Jeff Regan
516ff1fa56 Merge pull request #3603 from monopole/pinForRelease
Pin for kustomize/v4.0.1 release.
2021-02-13 13:07:33 -08:00
monopole
81562a7a37 Pin for kustomize/v4.0.1 release. 2021-02-13 12:55:18 -08:00
Jeff Regan
ba0baa828c Merge pull request #3600 from natasha41575/TestExamplesAgainst4.0
Test examples against 4.0
2021-02-13 12:47:30 -08:00
Jeff Regan
420f03d429 Merge pull request #3601 from monopole/addBuildTest
Hyphenate flags and add more build command tests.
2021-02-13 12:26:48 -08:00
monopole
6cf48442df Hyphenate flags and add more build command tests. 2021-02-13 11:59:08 -08:00
Jeff Regan
8cf7bc67bb Create makeKubectlPr.sh 2021-02-13 07:26:13 -08:00
Natasha Sarkar
48d6af6e38 test examples against kustomize 4.0 2021-02-12 17:08:45 -08:00
Kubernetes Prow Robot
0309a0fb07 Merge pull request #3599 from natasha41575/unpinEverything
Back to development mode; unpin the modules
2021-02-12 15:33:04 -08:00
Natasha Sarkar
d7b29455ab Back to development mode; unpin the modules 2021-02-12 15:09:16 -08:00
Natasha Sarkar
a414f75f1b Merge pull request #3598 from monopole/majorVersionChangeToV4
Increment major version from v3 to v4
2021-02-12 14:40:50 -08:00
monopole
1c3832f897 Increment major version from v3 to v4 2021-02-12 13:26:41 -08:00
Jeff Regan
3ec62c6e26 Merge pull request #3597 from monopole/fixGoSum
Fix crawl/go.sum
2021-02-12 13:20:47 -08:00
Jeff Regan
c7ee4c281e Fix crawl/go.sum 2021-02-12 13:19:37 -08:00
Jeff Regan
471ff0c4bb Merge pull request #3595 from natasha41575/pinToApi
Pin to api v0.8.1
2021-02-12 13:01:53 -08:00
Natasha Sarkar
cd0d416a11 Pin to api v0.8.1 2021-02-12 12:40:49 -08:00
Jeff Regan
4a1a2bfdd8 Merge pull request #3594 from natasha41575/pinToCmdConfig
Pin to cmd/config v0.9.2
2021-02-12 12:33:25 -08:00
Natasha Sarkar
8d75824bb6 Pin to cmd/config v0.9.2 2021-02-12 12:30:01 -08:00
Jeff Regan
232e615afe Merge pull request #3592 from natasha41575/pinToKyaml
Pin to kyaml v0.10.10
2021-02-12 12:20:04 -08:00
Natasha Sarkar
50bfa0564c Pin to kyaml v0.10.10 2021-02-12 12:04:11 -08:00
Jeff Regan
d0b101dc90 Update README.md 2021-02-12 11:24:36 -08:00
Jeff Regan
526ae9ff57 Merge pull request #3590 from monopole/morePublicSutff
Make more high level build methods public.
2021-02-12 11:21:37 -08:00
monopole
b553997447 Make more high level build methods public. 2021-02-12 10:58:20 -08:00
Jeff Regan
66b7c5968b Merge pull request #3589 from monopole/dropEnableKyamlFlag
Delete --enable_kyaml flag.
2021-02-12 10:57:28 -08:00
monopole
003b4946a2 Delete --enable_kyaml flag. 2021-02-12 09:26:36 -08:00
Kubernetes Prow Robot
2d7b6a57ca Merge pull request #3586 from monopole/dropGetter
Drop go-getter use.
2021-02-11 19:14:47 -08:00
Kubernetes Prow Robot
ecda4f423e Merge pull request #3584 from Shell32-Natsu/binarydata
fix merging ConfigMap with binaryData
2021-02-11 17:12:47 -08:00
monopole
9dc4004fbe Tidy go.sum after dropping go-getter. 2021-02-11 16:48:40 -08:00
monopole
a815774e5e Drop the go-getter dependence. 2021-02-11 16:48:39 -08:00
Kubernetes Prow Robot
f170af70fd Merge pull request #3582 from alexal/fix/3575
Kustomize file should be ignored when adding resources and components
2021-02-11 16:28:47 -08:00
Donny Xia
6518393f5d support binaryData merge 2021-02-11 15:34:16 -08:00
Donny Xia
dd72ea1e6a add functions for binaryData 2021-02-11 15:34:16 -08:00
Jeff Regan
dbbe340b4f Simplify gorepomod manager 2021-02-11 15:25:19 -08:00
Jeff Regan
38b30b0edc Merge pull request #3583 from monopole/addKyamlReplacements
Add kyaml replacements to modules with dependency on api.
2021-02-11 15:18:46 -08:00
Jeff Regan
10f9a5afda Merge pull request #3580 from pwittrock/main
Support fnframework to write expected testdata based on observed results
2021-02-11 15:06:38 -08:00
monopole
8a61bff299 Run: gorepomod unpin kyaml api --doIt 2021-02-11 15:05:01 -08:00
monopole
52fbe73d49 Modify gorepomod to unpin conditionally. 2021-02-11 15:04:16 -08:00
Alex Rodin
17ecec2f0a Kustomize file should be ignored when adding resources and components 2021-02-11 15:53:47 -05:00
Jeff Regan
aeb6024e72 Merge pull request #3581 from monopole/dropHashicorpMultierror
Drop hashicorp multierror due to MPL
2021-02-11 12:42:44 -08:00
monopole
e33addc16b Drop hashicorp multierror due to MPL 2021-02-11 12:24:22 -08:00
Phillip Wittrock
2db4121c6a Support fnframework to write expected testdata based on observed results 2021-02-11 09:48:50 -08:00
Jeff Regan
c764bc1618 Merge pull request #3573 from monopole/unpinEverything
Unpin everything, back to development mode.
2021-02-09 17:34:23 -08:00
monopole
2d2fbe9f14 Unpin everything, back to development mode. 2021-02-09 16:42:11 -08:00
Jeff Regan
7073371c1a Merge pull request #3572 from monopole/fix3571
Sort release versions using a version sensitive sort
2021-02-09 16:30:17 -08:00
monopole
dc25a6a1ce Fix #3571 with a -V 2021-02-09 16:28:31 -08:00
Jeff Regan
602ad8aa98 Merge pull request #3569 from monopole/pinToApi
Pin to api v0.8.0
2021-02-09 15:50:17 -08:00
monopole
1fa3b224b1 Pin to api v0.8.0 2021-02-09 14:44:12 -08:00
Jeff Regan
5a328ababf Merge pull request #3568 from monopole/deleteK8sIoDeps
Delete dependence on k8s.io/...
2021-02-09 14:30:54 -08:00
monopole
3ae1aa7cd7 Delete dependence on k8s.io/... 2021-02-09 14:15:54 -08:00
monopole
703fee93af Delete kyaml replacements. 2021-02-09 13:00:50 -08:00
Jeff Regan
3e4a59c1cd Merge pull request #3567 from monopole/unpinEverything
Unpin from api.
2021-02-09 11:46:29 -08:00
monopole
f98edf1b55 Unpin from api. 2021-02-09 11:22:46 -08:00
Jeff Regan
e41d94ddef Merge pull request #3566 from monopole/pinToApi
Pin to api
2021-02-09 11:18:44 -08:00
monopole
0508c89b4b Pin to api 2021-02-09 10:59:18 -08:00
Jeff Regan
e653cffab6 Merge pull request #3565 from monopole/pinToCmdConfig
Pin to cmd/config v0.9.1
2021-02-09 10:38:46 -08:00
monopole
e036f85b71 Pin to cmd/config v0.9.1 2021-02-09 10:17:53 -08:00
Jeff Regan
cee1324d18 Merge pull request #3564 from kubernetes-sigs/pinToKyamlAndCliUtils
Pin to kyaml v0.10.9
2021-02-09 10:14:01 -08:00
monopole
b062ce0f66 Pin to kyaml v0.10.9 2021-02-09 09:57:21 -08:00
Jeff Regan
fbcb15b15f Merge pull request #3563 from monopole/commitGeneratedCode
Commit generated doc changes.
2021-02-09 09:19:32 -08:00
monopole
8eb062637f Commit generated doc changes. 2021-02-09 09:18:31 -08:00
Jeff Regan
2fe85be932 Merge pull request #3557 from natasha41575/PatchMergeIssue
fixed ports merging issue and refactored some kyaml/walk code
2021-02-09 08:48:19 -08:00
Jeff Regan
44edfa87fe Merge pull request #3562 from monopole/changeGenMessage
Fix message in generated code.
2021-02-09 08:08:04 -08:00
monopole
bbccee0219 Fix message in generated code. 2021-02-09 07:34:32 -08:00
Jeff Regan
7cdc6cbe2f Merge pull request #3561 from monopole/unpin
Unpin; back to development mode.
2021-02-09 07:13:20 -08:00
monopole
264bfa8998 Unpin; back to development mode. 2021-02-09 06:54:18 -08:00
Jeff Regan
041181afe4 Merge pull request #3560 from monopole/dropQuantityProto
Drop unused quantity protobuf - avoid bad init.
2021-02-09 06:36:56 -08:00
monopole
5db79285a7 Drop unused quantity protobuf - avoid bad init. 2021-02-09 06:19:13 -08:00
Jeff Regan
556692c9f5 Merge pull request #3556 from monopole/dropKubeOpenAi
Drop dependence on k8s.io/kube-openapi
2021-02-08 18:01:02 -08:00
Natasha Sarkar
71f4cecb4c fixed ports merging issue and refactored some kyaml.walk code 2021-02-08 17:49:10 -08:00
monopole
d4d5fca2a5 Drop dependence on k8s.io/kube-openapi 2021-02-08 17:31:54 -08:00
Jeff Regan
811e1dca05 Merge pull request #3554 from monopole/pinToCmdConfig
Pin to cmd/config v0.9.0
2021-02-08 16:46:36 -08:00
monopole
09bc6e76b1 Pin to cmd/config v0.9.0 2021-02-08 16:30:57 -08:00
Jeff Regan
065b14c5c5 Merge pull request #3553 from monopole/pinToKyamlAndCliUtils
Pin to kyaml v0.10.8
2021-02-08 16:24:49 -08:00
monopole
adb2f2237a Pin to kyaml v0.10.8 2021-02-08 16:09:17 -08:00
Jeff Regan
024bbd0777 Merge pull request #3549 from monopole/removeApiMachDep
Remove grep's dependence on apimachinery.
2021-02-08 15:34:53 -08:00
monopole
ca1929abfb Remove grep's dependence on apimachinery. 2021-02-08 15:16:46 -08:00
Jeff Regan
a13ef4da65 Update Makefile 2021-02-08 15:14:47 -08:00
Jeff Regan
81ec59fa62 Update Makefile 2021-02-08 14:58:31 -08:00
Jeff Regan
075a2d6c0f Merge pull request #3552 from monopole/tweakCopier
Fix prefix bug in copier.
2021-02-08 14:45:12 -08:00
monopole
1df430255a Fix prefix bug in copier. 2021-02-08 14:39:25 -08:00
Jeff Regan
94d06e1e18 Merge pull request #3550 from Shell32-Natsu/value-add
fix forward slash in value add path
2021-02-08 13:39:58 -08:00
Jeff Regan
c3b240639d Merge pull request #3551 from monopole/fixKyamlMake
Normalize deps in kyaml makefile.
2021-02-08 13:34:40 -08:00
monopole
4de6db3d59 Normalize deps in makefile. 2021-02-08 13:21:42 -08:00
Donny Xia
58216d1d33 fix forward slash in value add path 2021-02-08 13:11:24 -08:00
Jeff Regan
4c456d60a4 Merge pull request #3548 from monopole/moveCopier
Move the k8s-related code generator.
2021-02-08 12:49:41 -08:00
monopole
582bc4de01 Move the k8s code generator. 2021-02-08 12:32:13 -08:00
Li Zhijian
a167084ccf api/internal/crawl/index/elasticsearch: Fix ineffectual assignment to err
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
2021-02-08 13:55:17 +08:00
Jeff Regan
a3a11bf3f4 Merge pull request #3545 from monopole/testExamplesAgainstLatestReleases
Test examples against latest releases.
2021-02-07 10:52:26 -08:00
monopole
4e96502ec6 Test examples against latest releases. 2021-02-07 10:31:34 -08:00
Jeff Regan
1ae8303bdc Merge pull request #3544 from monopole/pinToApi
Pin to api v0.7.3
2021-02-07 08:56:03 -08:00
monopole
41df2bed1f Pin to api v0.7.3 2021-02-07 08:40:52 -08:00
Jeff Regan
1f1304194d Update cloudbuild.sh 2021-02-07 07:57:10 -08:00
Jeff Regan
4157933c8d Update cloudbuild.sh 2021-02-07 07:47:06 -08:00
Jeff Regan
a79253e02f Merge pull request #3543 from monopole/releaserUpdates
Use goreleaser/v0.155.0, --parallelism 4
2021-02-07 07:21:14 -08:00
monopole
3b35b121b3 Use goreleaser/v0.155.0, --parallelism 4 2021-02-07 07:19:39 -08:00
Jeff Regan
3c94d20599 Deleting goarch=arm build, leaving arm64
Hitting hard step limit of 10m
Increasing timeout field in cloudbuild.yaml past 10m seems to have no effect.
Maybe break goreleaser step into multiple substeps?
2021-02-06 09:45:01 -08:00
Jeff Regan
1faeb91cc4 Set build timeout=800s, goreleaser timeout =720s 2021-02-06 09:16:02 -08:00
Jeff Regan
9f1ef993a1 Set FlagEnableKyamlDefaultValue = true 2021-02-06 08:31:12 -08:00
Jeff Regan
55d8cb3d3a Merge pull request #3541 from monopole/pinToApi
Pin to api v0.6.9
2021-02-06 08:16:35 -08:00
monopole
a684592639 Pin to api v0.6.9 2021-02-06 07:59:54 -08:00
281 changed files with 97654 additions and 13270 deletions

View File

@@ -26,8 +26,8 @@ verify-kustomize: \
lint-kustomize \ lint-kustomize \
test-unit-kustomize-all \ test-unit-kustomize-all \
test-examples-kustomize-against-HEAD \ test-examples-kustomize-against-HEAD \
test-examples-kustomize-against-3.9.2 \ test-examples-kustomize-against-4.0 \
test-examples-kustomize-against-3.8.9 test-examples-kustomize-against-3.10
# The following target referenced by a file in # The following target referenced by a file in
# https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/kustomize # https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/kustomize
@@ -39,8 +39,8 @@ prow-presubmit-check: \
test-unit-cmd-all \ test-unit-cmd-all \
test-go-mod \ test-go-mod \
test-examples-kustomize-against-HEAD \ test-examples-kustomize-against-HEAD \
test-examples-kustomize-against-3.9.2 \ test-examples-kustomize-against-4.0 \
test-examples-kustomize-against-3.8.9 test-examples-kustomize-against-3.10
.PHONY: verify-kustomize-e2e .PHONY: verify-kustomize-e2e
verify-kustomize-e2e: test-examples-e2e-kustomize verify-kustomize-e2e: test-examples-e2e-kustomize
@@ -79,6 +79,11 @@ $(MYGOBIN)/gorepomod:
cd cmd/gorepomod; \ cd cmd/gorepomod; \
go install . go install .
# Build from local source.
$(MYGOBIN)/k8scopy:
cd cmd/k8scopy; \
go install .
# Build from local source. # Build from local source.
$(MYGOBIN)/pluginator: $(MYGOBIN)/pluginator:
cd cmd/pluginator; \ cd cmd/pluginator; \
@@ -98,13 +103,13 @@ $(MYGOBIN)/kustomize:
install-tools: \ install-tools: \
$(MYGOBIN)/goimports \ $(MYGOBIN)/goimports \
$(MYGOBIN)/golangci-lint-kustomize \ $(MYGOBIN)/golangci-lint-kustomize \
$(MYGOBIN)/gh \
$(MYGOBIN)/gorepomod \ $(MYGOBIN)/gorepomod \
$(MYGOBIN)/helm \
$(MYGOBIN)/k8scopy \
$(MYGOBIN)/mdrip \ $(MYGOBIN)/mdrip \
$(MYGOBIN)/pluginator \ $(MYGOBIN)/pluginator \
$(MYGOBIN)/prchecker \ $(MYGOBIN)/prchecker \
$(MYGOBIN)/stringer \ $(MYGOBIN)/stringer
$(MYGOBIN)/helm
### Begin kustomize plugin rules. ### Begin kustomize plugin rules.
# #
@@ -221,7 +226,7 @@ build-kustomize-api: $(builtinplugins)
cd api; go build ./... cd api; go build ./...
.PHONY: generate-kustomize-api .PHONY: generate-kustomize-api
generate-kustomize-api: generate-kustomize-api: $(MYGOBIN)/k8scopy
cd api; go generate ./... cd api; go generate ./...
.PHONY: test-unit-kustomize-api .PHONY: test-unit-kustomize-api
@@ -276,12 +281,12 @@ test-examples-kustomize-against-HEAD: $(MYGOBIN)/kustomize $(MYGOBIN)/mdrip
./hack/testExamplesAgainstKustomize.sh HEAD ./hack/testExamplesAgainstKustomize.sh HEAD
.PHONY: .PHONY:
test-examples-kustomize-against-3.9.2: $(MYGOBIN)/mdrip test-examples-kustomize-against-4.0: $(MYGOBIN)/mdrip
./hack/testExamplesAgainstKustomize.sh v3.9.2 ./hack/testExamplesAgainstKustomize.sh v4@v4.0.1
.PHONY: .PHONY:
test-examples-kustomize-against-3.8.9: $(MYGOBIN)/mdrip test-examples-kustomize-against-3.10: $(MYGOBIN)/mdrip
./hack/testExamplesAgainstKustomize.sh v3.8.9 ./hack/testExamplesAgainstKustomize.sh v3@v3.10.0
# linux only. # linux only.
# This is for testing an example plugin that # This is for testing an example plugin that

View File

@@ -64,7 +64,7 @@ func (fltr Filter) filter(obj *yaml.RNode) error {
// found the field -- set its value // found the field -- set its value
return fltr.SetValue(obj) return fltr.SetValue(obj)
} }
if obj.IsTaggedNull() { if obj.IsTaggedNull() || obj.IsNil() {
return nil return nil
} }
switch obj.YNode().Kind { switch obj.YNode().Kind {

View File

@@ -692,7 +692,7 @@ spec:
spec: spec:
containers: containers:
- name: consul - name: consul
image: "hashicorp/consul:1.9.1" image: "dashicorp/consul:1.9.1"
ports: ports:
- containerPort: 8500 - containerPort: 8500
name: http name: http
@@ -721,14 +721,14 @@ spec:
spec: spec:
containers: containers:
- name: consul - name: consul
image: "hashicorp/consul:1.9.1" image: "dashicorp/consul:1.9.1"
ports: ports:
- containerPort: 8301
protocol: "TCP"
- containerPort: 8301
protocol: "UDP"
- containerPort: 8500 - containerPort: 8500
name: http name: http
- containerPort: 8301
protocol: "UDP"
- containerPort: 8301
protocol: "UDP"
`, `,
}, },
} }

View File

@@ -98,7 +98,17 @@ var _ kio.Filter = Filter{}
func (f Filter) Filter(nodes []*yaml.RNode) ([]*yaml.RNode, error) { func (f Filter) Filter(nodes []*yaml.RNode) ([]*yaml.RNode, error) {
_, err := kio.FilterAll(yaml.FilterFunc( _, err := kio.FilterAll(yaml.FilterFunc(
func(node *yaml.RNode) (*yaml.RNode, error) { func(node *yaml.RNode) (*yaml.RNode, error) {
fields := strings.Split(f.FieldPath, "/") var fields []string
// if there is forward slash '/' in the field name, a back slash '\'
// will be used to escape it.
for _, f := range strings.Split(f.FieldPath, "/") {
if len(fields) > 0 && strings.HasSuffix(fields[len(fields)-1], "\\") {
concatField := strings.TrimSuffix(fields[len(fields)-1], "\\") + "/" + f
fields = append(fields[:len(fields)-1], concatField)
} else {
fields = append(fields, f)
}
}
// TODO: support SequenceNode. // TODO: support SequenceNode.
// Presumably here one could look for array indices (digits) at // Presumably here one could look for array indices (digits) at
// the end of the field path (as described in IETF RFC 6902 JSON), // the end of the field path (as described in IETF RFC 6902 JSON),

View File

@@ -94,6 +94,20 @@ spec:
FilePathPosition: 2, FilePathPosition: 2,
}, },
}, },
"backSlash": {
input: `
kind: SomeKind
`,
expectedOutput: `
kind: SomeKind
spec:
resourceRef/external: valueAdded
`,
filter: Filter{
Value: "valueAdded",
FieldPath: "spec/resourceRef\\/external",
},
},
} }
for tn, tc := range testCases { for tn, tc := range testCases {

View File

@@ -6,21 +6,13 @@ require (
github.com/evanphx/json-patch v4.5.0+incompatible github.com/evanphx/json-patch v4.5.0+incompatible
github.com/go-errors/errors v1.0.1 github.com/go-errors/errors v1.0.1
github.com/go-openapi/spec v0.19.5 github.com/go-openapi/spec v0.19.5
github.com/golangci/golangci-lint v1.21.0
github.com/google/go-cmp v0.3.0 github.com/google/go-cmp v0.3.0
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/hashicorp/go-multierror v1.1.0
github.com/imdario/mergo v0.3.5 github.com/imdario/mergo v0.3.5
github.com/pkg/errors v0.8.1 github.com/pkg/errors v0.8.1
github.com/stretchr/testify v1.4.0 github.com/stretchr/testify v1.4.0
github.com/yujunz/go-getter v1.5.1-lite.0.20201201013212-6d9c071adddf
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e
gopkg.in/yaml.v2 v2.3.0 gopkg.in/yaml.v2 v2.3.0
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
k8s.io/api v0.17.0 sigs.k8s.io/kustomize/kyaml v0.10.11
k8s.io/apimachinery v0.17.0
k8s.io/client-go v0.17.0
k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a
sigs.k8s.io/kustomize/kyaml v0.10.7
sigs.k8s.io/yaml v1.2.0 sigs.k8s.io/yaml v1.2.0
) )

View File

@@ -1,43 +1,21 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
github.com/360EntSecGroup-Skylar/excelize v1.4.1/go.mod h1:vnax29X2usfl7HHkBrX5EvSCJcmH3dT9luvxzu8iGAE=
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/OpenPeeDeeP/depguard v1.0.1 h1:VlW4R6jmBIv3/u1JNlawEvJMM4J+dPORPaZasQee8Us=
github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM=
github.com/PuerkitoBio/goquery v1.5.0/go.mod h1:qD2PgZ9lccMbQlc7eEOjaeRlFQON7xY8kdmcsrnKqMg=
github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/andybalholm/cascadia v1.0.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas=
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4=
github.com/bombsimon/wsl v1.2.5 h1:9gTOkIwVtoDZywvX802SDHokeX4kW1cKnV8ZTVAPkRs=
github.com/bombsimon/wsl v1.2.5/go.mod h1:43lEF/i0kpXbLCeDXL9LMT8c92HyBywXb0AsgMHYngM=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
@@ -45,14 +23,10 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -60,33 +34,18 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
github.com/dustmop/soup v1.1.2-0.20190516214245-38228baa104e/go.mod h1:CgNC6SGbT+Xb8wGGvzilttZL1mc5sQ/5KkcxsZttMIk=
github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633 h1:H2pdYOb3KQ1/YsqVWoWNLQO+fusocsw354rqGTZtAgw=
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M=
github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
github.com/go-critic/go-critic v0.3.5-0.20190904082202-d79a9f0c64db h1:GYXWx7Vr3+zv833u+8IoXbNnQY0AdXsxAgI0kX7xcwA=
github.com/go-critic/go-critic v0.3.5-0.20190904082202-d79a9f0c64db/go.mod h1:+sE8vrLDS2M0pZkBk0wy6+nLdKexVDrl/jBqQOTDThA=
github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-lintpack/lintpack v0.5.2 h1:DI5mA3+eKdWeJ40nU4d6Wc26qmdG8RCi/btYq0TuRN0=
github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8=
github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI=
github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
@@ -95,13 +54,11 @@ github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2
github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94=
github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0=
github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w=
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg=
github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
@@ -115,7 +72,6 @@ github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCs
github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA=
github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64=
github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4=
github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc=
github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY=
@@ -127,7 +83,6 @@ github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pL
github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY=
github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU=
github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk=
github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I=
github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
@@ -137,139 +92,38 @@ github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+
github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA=
github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g=
github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4=
github.com/go-toolsmith/astcopy v1.0.0 h1:OMgl1b1MEpjFQ1m5ztEO06rz5CUd3oBv9RF7+DyvdG8=
github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ=
github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY=
github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ=
github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY=
github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg=
github.com/go-toolsmith/astfmt v1.0.0 h1:A0vDDXt+vsvLEdbMFJAUBI/uTbRw1ffOPnxsILnFL6k=
github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw=
github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU=
github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk=
github.com/go-toolsmith/astp v1.0.0 h1:alXE75TXgcmupDsMK1fRAy0YUzLzqPVvBKoyWV+KPXg=
github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI=
github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks=
github.com/go-toolsmith/pkgload v1.0.0 h1:4DFWWMXVfbcN5So1sBNW9+yeiMqLFGl1wFLTL5R0Tgg=
github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc=
github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4=
github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8=
github.com/go-toolsmith/typep v1.0.0 h1:zKymWyA1TRYvqYrYDrfEMZULyrhcnGY3x7LDKU2XQaA=
github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU=
github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM= github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM=
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b h1:ekuhfTjngPhisSjOJ0QWKpPQE8/rbknHaes6WVJj5Hw=
github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I=
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0=
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4=
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM=
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk=
github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6 h1:YYWNAGTKWhKpcLLt7aSj/odlKrSrelQwlovBpDuf19w=
github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0=
github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 h1:9kfjN3AdxcbsZBf8NjltjWihK2QfBBBZuv91cMFfDHw=
github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8=
github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3 h1:pe9JHs3cHHDQgOFXJJdYkK6fLz2PWyYtP4hthoCMvs8=
github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o=
github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee h1:J2XAy40+7yz70uaOiMbNnluTg7gyQhtGqLQncQh+4J8=
github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU=
github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks=
github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU=
github.com/golangci/golangci-lint v1.21.0 h1:HxAxpR8Z0M8omihvQdsD3PF0qPjlqYqp2vMJzstoKeI=
github.com/golangci/golangci-lint v1.21.0/go.mod h1:phxpHK52q7SE+5KpPnti4oZTdFCEsn/tKN+nFvCKXfk=
github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc h1:gLLhTLMk2/SutryVJ6D4VZCU3CUqr8YloG7FPIBWFpI=
github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU=
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA=
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg=
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA=
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o=
github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770 h1:EL/O5HGrF7Jaq0yNhBLucz9hTuRzj2LdwGBOaENgxIk=
github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA=
github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21 h1:leSNB7iYzLYSSx3J/s5sVf4Drkc68W2wm4Ixh/mr0us=
github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI=
github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0 h1:HVfrLniijszjS1aiNg8JbBMO2+E1WIQ+j/gL4SQqGPg=
github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4=
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys=
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d h1:7XGaL1e6bYS1yIonGp9761ExpPPV1ui0SAC59Yube9k=
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3 h1:JVnpOZS+qxli+rgVl98ILOXVNbW+kb5wcxeGx8ShUIw=
github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6KdvN3Gig=
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI=
github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
github.com/hashicorp/go-version v1.1.0 h1:bPIoEKD27tNdebFGGxxYwcL4nepeY4j1QP23PFRGzg0=
github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q=
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok=
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
@@ -277,14 +131,10 @@ github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
@@ -292,55 +142,21 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN
github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM=
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
github.com/markbates/pkger v0.17.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= github.com/markbates/pkger v0.17.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI=
github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb h1:RHba4YImhrUVQDHUCe2BNSOz4tVy2yGyXhvYDvxGgeE=
github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s=
github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk=
github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0=
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4=
github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk=
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1ORQBMvzfzBgpsctsbQikCVpvC+tX285E=
github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo=
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/paulmach/orb v0.1.3/go.mod h1:VFlX/8C+IQ1p6FTRRKzKoOPJnvEtA5G0Veuqwbu//Vk=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
@@ -352,202 +168,100 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/qri-io/starlib v0.4.2-0.20200213133954-ff2e8cd5ef8d h1:K6eOUihrFLdZjZnA4XlRp864fmWXv9YTIk7VPLhRacA=
github.com/qri-io/starlib v0.4.2-0.20200213133954-ff2e8cd5ef8d/go.mod h1:7DPO4domFU579Ga6E61sB9VFNaniPVwJP5C4bBCu3wA=
github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d h1:BzRvVq1EHuIjxpijCEKpAxzKUUMurOQ4sknehIATRh8=
github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d/go.mod h1:w5+eXa0mYznDkHaMCXA4XYffjlH+cy1oyKbfzJXa2Do=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc=
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM=
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041 h1:llrF3Fs4018ePo4+G/HV/uQUqEI1HMDjCeOf2V6puPc=
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/sourcegraph/go-diff v0.5.1 h1:gO6i5zugwzo1RVTvgvfwCOSVegNuvnNi6bAD1QCmkHs=
github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc=
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8=
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU=
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.3-0.20181224173747-660f15d67dbb/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e h1:RumXZ56IrCj4CL+g1b9OL/oH0QnsF976bC8xQFYUD5Q=
github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ=
github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/ultraware/funlen v0.0.2 h1:Av96YVBwwNSe4MLR7iI/BIa3VyI7/djnto/pK3Uxbdo=
github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA=
github.com/ultraware/whitespace v0.0.4 h1:If7Va4cM03mpgrNH9k49/VOicWpGoG70XPBFFODYDsg=
github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA=
github.com/uudashr/gocognit v0.0.0-20190926065955-1655d0de0517 h1:ChMKTho2hWKpks/nD/FL2KqM1wuVt62oJeiE8+eFpGs=
github.com/uudashr/gocognit v0.0.0-20190926065955-1655d0de0517/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s=
github.com/valyala/quicktemplate v1.2.0/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4=
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca h1:1CFlNzQhALwjS9mBAUkycX616GzgsuYUOCHA5+HSlXI= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca h1:1CFlNzQhALwjS9mBAUkycX616GzgsuYUOCHA5+HSlXI=
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/yujunz/go-getter v1.5.1-lite.0.20201201013212-6d9c071adddf h1:gvEmqF83GB8R5XtrMseJb6A6R0OCtNAS8f4TmZg2dGc=
github.com/yujunz/go-getter v1.5.1-lite.0.20201201013212-6d9c071adddf/go.mod h1:bL0Pr07HEdsMZ1WBqZIxXj96r5LnFsY4LgPaPEGkw1k=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.starlark.net v0.0.0-20190528202925-30ae18b8564f/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg=
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc=
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392 h1:ACG4HJsFiNMf47Y4PeRoebLNy/2lXT9EtprMuTFWt1M=
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI=
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c h1:Vco5b+cuG5NNfORVxZy6bYZQ7rsigisU1WQFkvQ0L5E= golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c h1:Vco5b+cuG5NNfORVxZy6bYZQ7rsigisU1WQFkvQ0L5E=
golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190930201159-7c411dea38b0/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191010075000-0337d82405ff h1:XdBG6es/oFDr1HwaxkxgVve7NB281QhxgK/i4voubFs=
golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e h1:aZzprAO9/8oim3qStq3wc1Xuxx4QmAGriC4VU4ojemQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
@@ -555,55 +269,19 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= sigs.k8s.io/kustomize/kyaml v0.10.11 h1:7KzaMS6TtwhGQW6hkw8umC2zFtSGAQPdAMagfautnkw=
honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= sigs.k8s.io/kustomize/kyaml v0.10.11/go.mod h1:uD7q6dIrZV02fBV6D7FOgdOBcLfUmhG3ExxDIGbUM3w=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
k8s.io/api v0.17.0 h1:H9d/lw+VkZKEVIUc8F3wgiQ+FUXTTr21M87jXLU7yqM=
k8s.io/api v0.17.0/go.mod h1:npsyOePkeP0CPwyGfXDHxvypiYMJxBWAMpQxCaJ4ZxI=
k8s.io/apimachinery v0.17.0 h1:xRBnuie9rXcPxUkDizUsGvPf1cnlZCFu210op7J7LJo=
k8s.io/apimachinery v0.17.0/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg=
k8s.io/client-go v0.17.0 h1:8QOGvUGdqDMFrm9sD6IUFl256BcffynGoe80sxgTEDg=
k8s.io/client-go v0.17.0/go.mod h1:TYgR6EUHs6k45hb6KWjVD6jFZvJV4gHDikv/It0xz+k=
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a h1:UcxjrRMyNx/i/y8G7kPvLyy7rfbeuf1PYyBf973pgyU=
k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
k8s.io/utils v0.0.0-20191114184206-e782cd3c129f h1:GiPwtSzdP43eI1hpPCbROQCCIgCuiMMNF8YUVLF3vJo=
k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I=
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc=
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo=
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4=
mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f h1:Cq7MalBHYACRd6EesksG1Q8EoIAKOsiZviGKbOLIej4=
mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw=
sigs.k8s.io/kustomize/kyaml v0.10.7 h1:r0r8UEL0bL7X56HKUmhJZ+TP+nvRNGrDHHSLO7izlcQ=
sigs.k8s.io/kustomize/kyaml v0.10.7/go.mod h1:K9yg1k/HB/6xNOf5VH3LhTo1DK9/5ykSZO5uIv+Y/1k=
sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4 h1:JPJh2pk3+X4lXAkZIk2RuE/7/FoK9maXw+TNPJhVS/c=
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=

View File

@@ -49,6 +49,9 @@ type Kunstructured interface {
// GetData returns a top-level "data" field, as in a ConfigMap. // GetData returns a top-level "data" field, as in a ConfigMap.
GetDataMap() map[string]string GetDataMap() map[string]string
// GetData returns a top-level "binaryData" field, as in a ConfigMap.
GetBinaryDataMap() map[string]string
// Used by ResAccumulator and ReplacementTransformer. // Used by ResAccumulator and ReplacementTransformer.
GetFieldValue(string) (interface{}, error) GetFieldValue(string) (interface{}, error)
@@ -90,6 +93,8 @@ type Kunstructured interface {
// SetDataMap sets a top-level "data" field, as in a ConfigMap. // SetDataMap sets a top-level "data" field, as in a ConfigMap.
SetDataMap(map[string]string) SetDataMap(map[string]string)
// SetDataMap sets a top-level "binaryData" field, as in a ConfigMap.
SetBinaryDataMap(map[string]string)
// Used by PatchStrategicMergeTransformer. // Used by PatchStrategicMergeTransformer.
SetGvk(resid.Gvk) SetGvk(resid.Gvk)

View File

@@ -9,7 +9,6 @@ import (
"github.com/go-openapi/spec" "github.com/go-openapi/spec"
"github.com/pkg/errors" "github.com/pkg/errors"
"k8s.io/kube-openapi/pkg/common"
"sigs.k8s.io/kustomize/api/filesys" "sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/ifc" "sigs.k8s.io/kustomize/api/ifc"
"sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig" "sigs.k8s.io/kustomize/api/internal/plugins/builtinconfig"
@@ -18,8 +17,16 @@ import (
"sigs.k8s.io/yaml" "sigs.k8s.io/yaml"
) )
// OpenAPIDefinition describes single type.
// Normally these definitions are auto-generated using gen-openapi.
// Same as in k8s.io / kube-openapi / pkg / common.
type OpenAPIDefinition struct {
Schema spec.Schema
Dependencies []string
}
type myProperties map[string]spec.Schema type myProperties map[string]spec.Schema
type nameToApiMap map[string]common.OpenAPIDefinition type nameToApiMap map[string]OpenAPIDefinition
// LoadConfigFromCRDs parse CRD schemas from paths into a TransformerConfig // LoadConfigFromCRDs parse CRD schemas from paths into a TransformerConfig
func LoadConfigFromCRDs( func LoadConfigFromCRDs(

View File

@@ -1,40 +1,20 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
github.com/360EntSecGroup-Skylar/excelize v1.4.1/go.mod h1:vnax29X2usfl7HHkBrX5EvSCJcmH3dT9luvxzu8iGAE=
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM=
github.com/PuerkitoBio/goquery v1.5.0/go.mod h1:qD2PgZ9lccMbQlc7eEOjaeRlFQON7xY8kdmcsrnKqMg=
github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/andybalholm/cascadia v1.0.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas=
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4=
github.com/bombsimon/wsl v1.2.5/go.mod h1:43lEF/i0kpXbLCeDXL9LMT8c92HyBywXb0AsgMHYngM=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
@@ -42,14 +22,10 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -57,31 +33,18 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
github.com/dustmop/soup v1.1.2-0.20190516214245-38228baa104e/go.mod h1:CgNC6SGbT+Xb8wGGvzilttZL1mc5sQ/5KkcxsZttMIk=
github.com/elastic/go-elasticsearch/v6 v6.8.5 h1:U2HtkBseC1FNBmDr0TR2tKltL6FxoY+niDAlj5M8TK8= github.com/elastic/go-elasticsearch/v6 v6.8.5 h1:U2HtkBseC1FNBmDr0TR2tKltL6FxoY+niDAlj5M8TK8=
github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI= github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI=
github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M=
github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
github.com/go-critic/go-critic v0.3.5-0.20190904082202-d79a9f0c64db/go.mod h1:+sE8vrLDS2M0pZkBk0wy6+nLdKexVDrl/jBqQOTDThA=
github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8=
github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI=
github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
@@ -90,13 +53,11 @@ github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2
github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94=
github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0=
github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w=
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg=
github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
@@ -110,7 +71,6 @@ github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCs
github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA=
github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64=
github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4=
github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc=
github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY=
@@ -122,7 +82,6 @@ github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pL
github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY=
github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU=
github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk=
github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I=
github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
@@ -132,123 +91,47 @@ github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+
github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA=
github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4=
github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ=
github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY=
github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY=
github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg=
github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw=
github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU=
github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk=
github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI=
github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks=
github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc=
github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8=
github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU=
github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM= github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM=
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I=
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4=
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk=
github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0=
github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8=
github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o=
github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU=
github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU=
github.com/golangci/golangci-lint v1.21.0/go.mod h1:phxpHK52q7SE+5KpPnti4oZTdFCEsn/tKN+nFvCKXfk=
github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU=
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg=
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o=
github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA=
github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI=
github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4=
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ=
github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0= github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0=
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d h1:7XGaL1e6bYS1yIonGp9761ExpPPV1ui0SAC59Yube9k=
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw=
github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA=
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6KdvN3Gig=
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo=
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
github.com/hashicorp/go-version v1.1.0 h1:bPIoEKD27tNdebFGGxxYwcL4nepeY4j1QP23PFRGzg0=
github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q=
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok=
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
@@ -256,49 +139,18 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN
github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM=
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
github.com/markbates/pkger v0.17.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= github.com/markbates/pkger v0.17.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI=
github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk=
github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0=
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4=
github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk=
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo=
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/paulmach/orb v0.1.3/go.mod h1:VFlX/8C+IQ1p6FTRRKzKoOPJnvEtA5G0Veuqwbu//Vk=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
@@ -310,183 +162,94 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/qri-io/starlib v0.4.2-0.20200213133954-ff2e8cd5ef8d/go.mod h1:7DPO4domFU579Ga6E61sB9VFNaniPVwJP5C4bBCu3wA=
github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=
github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/securego/gosec v0.0.0-20191002120514-e680875ea14d/go.mod h1:w5+eXa0mYznDkHaMCXA4XYffjlH+cy1oyKbfzJXa2Do=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc=
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.3-0.20181224173747-660f15d67dbb/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ=
github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA=
github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA=
github.com/uudashr/gocognit v0.0.0-20190926065955-1655d0de0517/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s=
github.com/valyala/quicktemplate v1.2.0/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4=
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca h1:1CFlNzQhALwjS9mBAUkycX616GzgsuYUOCHA5+HSlXI= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca h1:1CFlNzQhALwjS9mBAUkycX616GzgsuYUOCHA5+HSlXI=
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/yujunz/go-getter v1.5.1-lite.0.20201201013212-6d9c071adddf h1:gvEmqF83GB8R5XtrMseJb6A6R0OCtNAS8f4TmZg2dGc=
github.com/yujunz/go-getter v1.5.1-lite.0.20201201013212-6d9c071adddf/go.mod h1:bL0Pr07HEdsMZ1WBqZIxXj96r5LnFsY4LgPaPEGkw1k=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.starlark.net v0.0.0-20190528202925-30ae18b8564f/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg=
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI=
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69 h1:rOhMmluY6kLMhdnrivzec6lLgaVbMHMn2ISQXJeJ5EM=
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c h1:Vco5b+cuG5NNfORVxZy6bYZQ7rsigisU1WQFkvQ0L5E=
golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190930201159-7c411dea38b0/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
@@ -494,51 +257,19 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= sigs.k8s.io/kustomize/kyaml v0.10.11 h1:7KzaMS6TtwhGQW6hkw8umC2zFtSGAQPdAMagfautnkw=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= sigs.k8s.io/kustomize/kyaml v0.10.11/go.mod h1:uD7q6dIrZV02fBV6D7FOgdOBcLfUmhG3ExxDIGbUM3w=
k8s.io/api v0.17.0 h1:H9d/lw+VkZKEVIUc8F3wgiQ+FUXTTr21M87jXLU7yqM=
k8s.io/api v0.17.0/go.mod h1:npsyOePkeP0CPwyGfXDHxvypiYMJxBWAMpQxCaJ4ZxI=
k8s.io/apimachinery v0.17.0 h1:xRBnuie9rXcPxUkDizUsGvPf1cnlZCFu210op7J7LJo=
k8s.io/apimachinery v0.17.0/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg=
k8s.io/client-go v0.17.0 h1:8QOGvUGdqDMFrm9sD6IUFl256BcffynGoe80sxgTEDg=
k8s.io/client-go v0.17.0/go.mod h1:TYgR6EUHs6k45hb6KWjVD6jFZvJV4gHDikv/It0xz+k=
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a h1:UcxjrRMyNx/i/y8G7kPvLyy7rfbeuf1PYyBf973pgyU=
k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc=
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4=
mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw=
sigs.k8s.io/kustomize/kyaml v0.10.7 h1:r0r8UEL0bL7X56HKUmhJZ+TP+nvRNGrDHHSLO7izlcQ=
sigs.k8s.io/kustomize/kyaml v0.10.7/go.mod h1:K9yg1k/HB/6xNOf5VH3LhTo1DK9/5ykSZO5uIv+Y/1k=
sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=

View File

@@ -191,7 +191,8 @@ func (idx *index) Put(uniqueID string, doc interface{}) error {
} }
if exists { if exists {
docBytes, err := json.Marshal(doc) var docBytes []byte
docBytes, err = json.Marshal(doc)
if err != nil { if err != nil {
return err return err
} }
@@ -204,12 +205,14 @@ func (idx *index) Put(uniqueID string, doc interface{}) error {
Body: bytes.NewReader(body), Body: bytes.NewReader(body),
DocumentID: uniqueID, DocumentID: uniqueID,
} }
res, err := req.Do(idx.ctx, idx.client) var res *esapi.Response
res, err = req.Do(idx.ctx, idx.client)
err = idx.responseErrorOrNil("could not update document", err = idx.responseErrorOrNil("could not update document",
res, err, ignoreResponseBody) res, err, ignoreResponseBody)
} else { } else {
body, err := json.Marshal(doc) var body []byte
body, err = json.Marshal(doc)
if err != nil { if err != nil {
return err return err
} }
@@ -219,7 +222,8 @@ func (idx *index) Put(uniqueID string, doc interface{}) error {
Body: bytes.NewReader(body), Body: bytes.NewReader(body),
DocumentID: uniqueID, DocumentID: uniqueID,
} }
res, err := req.Do(idx.ctx, idx.client) var res *esapi.Response
res, err = req.Do(idx.ctx, idx.client)
err = idx.responseErrorOrNil("could not insert document", err = idx.responseErrorOrNil("could not insert document",
res, err, ignoreResponseBody) res, err, ignoreResponseBody)

View File

@@ -1,68 +0,0 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
// Package configmapandsecret generates configmaps and secrets per generator rules.
package configmapandsecret
import (
"fmt"
"unicode/utf8"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/kustomize/api/types"
)
func makeFreshConfigMap(
args *types.ConfigMapArgs) *corev1.ConfigMap {
cm := &corev1.ConfigMap{}
cm.APIVersion = "v1"
cm.Kind = "ConfigMap"
cm.Name = args.Name
cm.Namespace = args.Namespace
cm.Data = map[string]string{}
return cm
}
// MakeConfigMap returns a new ConfigMap, or nil and an error.
func (f *Factory) MakeConfigMap(args *types.ConfigMapArgs) (*corev1.ConfigMap, error) {
all, err := f.kvLdr.Load(args.KvPairSources)
if err != nil {
return nil, errors.Wrap(err, "loading KV pairs")
}
cm := makeFreshConfigMap(args)
for _, p := range all {
err = f.addKvToConfigMap(cm, p)
if err != nil {
return nil, errors.Wrap(err, "trouble mapping")
}
}
f.copyLabelsAndAnnotations(cm, args.Options)
return cm, nil
}
// addKvToConfigMap adds the given key and data to the given config map.
// Error if key invalid, or already exists.
func (f *Factory) addKvToConfigMap(configMap *corev1.ConfigMap, p types.Pair) error {
if err := f.kvLdr.Validator().ErrIfInvalidKey(p.Key); err != nil {
return err
}
// If the configmap data contains byte sequences that are all in the UTF-8
// range, we will write it to .Data
if utf8.Valid([]byte(p.Value)) {
if _, entryExists := configMap.Data[p.Key]; entryExists {
return fmt.Errorf(keyExistsErrorMsg, p.Key, configMap.Data)
}
configMap.Data[p.Key] = p.Value
return nil
}
// otherwise, it's BinaryData
if configMap.BinaryData == nil {
configMap.BinaryData = map[string][]byte{}
}
if _, entryExists := configMap.BinaryData[p.Key]; entryExists {
return fmt.Errorf(keyExistsErrorMsg, p.Key, configMap.BinaryData)
}
configMap.BinaryData[p.Key] = []byte(p.Value)
return nil
}

View File

@@ -1,189 +0,0 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package configmapandsecret
import (
"path/filepath"
"reflect"
"testing"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/kv"
"sigs.k8s.io/kustomize/api/loader"
valtest_test "sigs.k8s.io/kustomize/api/testutils/valtest"
"sigs.k8s.io/kustomize/api/types"
)
func makeEnvConfigMap(name string) *corev1.ConfigMap {
return &corev1.ConfigMap{
TypeMeta: metav1.TypeMeta{
APIVersion: "v1",
Kind: "ConfigMap",
},
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
Data: map[string]string{
"DB_USERNAME": "admin",
"DB_PASSWORD": "somepw",
},
}
}
func makeFileConfigMap(name string) *corev1.ConfigMap {
return &corev1.ConfigMap{
TypeMeta: metav1.TypeMeta{
APIVersion: "v1",
Kind: "ConfigMap",
},
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
Data: map[string]string{
"app-init.ini": `FOO=bar
BAR=baz
`,
},
BinaryData: map[string][]byte{
"app.bin": {0xff, 0xfd},
},
}
}
func makeLiteralConfigMap(name string, labels, annotations map[string]string) *corev1.ConfigMap {
cm := &corev1.ConfigMap{
TypeMeta: metav1.TypeMeta{
APIVersion: "v1",
Kind: "ConfigMap",
},
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
Data: map[string]string{
"a": "x",
"b": "y",
"c": "Hello World",
"d": "true",
},
}
if labels != nil {
cm.SetLabels(labels)
}
if annotations != nil {
cm.SetAnnotations(annotations)
}
return cm
}
func TestConstructConfigMap(t *testing.T) {
type testCase struct {
description string
input types.ConfigMapArgs
expected *corev1.ConfigMap
}
testCases := []testCase{
{
description: "construct config map from env",
input: types.ConfigMapArgs{
GeneratorArgs: types.GeneratorArgs{
Name: "envConfigMap",
KvPairSources: types.KvPairSources{
EnvSources: []string{
filepath.Join("configmap", "app.env"),
},
},
},
},
expected: makeEnvConfigMap("envConfigMap"),
},
{
description: "construct config map from file",
input: types.ConfigMapArgs{
GeneratorArgs: types.GeneratorArgs{
Name: "fileConfigMap",
KvPairSources: types.KvPairSources{
FileSources: []string{
filepath.Join("configmap", "app-init.ini"),
filepath.Join("configmap", "app.bin"),
},
},
},
},
expected: makeFileConfigMap("fileConfigMap"),
},
{
description: "construct config map from literal",
input: types.ConfigMapArgs{
GeneratorArgs: types.GeneratorArgs{
Name: "literalConfigMap",
KvPairSources: types.KvPairSources{
LiteralSources: []string{"a=x", "b=y", "c=\"Hello World\"", "d='true'"},
},
Options: &types.GeneratorOptions{
Labels: map[string]string{
"foo": "bar",
},
},
},
},
expected: makeLiteralConfigMap("literalConfigMap", map[string]string{
"foo": "bar",
}, nil),
},
{
description: "construct config map from literal with GeneratorOptions in ConfigMapArgs",
input: types.ConfigMapArgs{
GeneratorArgs: types.GeneratorArgs{
Name: "literalConfigMap",
KvPairSources: types.KvPairSources{
LiteralSources: []string{"a=x", "b=y", "c=\"Hello World\"", "d='true'"},
},
Options: &types.GeneratorOptions{
Labels: map[string]string{
"foo": "changed",
"cat": "dog",
},
Annotations: map[string]string{
"foo": "changed",
"cat": "dog",
},
},
},
},
expected: makeLiteralConfigMap("literalConfigMap", map[string]string{
"foo": "changed",
"cat": "dog",
}, map[string]string{
"foo": "changed",
"cat": "dog",
}),
},
}
fSys := filesys.MakeFsInMemory()
fSys.WriteFile(
filesys.RootedPath("configmap", "app.env"),
[]byte("DB_USERNAME=admin\nDB_PASSWORD=somepw\n"))
fSys.WriteFile(
filesys.RootedPath("configmap", "app-init.ini"),
[]byte("FOO=bar\nBAR=baz\n"))
fSys.WriteFile(
filesys.RootedPath("configmap", "app.bin"),
[]byte{0xff, 0xfd})
kvLdr := kv.NewLoader(
loader.NewFileLoaderAtRoot(fSys),
valtest_test.MakeFakeValidator())
for _, tc := range testCases {
cm, err := NewFactory(kvLdr).MakeConfigMap(&tc.input)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
if !reflect.DeepEqual(*cm, *tc.expected) {
t.Fatalf("in testcase: %q updated:\n%#v\ndoesn't match expected:\n%#v\n", tc.description, *cm, tc.expected)
}
}
}

View File

@@ -1,37 +0,0 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package configmapandsecret
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/kustomize/api/ifc"
"sigs.k8s.io/kustomize/api/types"
)
// Factory makes ConfigMaps and Secrets.
type Factory struct {
kvLdr ifc.KvLoader
}
// NewFactory returns a new factory that makes ConfigMaps and Secrets.
func NewFactory(kvLdr ifc.KvLoader) *Factory {
return &Factory{kvLdr: kvLdr}
}
// copyLabelsAndAnnotations copies labels and annotations from
// GeneratorOptions into the given object.
func (f *Factory) copyLabelsAndAnnotations(
obj metav1.Object, opts *types.GeneratorOptions) {
if opts == nil {
return
}
if opts.Labels != nil {
obj.SetLabels(types.CopyMap(opts.Labels))
}
if opts.Annotations != nil {
obj.SetAnnotations(types.CopyMap(opts.Annotations))
}
}
const keyExistsErrorMsg = "cannot add key %s, another key by that name already exists: %v"

View File

@@ -1,54 +0,0 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package configmapandsecret
import (
"fmt"
corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/kustomize/api/types"
)
func makeFreshSecret(
args *types.SecretArgs) *corev1.Secret {
s := &corev1.Secret{}
s.APIVersion = "v1"
s.Kind = "Secret"
s.Name = args.Name
s.Namespace = args.Namespace
s.Type = corev1.SecretType(args.Type)
if s.Type == "" {
s.Type = corev1.SecretTypeOpaque
}
s.Data = map[string][]byte{}
return s
}
// MakeSecret returns a new secret.
func (f *Factory) MakeSecret(args *types.SecretArgs) (*corev1.Secret, error) {
all, err := f.kvLdr.Load(args.KvPairSources)
if err != nil {
return nil, err
}
s := makeFreshSecret(args)
for _, p := range all {
err = f.addKvToSecret(s, p.Key, p.Value)
if err != nil {
return nil, err
}
}
f.copyLabelsAndAnnotations(s, args.Options)
return s, nil
}
func (f *Factory) addKvToSecret(secret *corev1.Secret, keyName, data string) error {
if err := f.kvLdr.Validator().ErrIfInvalidKey(keyName); err != nil {
return err
}
if _, entryExists := secret.Data[keyName]; entryExists {
return fmt.Errorf(keyExistsErrorMsg, keyName, secret.Data)
}
secret.Data[keyName] = []byte(data)
return nil
}

View File

@@ -1,154 +0,0 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package configmapandsecret
import (
"reflect"
"testing"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/kv"
"sigs.k8s.io/kustomize/api/loader"
valtest_test "sigs.k8s.io/kustomize/api/testutils/valtest"
"sigs.k8s.io/kustomize/api/types"
)
func makeEnvSecret(name string) *corev1.Secret {
return &corev1.Secret{
TypeMeta: metav1.TypeMeta{
APIVersion: "v1",
Kind: "Secret",
},
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
Data: map[string][]byte{
"DB_PASSWORD": []byte("somepw"),
"DB_USERNAME": []byte("admin"),
},
Type: "Opaque",
}
}
func makeFileSecret(name string) *corev1.Secret {
return &corev1.Secret{
TypeMeta: metav1.TypeMeta{
APIVersion: "v1",
Kind: "Secret",
},
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
Data: map[string][]byte{
"app-init.ini": []byte(`FOO=bar
BAR=baz
`),
},
Type: "Opaque",
}
}
func makeLiteralSecret(name string, labels, annotations map[string]string) *corev1.Secret {
s := &corev1.Secret{
TypeMeta: metav1.TypeMeta{
APIVersion: "v1",
Kind: "Secret",
},
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
Data: map[string][]byte{
"a": []byte("x"),
"b": []byte("y"),
},
Type: "Opaque",
}
if labels != nil {
s.SetLabels(labels)
}
if annotations != nil {
s.SetAnnotations(annotations)
}
return s
}
func TestConstructSecret(t *testing.T) {
type testCase struct {
description string
input types.SecretArgs
expected *corev1.Secret
}
testCases := []testCase{
{
description: "construct secret from env",
input: types.SecretArgs{
GeneratorArgs: types.GeneratorArgs{
Name: "envSecret",
KvPairSources: types.KvPairSources{
EnvSources: []string{"secret/app.env"},
},
},
},
expected: makeEnvSecret("envSecret"),
},
{
description: "construct secret from file",
input: types.SecretArgs{
GeneratorArgs: types.GeneratorArgs{
Name: "fileSecret",
KvPairSources: types.KvPairSources{
FileSources: []string{"secret/app-init.ini"},
},
},
},
expected: makeFileSecret("fileSecret"),
},
{
description: "construct secret from literal",
input: types.SecretArgs{
GeneratorArgs: types.GeneratorArgs{
Name: "literalSecret",
KvPairSources: types.KvPairSources{
LiteralSources: []string{"a=x", "b=y"},
},
Options: &types.GeneratorOptions{
Labels: map[string]string{
"foo": "bar",
},
Annotations: map[string]string{
"fruit": "banana",
"pet": "dog",
},
},
},
},
expected: makeLiteralSecret("literalSecret", map[string]string{
"foo": "bar",
}, map[string]string{
"fruit": "banana",
"pet": "dog",
}),
},
}
fSys := filesys.MakeFsInMemory()
fSys.WriteFile("/secret/app.env", []byte("DB_USERNAME=admin\nDB_PASSWORD=somepw\n"))
fSys.WriteFile("/secret/app-init.ini", []byte("FOO=bar\nBAR=baz\n"))
kvLdr := kv.NewLoader(
loader.NewFileLoaderAtRoot(fSys),
valtest_test.MakeFakeValidator())
for _, tc := range testCases {
f := NewFactory(kvLdr)
cm, err := f.MakeSecret(&tc.input)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
if !reflect.DeepEqual(*cm, *tc.expected) {
t.Fatalf("in testcase: %q updated:\n%#v\ndoesn't match expected:\n%#v\n", tc.description, *cm, tc.expected)
}
}
}

View File

@@ -1,43 +0,0 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package conflict
import (
"encoding/json"
jsonpatch "github.com/evanphx/json-patch"
"k8s.io/apimachinery/pkg/util/mergepatch"
"sigs.k8s.io/kustomize/api/resource"
)
// conflictDetectorJson detects conflicts in a list of JSON patches.
type conflictDetectorJson struct {
resourceFactory *resource.Factory
}
var _ resource.ConflictDetector = &conflictDetectorJson{}
func (cd *conflictDetectorJson) HasConflict(
p1, p2 *resource.Resource) (bool, error) {
return mergepatch.HasConflicts(p1.Map(), p2.Map())
}
func (cd *conflictDetectorJson) MergePatches(
patch1, patch2 *resource.Resource) (*resource.Resource, error) {
baseBytes, err := json.Marshal(patch1.Map())
if err != nil {
return nil, err
}
patchBytes, err := json.Marshal(patch2.Map())
if err != nil {
return nil, err
}
mergedBytes, err := jsonpatch.MergeMergePatches(baseBytes, patchBytes)
if err != nil {
return nil, err
}
mergedMap := make(map[string]interface{})
err = json.Unmarshal(mergedBytes, &mergedMap)
return cd.resourceFactory.FromMap(mergedMap), err
}

View File

@@ -1,65 +0,0 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package conflict
import (
"fmt"
"k8s.io/apimachinery/pkg/util/strategicpatch"
"sigs.k8s.io/kustomize/api/resource"
)
// conflictDetectorSm detects conflicts in a list of strategic merge patches.
type conflictDetectorSm struct {
lookupPatchMeta strategicpatch.LookupPatchMeta
resourceFactory *resource.Factory
}
var _ resource.ConflictDetector = &conflictDetectorSm{}
func (cd *conflictDetectorSm) HasConflict(
p1, p2 *resource.Resource) (bool, error) {
return strategicpatch.MergingMapsHaveConflicts(
p1.Map(), p2.Map(), cd.lookupPatchMeta)
}
func (cd *conflictDetectorSm) MergePatches(
patch1, patch2 *resource.Resource) (*resource.Resource, error) {
if cd.hasDeleteDirectiveMarker(patch2.Map()) {
if cd.hasDeleteDirectiveMarker(patch1.Map()) {
return nil, fmt.Errorf(
"cannot merge patches both containing '$patch: delete' directives")
}
patch1, patch2 = patch2, patch1
}
mergedMap, err := strategicpatch.MergeStrategicMergeMapPatchUsingLookupPatchMeta(
cd.lookupPatchMeta, patch1.Map(), patch2.Map())
return cd.resourceFactory.FromMap(mergedMap), err
}
func (cd *conflictDetectorSm) hasDeleteDirectiveMarker(
patch map[string]interface{}) bool {
if v, ok := patch["$patch"]; ok && v == "delete" {
return true
}
for _, v := range patch {
switch typedV := v.(type) {
case map[string]interface{}:
if cd.hasDeleteDirectiveMarker(typedV) {
return true
}
case []interface{}:
for _, sv := range typedV {
typedE, ok := sv.(map[string]interface{})
if !ok {
break
}
if cd.hasDeleteDirectiveMarker(typedE) {
return true
}
}
}
}
return false
}

View File

@@ -1,45 +0,0 @@
// Copyright 2020 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package conflict
import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
sp "k8s.io/apimachinery/pkg/util/strategicpatch"
"k8s.io/client-go/kubernetes/scheme"
"sigs.k8s.io/kustomize/api/resid"
"sigs.k8s.io/kustomize/api/resource"
)
type cdFactory struct {
rf *resource.Factory
}
var _ resource.ConflictDetectorFactory = &cdFactory{}
// NewFactory returns a conflict detector factory.
// The detector uses a resource factory to convert resources to/from
// json/yaml/maps representations.
func NewFactory(rf *resource.Factory) resource.ConflictDetectorFactory {
return &cdFactory{rf: rf}
}
// New returns a conflict detector that's aware of the GVK type.
func (f *cdFactory) New(gvk resid.Gvk) (resource.ConflictDetector, error) {
// Convert to apimachinery representation of object
obj, err := scheme.Scheme.New(schema.GroupVersionKind{
Group: gvk.Group,
Version: gvk.Version,
Kind: gvk.Kind,
})
if err == nil {
meta, err := sp.NewPatchMetaFromStruct(obj)
return &conflictDetectorSm{
lookupPatchMeta: meta, resourceFactory: f.rf}, err
}
if runtime.IsNotRegisteredError(err) {
return &conflictDetectorJson{resourceFactory: f.rf}, nil
}
return nil, err
}

View File

@@ -6,9 +6,9 @@ package target
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"path/filepath"
"strings" "strings"
"github.com/hashicorp/go-multierror"
"github.com/pkg/errors" "github.com/pkg/errors"
"sigs.k8s.io/kustomize/api/builtins" "sigs.k8s.io/kustomize/api/builtins"
"sigs.k8s.io/kustomize/api/ifc" "sigs.k8s.io/kustomize/api/ifc"
@@ -335,20 +335,15 @@ func (kt *KustTarget) accumulateResources(
for _, path := range paths { for _, path := range paths {
// try loading resource as file then as base (directory or git repository) // try loading resource as file then as base (directory or git repository)
if errF := kt.accumulateFile(ra, path); errF != nil { if errF := kt.accumulateFile(ra, path); errF != nil {
ldr, errL := kt.ldr.New(path) ldr, err := kt.ldr.New(path)
if errL != nil { if err != nil {
return nil, multierror.Append( return nil, errors.Wrapf(
fmt.Errorf("accumulateFile error: %q", errF), err, "accumulation err='%s'", errF.Error())
fmt.Errorf("loader.New error: %q", errL),
)
} }
var errD error ra, err = kt.accumulateDirectory(ra, ldr, false)
ra, errD = kt.accumulateDirectory(ra, ldr, false) if err != nil {
if errD != nil { return nil, errors.Wrapf(
return nil, multierror.Append( err, "accumulation err='%s'", errF.Error())
fmt.Errorf("accumulateFile error: %q", errF),
fmt.Errorf("accumulateDirector error: %q", errD),
)
} }
} }
} }
@@ -383,10 +378,17 @@ func (kt *KustTarget) accumulateDirectory(
return nil, errors.Wrapf( return nil, errors.Wrapf(
err, "couldn't make target for path '%s'", ldr.Root()) err, "couldn't make target for path '%s'", ldr.Root())
} }
err = openapi.SetSchemaVersion(subKt.Kustomization().OpenAPI, false) var bytes []byte
path := ldr.Root()
if openApiPath, exists := subKt.Kustomization().OpenAPI["path"]; exists {
bytes, err = ldr.Load(filepath.Join(path, openApiPath))
if err != nil {
return nil, err
}
}
err = openapi.SetSchema(subKt.Kustomization().OpenAPI, bytes, false)
if err != nil { if err != nil {
return nil, errors.Wrapf( return nil, err
err, "couldn't set openapi version for path '%s'", ldr.Root())
} }
if isComponent && subKt.kustomization.Kind != types.ComponentKind { if isComponent && subKt.kustomization.Kind != types.ComponentKind {
return nil, fmt.Errorf( return nil, fmt.Errorf(

View File

@@ -42,6 +42,14 @@ func (o *multiTransformer) transform(m resmap.ResMap) error {
return err return err
} }
} }
for _, r := range m.Resources() {
if r.IsEmpty() {
err := m.Remove(r.CurId())
if err != nil {
return err
}
}
}
return nil return nil
} }

View File

@@ -1,25 +0,0 @@
// +build tools
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
// This file exists to automatically trigger installs
// of the given tools, and is the official 'unofficial'
// way to declare a dependence on a Go binary until
// some better technique comes along.
package tools
import (
// for code generation
_ "golang.org/x/tools/cmd/stringer"
// for lint checks
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
// REMOVED pluginator from this process, and leaving
// this note to discourage its reintroduction,
// because pluginator depends on the api, forcing
// major version increments in pluginator with each
// api release to allow this trick to work and not
// introduce cycles.
// _ "sigs.k8s.io/kustomize/cmd/pluginator/v2"
)

View File

@@ -170,6 +170,16 @@ func (wn *WNode) SetDataMap(m map[string]string) {
wn.node.SetDataMap(m) wn.node.SetDataMap(m)
} }
// GetBinaryDataMap implements ifc.Kunstructured.
func (wn *WNode) GetBinaryDataMap() map[string]string {
return wn.node.GetBinaryDataMap()
}
// SetBinaryDataMap implements ifc.Kunstructured.
func (wn *WNode) SetBinaryDataMap(m map[string]string) {
wn.node.SetBinaryDataMap(m)
}
// GetKind implements ifc.Kunstructured. // GetKind implements ifc.Kunstructured.
func (wn *WNode) GetKind() string { func (wn *WNode) GetKind() string {
return wn.demandMetaData("GetKind").Kind return wn.demandMetaData("GetKind").Kind

View File

@@ -1,70 +0,0 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
// 2019 Nov 06 These notes are somewhat out of date, but left
// for historical purposes need to be updated (or simply removed
// with all the code). The kubectl integration plan described
// below is no longer the plan of record.
//
// --------
//
// It's possible that kustomize's features will be vendored into
// the kubernetes/kubernetes repo and made available to kubectl
// commands, while at the same time the kustomize program will
// continue to exist as an independent CLI. Vendoring snapshots
// would be taken just before a kubectl release.
//
// This creates a problem in that freestanding-kustomize depends on
// (for example):
//
// https://github.com/kubernetes/apimachinery/
// tree/master/pkg/util/yaml
//
// It vendors that package into
// sigs.k8s.io/kustomize/vendor/k8s.io/apimachinery/
//
// Whereas kubectl-kustomize would have to depend on the "staging"
// version of this code, located at
//
// https://github.com/kubernetes/kubernetes/
// blob/master/staging/src/k8s.io/apimachinery/pkg/util/yaml
//
// which is "vendored" via symlinks:
// k8s.io/kubernetes/vendor/k8s.io/apimachinery
// is a symlink to
// ../../staging/src/k8s.io/apimachinery
//
// The staging version is the canonical, under-development
// version of the code that kubectl depends on, whereas the packages
// at kubernetes/apimachinery are periodic snapshots of staging made
// for outside tools to depend on.
//
// apimachinery isn't the only package that poses this problem, just
// using it as a specific example.
//
// The kubectl binary cannot vendor in kustomize code that in
// turn vendors in the non-staging packages.
//
// One way to fix some of this would be to copy code - a hard fork.
// This has all the problems associated with a hard forking.
//
// Another way would be to break the kustomize repo into three:
//
// (1) kustomize - repo with the main() function,
// vendoring (2) and (3).
//
// (2) kustomize-libs - packages used by (1) with no
// apimachinery dependence.
//
// (3) kustomize-k8sdeps - A thin code layer that depends
// on (vendors) apimachinery to provide thin implementations
// to interfaces used in (2).
//
// The kubectl repo would then vendor from (2) only, and have
// a local implementation of (3). With that in mind, it's clear
// that (3) doesn't have to be a repo; the kustomize version of
// the thin layer can live directly in (1).
//
// This package is the code in (3), meant for kustomize.
package k8sdeps

View File

@@ -1,151 +0,0 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package kunstruct
import (
"bytes"
"fmt"
"io"
"strconv"
"strings"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/util/yaml"
"sigs.k8s.io/kustomize/api/ifc"
"sigs.k8s.io/kustomize/api/internal/k8sdeps/configmapandsecret"
"sigs.k8s.io/kustomize/api/konfig"
"sigs.k8s.io/kustomize/api/types"
)
// KunstructuredFactoryImpl makes instances of UnstructAdapter.
// These instances in turn adapt structs in
// k8s.io/apimachinery/pkg/apis/meta/v1/unstructured
// to implement ifc.Kunstructured.
// This factory is meant to implement ifc.KunstructuredFactory.
type KunstructuredFactoryImpl struct {
hasher *kustHash
}
var _ ifc.KunstructuredFactory = &KunstructuredFactoryImpl{}
// NewKunstructuredFactoryImpl returns a factory.
func NewKunstructuredFactoryImpl() ifc.KunstructuredFactory {
return &KunstructuredFactoryImpl{hasher: NewKustHash()}
}
// Hasher returns a kunstructured hasher
// input: kunstructured; output: string hash.
func (kf *KunstructuredFactoryImpl) Hasher() ifc.KunstructuredHasher {
return kf.hasher
}
// SliceFromBytes returns a slice of Kunstructured.
func (kf *KunstructuredFactoryImpl) SliceFromBytes(
in []byte) ([]ifc.Kunstructured, error) {
decoder := yaml.NewYAMLOrJSONDecoder(bytes.NewReader(in), 1024)
var result []ifc.Kunstructured
var err error
for err == nil || isEmptyYamlError(err) {
var out unstructured.Unstructured
err = decoder.Decode(&out)
if err == nil {
if len(out.Object) == 0 {
continue
}
err = kf.validate(out)
if err != nil {
return nil, err
}
if !kf.skipResource(out) {
result = append(result, &UnstructAdapter{Unstructured: out})
}
}
}
if err != io.EOF {
return nil, err
}
return result, nil
}
func isEmptyYamlError(err error) bool {
return strings.Contains(err.Error(), "is missing in 'null'")
}
// FromMap returns an instance of Kunstructured.
func (kf *KunstructuredFactoryImpl) FromMap(
m map[string]interface{}) ifc.Kunstructured {
return &UnstructAdapter{Unstructured: unstructured.Unstructured{Object: m}}
}
// MakeConfigMap returns an instance of Kunstructured for ConfigMap
func (kf *KunstructuredFactoryImpl) MakeConfigMap(
kvLdr ifc.KvLoader, args *types.ConfigMapArgs) (ifc.Kunstructured, error) {
o, err := configmapandsecret.NewFactory(kvLdr).MakeConfigMap(args)
if err != nil {
return nil, err
}
return NewKunstructuredFromObject(o)
}
// MakeSecret returns an instance of Kunstructured for Secret
func (kf *KunstructuredFactoryImpl) MakeSecret(
kvLdr ifc.KvLoader, args *types.SecretArgs) (ifc.Kunstructured, error) {
o, err := configmapandsecret.NewFactory(kvLdr).MakeSecret(args)
if err != nil {
return nil, err
}
return NewKunstructuredFromObject(o)
}
// validate validates that u has kind and name
// except for kind `List`, which doesn't require a name
func (kf *KunstructuredFactoryImpl) validate(u unstructured.Unstructured) error {
kind := u.GetKind()
if kind == "" {
return fmt.Errorf("missing kind in object %v", u)
} else if strings.HasSuffix(kind, "List") {
return nil
}
if u.GetName() == "" {
return fmt.Errorf("missing metadata.name in object %v", u)
}
if result, path := checkListItemNil(u.Object); result {
return fmt.Errorf("empty item at %v in object %v", path, u)
}
return nil
}
// skipResource returns true if the Resource should not be accumulated
func (kf *KunstructuredFactoryImpl) skipResource(u unstructured.Unstructured) bool {
an := u.GetAnnotations()
if an == nil {
// annotation unset
return false
}
// check if the Resource has opt-ed out of kustomize
_, found := an[konfig.IgnoredByKustomizeAnnotation]
return found
}
func checkListItemNil(in interface{}) (bool, string) {
switch v := in.(type) {
case map[string]interface{}:
for key, s := range v {
if result, path := checkListItemNil(s); result {
return result, key + "/" + path
}
}
case []interface{}:
for index, s := range v {
if s == nil {
return true, ""
}
if result, path := checkListItemNil(s); result {
return result, "[" + strconv.Itoa(index) + "]/" + path
}
}
}
return false, ""
}

View File

@@ -1,237 +0,0 @@
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package kunstruct
import (
"reflect"
"testing"
"sigs.k8s.io/kustomize/api/ifc"
)
func TestSliceFromBytes(t *testing.T) {
factory := NewKunstructuredFactoryImpl()
testConfigMap := factory.FromMap(
map[string]interface{}{
"apiVersion": "v1",
"kind": "ConfigMap",
"metadata": map[string]interface{}{
"name": "winnie",
},
})
testList := factory.FromMap(
map[string]interface{}{
"apiVersion": "v1",
"kind": "List",
"items": []interface{}{
testConfigMap.Map(),
testConfigMap.Map(),
},
})
testConfigMapList := factory.FromMap(
map[string]interface{}{
"apiVersion": "v1",
"kind": "ConfigMapList",
"items": []interface{}{
testConfigMap.Map(),
testConfigMap.Map(),
},
})
tests := []struct {
name string
input []byte
expectedOut []ifc.Kunstructured
expectedErr bool
}{
{
name: "garbage",
input: []byte("garbageIn: garbageOut"),
expectedOut: []ifc.Kunstructured{},
expectedErr: true,
},
{
name: "noBytes",
input: []byte{},
expectedOut: []ifc.Kunstructured{},
expectedErr: false,
},
{
name: "goodJson",
input: []byte(`
{"apiVersion":"v1","kind":"ConfigMap","metadata":{"name":"winnie"}}
`),
expectedOut: []ifc.Kunstructured{testConfigMap},
expectedErr: false,
},
{
name: "goodYaml1",
input: []byte(`
apiVersion: v1
kind: ConfigMap
metadata:
name: winnie
`),
expectedOut: []ifc.Kunstructured{testConfigMap},
expectedErr: false,
},
{
name: "goodYaml2",
input: []byte(`
apiVersion: v1
kind: ConfigMap
metadata:
name: winnie
---
apiVersion: v1
kind: ConfigMap
metadata:
name: winnie
`),
expectedOut: []ifc.Kunstructured{testConfigMap, testConfigMap},
expectedErr: false,
},
{
name: "localConfigYaml",
input: []byte(`
apiVersion: v1
kind: ConfigMap
metadata:
name: winnie-skip
annotations:
# this annotation causes the Resource to be ignored by kustomize
config.kubernetes.io/local-config: ""
---
apiVersion: v1
kind: ConfigMap
metadata:
name: winnie
`),
expectedOut: []ifc.Kunstructured{testConfigMap},
expectedErr: false,
},
{
name: "garbageInOneOfTwoObjects",
input: []byte(`
apiVersion: v1
kind: ConfigMap
metadata:
name: winnie
---
WOOOOOOOOOOOOOOOOOOOOOOOOT: woot
`),
expectedOut: []ifc.Kunstructured{},
expectedErr: true,
},
{
name: "emptyObjects",
input: []byte(`
---
#a comment
---
`),
expectedOut: []ifc.Kunstructured{},
expectedErr: false,
},
{
name: "Missing .metadata.name in object",
input: []byte(`
apiVersion: v1
kind: Namespace
metadata:
annotations:
foo: bar
`),
expectedOut: nil,
expectedErr: true,
},
{
name: "nil value in list",
input: []byte(`
apiVersion: builtin
kind: ConfigMapGenerator
metadata:
name: kube100-site
labels:
app: web
testList:
- testA
-
`),
expectedOut: nil,
expectedErr: true,
},
{
name: "List",
input: []byte(`
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: ConfigMap
metadata:
name: winnie
- apiVersion: v1
kind: ConfigMap
metadata:
name: winnie
`),
expectedOut: []ifc.Kunstructured{testList},
expectedErr: false,
},
{
name: "ConfigMapList",
input: []byte(`
apiVersion: v1
kind: ConfigMapList
items:
- apiVersion: v1
kind: ConfigMap
metadata:
name: winnie
- apiVersion: v1
kind: ConfigMap
metadata:
name: winnie
`),
expectedOut: []ifc.Kunstructured{testConfigMapList},
expectedErr: false,
},
}
for _, test := range tests {
rs, err := factory.SliceFromBytes(test.input)
if test.expectedErr && err == nil {
t.Fatalf("%v: should return error", test.name)
}
if !test.expectedErr && err != nil {
t.Fatalf("%v: unexpected error: %s", test.name, err)
}
if len(rs) != len(test.expectedOut) {
t.Fatalf("%s: length mismatch %d != %d",
test.name, len(rs), len(test.expectedOut))
}
for i := range rs {
if !reflect.DeepEqual(test.expectedOut[i], rs[i]) {
t.Fatalf("%s: Got: %v\nexpected:%v",
test.name, test.expectedOut[i], rs[i])
}
}
}
}

View File

@@ -1,27 +0,0 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package kunstruct
import (
"sigs.k8s.io/kustomize/api/hasher"
"sigs.k8s.io/kustomize/api/ifc"
"sigs.k8s.io/kustomize/kyaml/filtersutil"
)
// kustHash computes a hash of an unstructured object.
type kustHash struct{}
// NewKustHash returns a kustHash object
func NewKustHash() *kustHash {
return &kustHash{}
}
// Hash returns a hash of the given object
func (h *kustHash) Hash(m ifc.Kunstructured) (string, error) {
node, err := filtersutil.GetRNode(m)
if err != nil {
return "", err
}
return hasher.HashRNode(node)
}

View File

@@ -1,34 +0,0 @@
package kunstruct
import (
"testing"
)
func TestHasher(t *testing.T) {
input := `
apiVersion: v1
kind: ConfigMap
metadata:
name: foo
data:
one: ""
binaryData:
two: ""
`
expect := "698h7c7t9m"
factory := NewKunstructuredFactoryImpl()
k, err := factory.SliceFromBytes([]byte(input))
if err != nil {
t.Fatal(err)
}
hasher := NewKustHash()
result, err := hasher.Hash(k[0])
if err != nil {
t.Fatal(err)
}
if result != expect {
t.Fatalf("expect %s but got %s", expect, result)
}
}

View File

@@ -1,95 +0,0 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
// Package kunstruct provides unstructured from api machinery and factory for creating unstructured
package kunstruct
import (
"fmt"
"strconv"
"strings"
)
// A PathSection contains a list of nested fields, which may end with an
// indexable value. For instance, foo.bar resolves to a PathSection with 2
// fields and no index, while foo[0].bar resolves to two path sections, the
// first containing the field foo and the index 0, and the second containing
// the field bar, with no index. The latter PathSection references the bar
// field of the first item in the foo list
type PathSection struct {
fields []string
idx int
}
func newPathSection() PathSection {
return PathSection{idx: -1}
}
func appendNonEmpty(section *PathSection, field string) {
if len(field) != 0 {
section.fields = append(section.fields, field)
}
}
func parseFields(path string) (result []PathSection, err error) {
section := newPathSection()
if !strings.Contains(path, "[") {
section.fields = strings.Split(path, ".")
result = append(result, section)
return result, nil
}
start := 0
insideParentheses := false
for i, c := range path {
switch c {
case '.':
if !insideParentheses {
appendNonEmpty(&section, path[start:i])
start = i + 1
}
case '[':
if !insideParentheses {
appendNonEmpty(&section, path[start:i])
start = i + 1
insideParentheses = true
} else {
return nil, fmt.Errorf("nested parentheses are not allowed: %s", path)
}
case ']':
if insideParentheses {
// Assign this index to the current
// PathSection, save it to the result, then begin
// a new PathSection
tmpIdx, err := strconv.Atoi(path[start:i])
if err == nil {
// We have detected an integer so an array.
section.idx = tmpIdx
} else {
// We have detected the downwardapi syntax
appendNonEmpty(&section, path[start:i])
}
result = append(result, section)
section = newPathSection()
start = i + 1
insideParentheses = false
} else {
return nil, fmt.Errorf("invalid field path %s", path)
}
}
}
if start < len(path)-1 {
appendNonEmpty(&section, path[start:])
result = append(result, section)
}
for _, section := range result {
for i, f := range section.fields {
if strings.HasPrefix(f, "\"") || strings.HasPrefix(f, "'") {
section.fields[i] = strings.Trim(f, "\"'")
}
}
}
return result, nil
}

View File

@@ -1,152 +0,0 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package kunstruct
import (
"reflect"
"testing"
)
type PathSectionSlice []PathSection
func buildPath(idx int, fields ...string) PathSectionSlice {
return PathSectionSlice{PathSection{fields: fields, idx: idx}}
}
func (a PathSectionSlice) addSection(idx int, fields ...string) PathSectionSlice {
return append(a, PathSection{fields: fields, idx: idx})
}
func TestParseField(t *testing.T) {
tests := []struct {
name string
pathToField string
expectedValue []PathSection
errorExpected bool
errorMsg string
}{
{
name: "oneField",
pathToField: "Kind",
expectedValue: buildPath(-1, "Kind"),
errorExpected: false,
},
{
name: "twoFields",
pathToField: "metadata.name",
expectedValue: buildPath(-1, "metadata", "name"),
errorExpected: false,
},
{
name: "threeFields",
pathToField: "spec.ports.port",
expectedValue: buildPath(-1, "spec", "ports", "port"),
errorExpected: false,
},
{
name: "empty",
pathToField: "",
expectedValue: buildPath(-1, ""),
errorExpected: false,
},
{
name: "validStringIndex",
pathToField: "that[1]",
expectedValue: buildPath(1, "that"),
errorExpected: false,
},
{
name: "sliceInSlice",
pathToField: "that[1][0]",
expectedValue: buildPath(1, "that").addSection(0),
errorExpected: false,
},
{
name: "validStructSubField",
pathToField: "those[1].field2",
expectedValue: buildPath(1, "those").addSection(-1, "field2"),
errorExpected: false,
},
{
name: "validStructSubFieldIndex",
pathToField: "these[1].field2[0]",
expectedValue: buildPath(1, "these").addSection(0, "field2"),
errorExpected: false,
},
{
name: "validStructSubFieldIndexSubfield",
pathToField: "complextree[1].field2[1].stringsubfield",
expectedValue: buildPath(1, "complextree").addSection(1, "field2").addSection(-1, "stringsubfield"),
errorExpected: false,
},
{
name: "validStructDownwardAPI",
pathToField: `metadata.labels["app.kubernetes.io/component"]`,
expectedValue: buildPath(-1, "metadata", "labels", "app.kubernetes.io/component"),
errorExpected: false,
},
{
name: "invalidIndexInIndex",
pathToField: "complextree[1[0]]",
errorExpected: true,
errorMsg: "nested parentheses are not allowed: complextree[1[0]]",
},
{
name: "invalidClosingBrackets",
pathToField: "complextree[1]]",
errorExpected: true,
errorMsg: "invalid field path complextree[1]]",
},
{
name: "validFieldsWithQuotes",
pathToField: "'complextree'[1].field2[1].'stringsubfield'",
expectedValue: buildPath(1, "complextree").addSection(1, "field2").addSection(-1, "stringsubfield"),
errorExpected: false,
},
}
for _, test := range tests {
s, err := parseFields(test.pathToField)
if test.errorExpected {
compareExpectedParserError(t, test.name, test.pathToField, err, test.errorMsg)
continue
}
if err != nil {
unExpectedParserError(t, test.name, test.pathToField, err)
}
compareParserValues(t, test.name, test.pathToField, test.expectedValue, s)
}
}
// unExpectedError function handles unexpected error
func unExpectedParserError(t *testing.T, name string, pathToField string, err error) {
t.Fatalf("%q; path %q - unexpected error %v", name, pathToField, err)
}
// compareExpectedError compares the expectedError and the actualError return by parseFields
func compareExpectedParserError(t *testing.T, name string, pathToField string, err error, errorMsg string) {
if err == nil {
t.Fatalf("%q; path %q - should return error, but no error returned",
name, pathToField)
}
if errorMsg != err.Error() {
t.Fatalf("%q; path %q - expected error: \"%s\", got error: \"%v\"",
name, pathToField, errorMsg, err.Error())
}
}
// compareValues compares the expectedValue and actualValue returned by parseFields
func compareParserValues(t *testing.T, name string, pathToField string, expectedValue PathSectionSlice, actualValue []PathSection) {
t.Helper()
if len(expectedValue) != len(actualValue) {
t.Fatalf("%q; Path: %s Got: %v Expected: %v", name, pathToField, actualValue, expectedValue)
}
for idx, expected := range expectedValue {
if !reflect.DeepEqual(expected, actualValue[idx]) {
t.Fatalf("%q; Path: %s idx: %v Fields Got: %v Expected: %v", name, pathToField, idx, actualValue[idx], expected)
}
}
}

View File

@@ -1,374 +0,0 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
// Package kunstruct provides unstructured from api machinery and factory for creating unstructured
package kunstruct
import (
"encoding/json"
"fmt"
"log"
jsonpatch "github.com/evanphx/json-patch"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/strategicpatch"
"k8s.io/client-go/kubernetes/scheme"
"sigs.k8s.io/kustomize/api/ifc"
"sigs.k8s.io/kustomize/api/resid"
)
var _ ifc.Kunstructured = &UnstructAdapter{}
// UnstructAdapter wraps unstructured.Unstructured from
// https://github.com/kubernetes/apimachinery/blob/master/
// pkg/apis/meta/v1/unstructured/unstructured.go
// to isolate dependence on apimachinery.
type UnstructAdapter struct {
unstructured.Unstructured
}
// NewKunstructuredFromObject returns a new instance of Kunstructured.
func NewKunstructuredFromObject(obj runtime.Object) (ifc.Kunstructured, error) {
// Convert obj to a byte stream, then convert that to JSON (Unstructured).
marshaled, err := json.Marshal(obj)
if err != nil {
return &UnstructAdapter{}, err
}
var u unstructured.Unstructured
err = u.UnmarshalJSON(marshaled)
// creationTimestamp always 'null', remove it
u.SetCreationTimestamp(metav1.Time{})
return &UnstructAdapter{Unstructured: u}, err
}
// GetGvk returns the Gvk name of the object.
func (fs *UnstructAdapter) GetGvk() resid.Gvk {
x := fs.GroupVersionKind()
return resid.Gvk{
Group: x.Group,
Version: x.Version,
Kind: x.Kind,
}
}
// SetGvk set the Gvk of the object to the input Gvk
func (fs *UnstructAdapter) SetGvk(g resid.Gvk) {
fs.SetGroupVersionKind(toSchemaGvk(g))
}
// Copy provides a copy behind an interface.
func (fs *UnstructAdapter) Copy() ifc.Kunstructured {
return &UnstructAdapter{*fs.DeepCopy()}
}
// Map returns the unstructured content map.
func (fs *UnstructAdapter) Map() map[string]interface{} {
return fs.Object
}
// SetMap overrides the unstructured content map.
func (fs *UnstructAdapter) SetMap(m map[string]interface{}) {
fs.Object = m
}
func (fs *UnstructAdapter) selectSubtree(path string) (map[string]interface{}, []string, bool, error) {
sections, err := parseFields(path)
if len(sections) == 0 || (err != nil) {
return nil, nil, false, err
}
content := fs.UnstructuredContent()
lastSectionIdx := len(sections)
// There are multiple sections to walk
for sectionIdx := 0; sectionIdx < lastSectionIdx; sectionIdx++ {
idx := sections[sectionIdx].idx
fields := sections[sectionIdx].fields
if idx == -1 {
// This section has no index
return content, fields, true, nil
}
// This section is terminated by an indexed field.
// Let's extract the slice first
indexedField, found, err := unstructured.NestedFieldNoCopy(content, fields...)
if !found || err != nil {
return content, fields, found, err
}
s, ok := indexedField.([]interface{})
if !ok {
return content, fields, false, fmt.Errorf("%v is of the type %T, expected []interface{}", indexedField, indexedField)
}
if idx >= len(s) {
return content, fields, false, fmt.Errorf("index %d is out of bounds", idx)
}
if sectionIdx == lastSectionIdx-1 {
// This is the last section. Let's build a fake map
// to let the rest of the field extraction to work.
idxstring := fmt.Sprintf("[%v]", idx)
newContent := map[string]interface{}{idxstring: s[idx]}
newFields := []string{idxstring}
return newContent, newFields, true, nil
}
newContent, ok := s[idx].(map[string]interface{})
if !ok {
// Only map are supported here
return content, fields, false,
fmt.Errorf("%#v is expected to be of type map[string]interface{}", s[idx])
}
content = newContent
}
// It seems to be an invalid path
return nil, []string{}, false, nil
}
// GetFieldValue returns the value at the given fieldpath.
func (fs *UnstructAdapter) GetFieldValue(path string) (interface{}, error) {
content, fields, found, err := fs.selectSubtree(path)
if !found || err != nil {
return nil, NoFieldError{Field: path}
}
s, found, err := unstructured.NestedFieldNoCopy(
content, fields...)
if found || err != nil {
return s, err
}
return nil, NoFieldError{Field: path}
}
// GetString returns value at the given fieldpath.
func (fs *UnstructAdapter) GetString(path string) (string, error) {
content, fields, found, err := fs.selectSubtree(path)
if !found || err != nil {
return "", NoFieldError{Field: path}
}
s, found, err := unstructured.NestedString(
content, fields...)
if found || err != nil {
return s, err
}
return "", NoFieldError{Field: path}
}
// GetStringSlice returns value at the given fieldpath.
func (fs *UnstructAdapter) GetStringSlice(path string) ([]string, error) {
content, fields, found, err := fs.selectSubtree(path)
if !found || err != nil {
return []string{}, NoFieldError{Field: path}
}
s, found, err := unstructured.NestedStringSlice(
content, fields...)
if found || err != nil {
return s, err
}
return []string{}, NoFieldError{Field: path}
}
// GetBool returns value at the given fieldpath.
func (fs *UnstructAdapter) GetBool(path string) (bool, error) {
content, fields, found, err := fs.selectSubtree(path)
if !found || err != nil {
return false, NoFieldError{Field: path}
}
s, found, err := unstructured.NestedBool(
content, fields...)
if found || err != nil {
return s, err
}
return false, NoFieldError{Field: path}
}
// GetFloat64 returns value at the given fieldpath.
func (fs *UnstructAdapter) GetFloat64(path string) (float64, error) {
content, fields, found, err := fs.selectSubtree(path)
if !found || err != nil {
return 0, err
}
s, found, err := unstructured.NestedFloat64(
content, fields...)
if found || err != nil {
return s, err
}
return 0, NoFieldError{Field: path}
}
// GetInt64 returns value at the given fieldpath.
func (fs *UnstructAdapter) GetInt64(path string) (int64, error) {
content, fields, found, err := fs.selectSubtree(path)
if !found || err != nil {
return 0, NoFieldError{Field: path}
}
s, found, err := unstructured.NestedInt64(
content, fields...)
if found || err != nil {
return s, err
}
return 0, NoFieldError{Field: path}
}
// GetSlice returns value at the given fieldpath.
func (fs *UnstructAdapter) GetSlice(path string) ([]interface{}, error) {
content, fields, found, err := fs.selectSubtree(path)
if !found || err != nil {
return nil, NoFieldError{Field: path}
}
s, found, err := unstructured.NestedSlice(
content, fields...)
if found || err != nil {
return s, err
}
return nil, NoFieldError{Field: path}
}
// GetStringMap returns value at the given fieldpath.
func (fs *UnstructAdapter) GetStringMap(path string) (map[string]string, error) {
content, fields, found, err := fs.selectSubtree(path)
if !found || err != nil {
return nil, NoFieldError{Field: path}
}
s, found, err := unstructured.NestedStringMap(
content, fields...)
if found || err != nil {
return s, err
}
return nil, NoFieldError{Field: path}
}
func (fs *UnstructAdapter) GetDataMap() map[string]string {
m, err := fs.GetStringMap("data")
if err != nil {
return map[string]string{}
}
return m
}
func (fs *UnstructAdapter) SetDataMap(m map[string]string) {
if m == nil {
unstructured.RemoveNestedField(fs.Object, "data")
return
}
s := make(map[string]interface{}, len(m))
for i, v := range m {
s[i] = v
}
err := unstructured.SetNestedMap(fs.Object, s, "data")
if err != nil {
log.Fatal(err)
}
}
// GetMap returns value at the given fieldpath.
func (fs *UnstructAdapter) GetMap(path string) (map[string]interface{}, error) {
content, fields, found, err := fs.selectSubtree(path)
if !found || err != nil {
return nil, NoFieldError{Field: path}
}
s, found, err := unstructured.NestedMap(
content, fields...)
if found || err != nil {
return s, err
}
return nil, NoFieldError{Field: path}
}
func (fs *UnstructAdapter) MatchesLabelSelector(selector string) (bool, error) {
s, err := labels.Parse(selector)
if err != nil {
return false, err
}
return s.Matches(labels.Set(fs.GetLabels())), nil
}
func (fs *UnstructAdapter) MatchesAnnotationSelector(selector string) (bool, error) {
s, err := labels.Parse(selector)
if err != nil {
return false, err
}
return s.Matches(labels.Set(fs.GetAnnotations())), nil
}
func (fs *UnstructAdapter) Patch(patch ifc.Kunstructured) error {
versionedObj, err := scheme.Scheme.New(
toSchemaGvk(patch.GetGvk()))
merged := map[string]interface{}{}
saveName := fs.GetName()
switch {
case runtime.IsNotRegisteredError(err):
baseBytes, err := json.Marshal(fs.Map())
if err != nil {
return err
}
patchBytes, err := json.Marshal(patch.Map())
if err != nil {
return err
}
mergedBytes, err := jsonpatch.MergePatch(baseBytes, patchBytes)
if err != nil {
return err
}
err = json.Unmarshal(mergedBytes, &merged)
if err != nil {
return err
}
case err != nil:
return err
default:
// Use Strategic-Merge-Patch to handle types w/ schema
// TODO: Change this to use the new Merge package.
// Store the name of the target object, because this name may have been munged.
// Apply this name to the patched object.
lookupPatchMeta, err := strategicpatch.NewPatchMetaFromStruct(versionedObj)
if err != nil {
return err
}
merged, err = strategicpatch.StrategicMergeMapPatchUsingLookupPatchMeta(
fs.Map(),
patch.Map(),
lookupPatchMeta)
if err != nil {
return err
}
}
fs.SetMap(merged)
if len(fs.Map()) != 0 {
// if the patch deletes the object
// don't reset the name
fs.SetName(saveName)
}
return nil
}
// toSchemaGvk converts to a schema.GroupVersionKind.
func toSchemaGvk(x resid.Gvk) schema.GroupVersionKind {
return schema.GroupVersionKind{
Group: x.Group,
Version: x.Version,
Kind: x.Kind,
}
}
// NoFieldError is returned when a field is expected, but missing.
type NoFieldError struct {
Field string
}
func (e NoFieldError) Error() string {
return fmt.Sprintf("no field named '%s'", e.Field)
}

View File

@@ -1,697 +0,0 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package kunstruct
import (
"reflect"
"testing"
"github.com/stretchr/testify/assert"
)
var kunstructured = NewKunstructuredFactoryImpl().FromMap(map[string]interface{}{
"Kind": "Service",
"metadata": map[string]interface{}{
"labels": map[string]interface{}{
"app": "application-name",
},
"name": "service-name",
},
"spec": map[string]interface{}{
"ports": map[string]interface{}{
"port": int64(80),
},
},
"this": map[string]interface{}{
"is": map[string]interface{}{
"aNumber": int64(1000),
"aFloat": float64(1.001),
"aNilValue": nil,
"aBool": true,
"anEmptyMap": map[string]interface{}{},
"anEmptySlice": []interface{}{},
"unrecognizable": testing.InternalExample{
Name: "fooBar",
},
},
},
"that": []interface{}{
"idx0",
"idx1",
"idx2",
"idx3",
},
"those": []interface{}{
map[string]interface{}{
"field1": "idx0foo",
"field2": "idx0bar",
},
map[string]interface{}{
"field1": "idx1foo",
"field2": "idx1bar",
},
map[string]interface{}{
"field1": "idx2foo",
"field2": "idx2bar",
},
},
"these": []interface{}{
map[string]interface{}{
"field1": []interface{}{"idx010", "idx011"},
"field2": []interface{}{"idx020", "idx021"},
},
map[string]interface{}{
"field1": []interface{}{"idx110", "idx111"},
"field2": []interface{}{"idx120", "idx121"},
},
map[string]interface{}{
"field1": []interface{}{"idx210", "idx211"},
"field2": []interface{}{"idx220", "idx221"},
},
},
"complextree": []interface{}{
map[string]interface{}{
"field1": []interface{}{
map[string]interface{}{
"stringsubfield": "idx1010",
"intsubfield": int64(1010),
"floatsubfield": float64(1.010),
"boolfield": true,
},
map[string]interface{}{
"stringsubfield": "idx1011",
"intsubfield": int64(1011),
"floatsubfield": float64(1.011),
"boolfield": false,
},
},
"field2": []interface{}{
map[string]interface{}{
"stringsubfield": "idx1020",
"intsubfield": int64(1020),
"floatsubfield": float64(1.020),
"boolfield": true,
},
map[string]interface{}{
"stringsubfield": "idx1021",
"intsubfield": int64(1021),
"floatsubfield": float64(1.021),
"boolfield": false,
},
},
},
map[string]interface{}{
"field1": []interface{}{
map[string]interface{}{
"stringsubfield": "idx1110",
"intsubfield": int64(1110),
"floatsubfield": float64(1.110),
"boolfield": true,
},
map[string]interface{}{
"stringsubfield": "idx1111",
"intsubfield": int64(1111),
"floatsubfield": float64(1.111),
"boolfield": false,
},
},
"field2": []interface{}{
map[string]interface{}{
"stringsubfield": "idx1120",
"intsubfield": int64(1120),
"floatsubfield": float64(1.1120),
"boolfield": true,
},
map[string]interface{}{
"stringsubfield": "idx1121",
"intsubfield": int64(1121),
"floatsubfield": float64(1.1121),
"boolfield": false,
},
},
},
},
})
func TestGetFieldValue(t *testing.T) {
tests := []struct {
name string
pathToField string
expectedValue interface{}
errorExpected bool
errorMsg string
}{
{
name: "oneField",
pathToField: "Kind",
expectedValue: "Service",
errorExpected: false,
},
{
name: "twoFields",
pathToField: "metadata.name",
expectedValue: "service-name",
errorExpected: false,
},
{
name: "threeFields",
pathToField: "spec.ports.port",
expectedValue: int64(80),
errorExpected: false,
},
{
name: "empty",
pathToField: "",
errorExpected: true,
errorMsg: "no field named ''",
},
{
name: "emptyDotEmpty",
pathToField: ".",
errorExpected: true,
errorMsg: "no field named '.'",
},
{
name: "twoFieldsOneMissing",
pathToField: "metadata.banana",
errorExpected: true,
errorMsg: "no field named 'metadata.banana'",
},
{
name: "deeperMissingField",
pathToField: "this.is.aDeep.field.that.does.not.exist",
errorExpected: true,
errorMsg: "no field named 'this.is.aDeep.field.that.does.not.exist'",
},
{
name: "emptyMap",
pathToField: "this.is.anEmptyMap",
errorExpected: false,
expectedValue: map[string]interface{}{},
},
{
name: "emptySlice",
pathToField: "this.is.anEmptySlice",
errorExpected: false,
expectedValue: []interface{}{},
},
{
name: "numberAsValue",
pathToField: "this.is.aNumber",
errorExpected: false,
expectedValue: int64(1000),
},
{
name: "floatAsValue",
pathToField: "this.is.aFloat",
errorExpected: false,
expectedValue: float64(1.001),
},
{
name: "boolAsValue",
pathToField: "this.is.aBool",
errorExpected: false,
expectedValue: true,
},
{
name: "nilAsValue",
pathToField: "this.is.aNilValue",
errorExpected: false,
expectedValue: nil,
},
{
name: "unrecognizable",
pathToField: "this.is.unrecognizable.Name",
errorExpected: true,
errorMsg: ".this.is.unrecognizable.Name accessor error: {fooBar <nil> false} is of the type testing.InternalExample, expected map[string]interface{}",
},
{
name: "validStringIndex",
pathToField: "that[2]",
expectedValue: "idx2",
errorExpected: false,
},
{
name: "outOfBoundIndex",
pathToField: "that[99]",
errorMsg: "no field named 'that[99]'",
errorExpected: true,
},
{
name: "accessorError",
pathToField: "that[downwardapi]",
errorMsg: ".that.downwardapi accessor error: [idx0 idx1 idx2 idx3] is of the type []interface {}, expected map[string]interface{}",
errorExpected: true,
},
{
name: "unknownSlice",
pathToField: "unknown[0]",
errorMsg: "no field named 'unknown[0]'",
errorExpected: true,
},
{
name: "sliceInSlice",
pathToField: "that[2][0]",
errorExpected: true,
errorMsg: "no field named 'that[2][0]'",
},
{
name: "validStructIndex",
pathToField: "those[1]",
errorExpected: false,
expectedValue: map[string]interface{}{"field1": "idx1foo", "field2": "idx1bar"},
},
{
name: "validStructSubField",
pathToField: "those[1].field2",
errorExpected: false,
expectedValue: "idx1bar",
},
{
name: "validStructSubFieldIndex",
pathToField: "these[1].field2[1]",
errorExpected: false,
expectedValue: "idx121",
},
{
name: "validStructSubFieldOutOfBoundIndex",
pathToField: "these[1].field2[99]",
errorExpected: true,
errorMsg: "no field named 'these[1].field2[99]'",
},
{
name: "validStructSubFieldIndexSubfield",
pathToField: "complextree[1].field2[1].stringsubfield",
errorExpected: false,
expectedValue: "idx1121",
},
{
name: "validStructSubFieldIndexInvalidName",
pathToField: "complextree[1].field2[1].invalidsubfield",
errorExpected: true,
errorMsg: "no field named 'complextree[1].field2[1].invalidsubfield'",
},
{
name: "validDownwardAPILabels",
pathToField: `metadata.labels["app"]`,
errorExpected: false,
expectedValue: "application-name",
},
{
name: "validDownwardAPISpecs",
pathToField: `spec.ports['port']`,
errorExpected: false,
expectedValue: int64(80),
},
{
name: "validDownwardAPIThis",
pathToField: `this.is[aFloat]`,
errorExpected: false,
expectedValue: float64(1.001),
},
{
name: "downwardAPIInvalidLabel",
pathToField: `metadata.labels["theisnotanint"]`,
errorExpected: true,
errorMsg: `no field named 'metadata.labels["theisnotanint"]'`,
},
{
name: "downwardAPIInvalidLabel2",
pathToField: `invalidfield.labels["app"]`,
errorExpected: true,
errorMsg: `no field named 'invalidfield.labels["app"]'`,
},
{
name: "invalidIndexInIndex",
pathToField: "complextree[1[0]]",
errorExpected: true,
errorMsg: "no field named 'complextree[1[0]]'",
},
{
name: "invalidClosingBrackets",
pathToField: "complextree[1]]",
errorExpected: true,
errorMsg: "no field named 'complextree[1]]'",
},
{
name: "validFieldsWithQuotes",
pathToField: "'complextree'[1].field2[1].'stringsubfield'",
errorExpected: false,
expectedValue: "idx1121",
},
}
for _, test := range tests {
s, err := kunstructured.GetFieldValue(test.pathToField)
if test.errorExpected {
compareExpectedError(t, test.name, test.pathToField, err, test.errorMsg)
continue
}
if err != nil {
unExpectedError(t, test.name, test.pathToField, err)
}
compareValues(t, test.name, test.pathToField, test.expectedValue, s)
}
}
func TestGetString(t *testing.T) {
tests := []struct {
name string
pathToField string
expectedValue string
errorExpected bool
errorMsg string
}{
{
name: "oneField",
pathToField: "Kind",
expectedValue: "Service",
errorExpected: false,
},
{
name: "twoFields",
pathToField: "metadata.name",
expectedValue: "service-name",
errorExpected: false,
},
{
name: "emptyMap",
pathToField: "this.is.anEmptyMap",
errorExpected: true,
errorMsg: ".this.is.anEmptyMap accessor error: map[] is of the type map[string]interface {}, expected string",
},
{
name: "twoFieldsOneMissing",
pathToField: "metadata.banana",
errorExpected: true,
errorMsg: "no field named 'metadata.banana'",
},
{
name: "emptySlice",
pathToField: "this.is.anEmptySlice",
errorExpected: true,
errorMsg: ".this.is.anEmptySlice accessor error: [] is of the type []interface {}, expected string",
},
{
name: "numberAsValue",
pathToField: "this.is.aNumber",
errorExpected: true,
errorMsg: ".this.is.aNumber accessor error: 1000 is of the type int64, expected string",
},
{
name: "nilAsValue",
pathToField: "this.is.aNilValue",
errorExpected: true,
errorMsg: ".this.is.aNilValue accessor error: <nil> is of the type <nil>, expected string",
},
{
name: "validStringIndex",
pathToField: "that[2]",
expectedValue: "idx2",
errorExpected: false,
},
{
name: "validStructIndex",
pathToField: "those[1]",
errorExpected: true,
errorMsg: ".[1] accessor error: map[field1:idx1foo field2:idx1bar] is of the type map[string]interface {}, expected string",
},
{
name: "validStructSubField",
pathToField: "those[1].field2",
errorExpected: false,
expectedValue: "idx1bar",
},
{
name: "validStructSubFieldIndex",
pathToField: "these[1].field2[1]",
errorExpected: false,
expectedValue: "idx121",
},
{
name: "validStructSubFieldIndexSubfield",
pathToField: "complextree[1].field2[1].stringsubfield",
errorExpected: false,
expectedValue: "idx1121",
},
{
name: "invalidIndexInMap",
pathToField: "this.is[1]",
errorExpected: true,
errorMsg: "no field named 'this.is[1]'",
},
{
name: "anotherInvalidIndexInMap",
pathToField: "this.is[1].aString",
errorExpected: true,
errorMsg: "no field named 'this.is[1].aString'",
},
{
name: "validDownwardAPIField",
pathToField: `metadata.labels["app"]`,
errorExpected: false,
expectedValue: "application-name",
},
}
for _, test := range tests {
s, err := kunstructured.GetString(test.pathToField)
if test.errorExpected {
compareExpectedError(t, test.name, test.pathToField, err, test.errorMsg)
continue
}
if err != nil {
unExpectedError(t, test.name, test.pathToField, err)
}
compareValues(t, test.name, test.pathToField, test.expectedValue, s)
}
}
func TestGetSlice(t *testing.T) {
tests := []struct {
name string
pathToField string
errorExpected bool
errorMsg string
}{
{
name: "validSlice1",
pathToField: "that",
errorExpected: false,
},
{
name: "validSlice2",
pathToField: "those",
errorExpected: false,
},
{
name: "validSlice3",
pathToField: "these",
errorExpected: false,
},
{
name: "validSlice4",
pathToField: "complextree",
errorExpected: false,
},
{
name: "twoFieldsOneMissing",
pathToField: "metadata.banana",
errorExpected: true,
errorMsg: "no field named 'metadata.banana'",
},
{
name: "validStructSubFieldOutOfBoundIndex",
pathToField: "these[1].field2[99]",
errorExpected: true,
errorMsg: "no field named 'these[1].field2[99]'",
},
}
for _, test := range tests {
_, err := kunstructured.GetSlice(test.pathToField)
if test.errorExpected {
compareExpectedError(t, test.name, test.pathToField, err, test.errorMsg)
continue
}
if err != nil {
unExpectedError(t, test.name, test.pathToField, err)
}
}
}
// unExpectedError function handles unexpected error
func unExpectedError(t *testing.T, name string, pathToField string, err error) {
t.Fatalf("%q; path %q - unexpected error %v", name, pathToField, err)
}
// compareExpectedError compares the expectedError and the actualError return by GetFieldValue
func compareExpectedError(t *testing.T, name string, pathToField string, err error, errorMsg string) {
if err == nil {
t.Fatalf("%q; path %q - should return error, but no error returned",
name, pathToField)
}
if errorMsg != err.Error() {
t.Fatalf("%q; path %q - expected error: \"%s\", got error: \"%v\"",
name, pathToField, errorMsg, err.Error())
}
}
// compareValues compares the expectedValue and actualValue returned by GetFieldValue
func compareValues(t *testing.T, name string, pathToField string, expectedValue interface{}, actualValue interface{}) {
t.Helper()
switch typedV := expectedValue.(type) {
case nil, string, bool, float64, int, int64:
if expectedValue != actualValue {
t.Fatalf("%q; Got: %v Expected: %v", name, actualValue, expectedValue)
}
case map[string]interface{}:
if !reflect.DeepEqual(expectedValue, actualValue) {
t.Fatalf("%q; Got: %v Expected: %v", name, actualValue, expectedValue)
}
case []interface{}:
if !reflect.DeepEqual(expectedValue, actualValue) {
t.Fatalf("%q; Got: %v Expected: %v", name, actualValue, expectedValue)
}
default:
t.Logf("%T value at `%s`", typedV, pathToField)
}
}
func TestKunstGetDataMap(t *testing.T) {
emptyMap := map[string]string{}
testCases := map[string]struct {
theMap map[string]interface{}
expected map[string]string
}{
"actuallyNil": {
theMap: nil,
expected: emptyMap,
},
"empty": {
theMap: map[string]interface{}{},
expected: emptyMap,
},
"mostlyEmpty": {
theMap: map[string]interface{}{
"hey": "there",
},
expected: emptyMap,
},
"noNameConfigMap": {
theMap: map[string]interface{}{
"apiVersion": "v1",
"kind": "ConfigMap",
},
expected: emptyMap,
},
"configMap": {
theMap: map[string]interface{}{
"apiVersion": "v1",
"kind": "ConfigMap",
"metadata": map[string]interface{}{
"name": "winnie",
},
"data": map[string]interface{}{
"wine": "cabernet",
"truck": "ford",
"rocket": "falcon9",
"planet": "mars",
"city": "brownsville",
},
},
// order irrelevant, because assert.Equals is smart about maps.
expected: map[string]string{
"city": "brownsville",
"wine": "cabernet",
"planet": "mars",
"rocket": "falcon9",
"truck": "ford",
},
},
}
for n := range testCases {
tc := testCases[n]
t.Run(n, func(t *testing.T) {
kunstr := NewKunstructuredFactoryImpl().FromMap(tc.theMap)
m := kunstr.GetDataMap()
if !assert.Equal(t, tc.expected, m) {
t.FailNow()
}
})
}
}
func TestKunstSetDataMap(t *testing.T) {
testCases := map[string]struct {
theMap map[string]interface{}
input map[string]string
expected map[string]string
}{
"empty": {
theMap: map[string]interface{}{},
input: map[string]string{
"wine": "cabernet",
"truck": "ford",
},
expected: map[string]string{
"wine": "cabernet",
"truck": "ford",
},
},
"replace": {
theMap: map[string]interface{}{
"foo": 3,
"data": map[string]string{
"rocket": "falcon9",
"planet": "mars",
},
},
input: map[string]string{
"wine": "cabernet",
"truck": "ford",
},
expected: map[string]string{
"wine": "cabernet",
"truck": "ford",
},
},
"clear1": {
theMap: map[string]interface{}{
"foo": 3,
"data": map[string]string{
"rocket": "falcon9",
"planet": "mars",
},
},
input: map[string]string{},
expected: map[string]string{},
},
"clear2": {
theMap: map[string]interface{}{
"foo": 3,
"data": map[string]string{
"rocket": "falcon9",
"planet": "mars",
},
},
input: nil,
expected: map[string]string{},
},
}
for n := range testCases {
tc := testCases[n]
t.Run(n, func(t *testing.T) {
kunstr := NewKunstructuredFactoryImpl().FromMap(tc.theMap)
kunstr.SetDataMap(tc.input)
m := kunstr.GetDataMap()
if !assert.Equal(t, tc.expected, m) {
t.FailNow()
}
})
}
}

View File

@@ -1,105 +0,0 @@
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
// Package validator provides functions to validate labels, annotations,
// namespaces and configmap/secret keys using apimachinery functions.
package validator
import (
"errors"
"fmt"
"strings"
apivalidation "k8s.io/apimachinery/pkg/api/validation"
v1validation "k8s.io/apimachinery/pkg/apis/meta/v1/validation"
"k8s.io/apimachinery/pkg/util/validation"
"k8s.io/apimachinery/pkg/util/validation/field"
"sigs.k8s.io/kustomize/api/ifc"
)
// KustValidator validates Labels and annotations by apimachinery
type KustValidator struct{}
var _ ifc.Validator = (*KustValidator)(nil)
// NewKustValidator returns a KustValidator object
func NewKustValidator() *KustValidator {
return &KustValidator{}
}
func (v *KustValidator) ErrIfInvalidKey(k string) error {
if errs := validation.IsConfigMapKey(k); len(errs) != 0 {
return fmt.Errorf(
"%q is not a valid key name: %s",
k, strings.Join(errs, ";"))
}
return nil
}
func (v *KustValidator) IsEnvVarName(k string) error {
if errs := validation.IsEnvVarName(k); len(errs) != 0 {
return fmt.Errorf(
"%q is not a valid key name: %s",
k, strings.Join(errs, ";"))
}
return nil
}
// MakeAnnotationValidator returns a MapValidatorFunc using apimachinery.
func (v *KustValidator) MakeAnnotationValidator() func(map[string]string) error {
return func(x map[string]string) error {
errs := apivalidation.ValidateAnnotations(x, field.NewPath("field"))
if len(errs) > 0 {
return errors.New(errs.ToAggregate().Error())
}
return nil
}
}
// MakeAnnotationNameValidator returns a MapValidatorFunc using apimachinery.
func (v *KustValidator) MakeAnnotationNameValidator() func([]string) error {
return func(x []string) error {
errs := field.ErrorList{}
fldPath := field.NewPath("field")
for _, k := range x {
for _, msg := range validation.IsQualifiedName(strings.ToLower(k)) {
errs = append(errs, field.Invalid(fldPath, k, msg))
}
}
if len(errs) > 0 {
return errors.New(errs.ToAggregate().Error())
}
return nil
}
}
// MakeLabelValidator returns a MapValidatorFunc using apimachinery.
func (v *KustValidator) MakeLabelValidator() func(map[string]string) error {
return func(x map[string]string) error {
errs := v1validation.ValidateLabels(x, field.NewPath("field"))
if len(errs) > 0 {
return errors.New(errs.ToAggregate().Error())
}
return nil
}
}
// MakeLabelNameValidator returns a ArrayValidatorFunc using apimachinery.
func (v *KustValidator) MakeLabelNameValidator() func([]string) error {
return func(x []string) error {
errs := field.ErrorList{}
fldPath := field.NewPath("field")
for _, k := range x {
errs = append(errs, v1validation.ValidateLabelName(k, fldPath)...)
}
if len(errs) > 0 {
return errors.New(errs.ToAggregate().Error())
}
return nil
}
}
// ValidateNamespace validates a string is a valid namespace using apimachinery.
func (v *KustValidator) ValidateNamespace(s string) []string {
return validation.IsDNS1123Label(s)
}

View File

@@ -128,6 +128,8 @@ nameReference:
kind: Role kind: Role
- path: rules/resourceNames - path: rules/resourceNames
kind: ClusterRole kind: ClusterRole
- path: metadata/annotations/nginx.ingress.kubernetes.io\/fastcgi-params-configmap
kind: Ingress
- kind: Secret - kind: Secret
version: v1 version: v1

View File

@@ -32,8 +32,7 @@ const (
// FlagEnableKyamlDefaultValue is the default value for the --enable_kyaml // FlagEnableKyamlDefaultValue is the default value for the --enable_kyaml
// flag. This value is also used in unit tests. See provider.DepProvider. // flag. This value is also used in unit tests. See provider.DepProvider.
// //
// TODO(#3304): eliminate branching on this constant. // TODO(#3588): Delete this constant.
// Details: https://github.com/kubernetes-sigs/kustomize/issues/3304
// //
// All tests should pass for either true or false values // All tests should pass for either true or false values
// of this constant, without having to check its value. // of this constant, without having to check its value.
@@ -43,7 +42,7 @@ const (
// Historically, tests passed for enable_kyaml == false, i.e. using // Historically, tests passed for enable_kyaml == false, i.e. using
// apimachinery libs. This doesn't mean the code was better, it just // apimachinery libs. This doesn't mean the code was better, it just
// means regression tests preserved those outcomes. // means regression tests preserved those outcomes.
FlagEnableKyamlDefaultValue = false FlagEnableKyamlDefaultValue = true
// An environment variable to consult for kustomization // An environment variable to consult for kustomization
// configuration data. See: // configuration data. See:

View File

@@ -15,19 +15,19 @@ import (
func TestTargetMustHaveKustomizationFile(t *testing.T) { func TestTargetMustHaveKustomizationFile(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("/app/service.yaml", ` th.WriteF("service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: aService name: aService
`) `)
th.WriteF("/app/deeper/service.yaml", ` th.WriteF("deeper/service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: anotherService name: anotherService
`) `)
err := th.RunWithErr("/app", th.MakeDefaultOptions()) err := th.RunWithErr(".", th.MakeDefaultOptions())
if err == nil { if err == nil {
t.Fatalf("expected an error") t.Fatalf("expected an error")
} }
@@ -39,27 +39,27 @@ metadata:
func TestTargetMustHaveOnlyOneKustomizationFile(t *testing.T) { func TestTargetMustHaveOnlyOneKustomizationFile(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
for _, n := range konfig.RecognizedKustomizationFileNames() { for _, n := range konfig.RecognizedKustomizationFileNames() {
th.WriteF(filepath.Join("/app", n), ` th.WriteF(filepath.Join(".", n), `
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
`) `)
} }
err := th.RunWithErr("/app", th.MakeDefaultOptions()) err := th.RunWithErr(".", th.MakeDefaultOptions())
if err == nil { if err == nil {
t.Fatalf("expected an error") t.Fatalf("expected an error")
} }
if !strings.Contains(err.Error(), "Found multiple kustomization files under: /app") { if !strings.Contains(err.Error(), "Found multiple kustomization files") {
t.Fatalf("unexpected error: %q", err) t.Fatalf("unexpected error: %q", err)
} }
} }
func TestBaseMustHaveKustomizationFile(t *testing.T) { func TestBaseMustHaveKustomizationFile(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- base - base
`) `)
th.WriteF("/app/base/service.yaml", ` th.WriteF("base/service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@@ -70,7 +70,7 @@ spec:
ports: ports:
- port: 7002 - port: 7002
`) `)
err := th.RunWithErr("/app", th.MakeDefaultOptions()) err := th.RunWithErr(".", th.MakeDefaultOptions())
if err == nil { if err == nil {
t.Fatalf("expected an error") t.Fatalf("expected an error")
} }
@@ -81,11 +81,11 @@ spec:
func TestResourceNotFound(t *testing.T) { func TestResourceNotFound(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- deployment.yaml - deployment.yaml
`) `)
err := th.RunWithErr("/app", th.MakeDefaultOptions()) err := th.RunWithErr(".", th.MakeDefaultOptions())
if err == nil { if err == nil {
t.Fatalf("expected an error") t.Fatalf("expected an error")
} }
@@ -96,11 +96,11 @@ resources:
func TestResourceHasAnchor(t *testing.T) { func TestResourceHasAnchor(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- ingress.yaml - ingress.yaml
`) `)
th.WriteF("/app/ingress.yaml", ` th.WriteF("ingress.yaml", `
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
@@ -125,7 +125,7 @@ spec:
- host: www.xyz.me - host: www.xyz.me
http: *xxx_rules http: *xxx_rules
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress

View File

@@ -10,7 +10,7 @@ import (
) )
func writeMediumBase(th kusttest_test.Harness) { func writeMediumBase(th kusttest_test.Harness) {
th.WriteK("/app/base", ` th.WriteK("base", `
namePrefix: baseprefix- namePrefix: baseprefix-
commonLabels: commonLabels:
foo: bar foo: bar
@@ -20,7 +20,7 @@ resources:
- deployment/deployment.yaml - deployment/deployment.yaml
- service/service.yaml - service/service.yaml
`) `)
th.WriteF("/app/base/service/service.yaml", ` th.WriteF("base/service/service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@@ -33,7 +33,7 @@ spec:
selector: selector:
app: mungebot app: mungebot
`) `)
th.WriteF("/app/base/deployment/deployment.yaml", ` th.WriteF("base/deployment/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -61,7 +61,7 @@ spec:
func TestMediumBase(t *testing.T) { func TestMediumBase(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeMediumBase(th) writeMediumBase(th)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -115,7 +115,7 @@ spec:
func TestMediumOverlay(t *testing.T) { func TestMediumOverlay(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeMediumBase(th) writeMediumBase(th)
th.WriteK("/app/overlay", ` th.WriteK("overlay", `
namePrefix: test-infra- namePrefix: test-infra-
commonLabels: commonLabels:
app: mungebot app: mungebot
@@ -140,24 +140,24 @@ images:
- name: nginx - name: nginx
newTag: 1.8.0`) newTag: 1.8.0`)
th.WriteF("/app/overlay/configmap/db.env", ` th.WriteF("overlay/configmap/db.env", `
DB_USERNAME=admin DB_USERNAME=admin
DB_PASSWORD=somepw DB_PASSWORD=somepw
`) `)
th.WriteF("/app/overlay/configmap/units.ini", ` th.WriteF("overlay/configmap/units.ini", `
LENGTH=kilometer LENGTH=kilometer
ENERGY=electronvolt ENERGY=electronvolt
`) `)
th.WriteF("/app/overlay/configmap/food.ini", ` th.WriteF("overlay/configmap/food.ini", `
FRUIT=banana FRUIT=banana
LEGUME=chickpea LEGUME=chickpea
`) `)
th.WriteF("/app/overlay/configmap/dummy.txt", th.WriteF("overlay/configmap/dummy.txt",
`Lorem ipsum dolor sit amet, consectetur `Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. incididunt ut labore et dolore magna aliqua.
`) `)
th.WriteF("/app/overlay/deployment/deployment.yaml", ` th.WriteF("overlay/deployment/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -190,7 +190,7 @@ spec:
name: app-env name: app-env
name: app-env name: app-env
`) `)
m := th.Run("/app/overlay", th.MakeDefaultOptions()) m := th.Run("overlay", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment

View File

@@ -14,7 +14,7 @@ import (
func TestOrderPreserved(t *testing.T) { func TestOrderPreserved(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/base", ` th.WriteK("base", `
namePrefix: b- namePrefix: b-
resources: resources:
- namespace.yaml - namespace.yaml
@@ -22,50 +22,50 @@ resources:
- service.yaml - service.yaml
- deployment.yaml - deployment.yaml
`) `)
th.WriteF("/app/base/service.yaml", ` th.WriteF("base/service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: myService name: myService
`) `)
th.WriteF("/app/base/namespace.yaml", ` th.WriteF("base/namespace.yaml", `
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: myNs name: myNs
`) `)
th.WriteF("/app/base/role.yaml", ` th.WriteF("base/role.yaml", `
apiVersion: v1 apiVersion: v1
kind: Role kind: Role
metadata: metadata:
name: myRole name: myRole
`) `)
th.WriteF("/app/base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: myDep name: myDep
`) `)
th.WriteK("/app/prod", ` th.WriteK("prod", `
namePrefix: p- namePrefix: p-
resources: resources:
- ../base - ../base
- service.yaml - service.yaml
- namespace.yaml - namespace.yaml
`) `)
th.WriteF("/app/prod/service.yaml", ` th.WriteF("prod/service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: myService2 name: myService2
`) `)
th.WriteF("/app/prod/namespace.yaml", ` th.WriteF("prod/namespace.yaml", `
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: myNs2 name: myNs2
`) `)
m := th.Run("/app/prod", th.MakeDefaultOptions()) m := th.Run("prod", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
@@ -101,17 +101,17 @@ metadata:
func TestBaseInResourceList(t *testing.T) { func TestBaseInResourceList(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/prod", ` th.WriteK("prod", `
namePrefix: b- namePrefix: b-
resources: resources:
- ../base - ../base
`) `)
th.WriteK("/app/base", ` th.WriteK("base", `
namePrefix: a- namePrefix: a-
resources: resources:
- service.yaml - service.yaml
`) `)
th.WriteF("/app/base/service.yaml", ` th.WriteF("base/service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@@ -120,7 +120,7 @@ spec:
selector: selector:
backend: bungie backend: bungie
`) `)
m := th.Run("/app/prod", th.MakeDefaultOptions()) m := th.Run("prod", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@@ -181,7 +181,7 @@ spec:
} }
func writeSmallBase(th kusttest_test.Harness) { func writeSmallBase(th kusttest_test.Harness) {
th.WriteK("/app/base", ` th.WriteK("base", `
namePrefix: a- namePrefix: a-
commonLabels: commonLabels:
app: myApp app: myApp
@@ -189,7 +189,7 @@ resources:
- deployment.yaml - deployment.yaml
- service.yaml - service.yaml
`) `)
th.WriteF("/app/base/service.yaml", ` th.WriteF("base/service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@@ -200,7 +200,7 @@ spec:
ports: ports:
- port: 7002 - port: 7002
`) `)
th.WriteF("/app/base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -220,7 +220,7 @@ spec:
func TestSmallBase(t *testing.T) { func TestSmallBase(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeSmallBase(th) writeSmallBase(th)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -260,7 +260,7 @@ spec:
func TestSmallOverlay(t *testing.T) { func TestSmallOverlay(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeSmallBase(th) writeSmallBase(th)
th.WriteK("/app/overlay", ` th.WriteK("overlay", `
namePrefix: b- namePrefix: b-
commonLabels: commonLabels:
env: prod env: prod
@@ -275,15 +275,15 @@ images:
newTag: 1.8.0 newTag: 1.8.0
`) `)
th.WriteF("/app/overlay/configmap/app.env", ` th.WriteF("overlay/configmap/app.env", `
DB_USERNAME=admin DB_USERNAME=admin
DB_PASSWORD=somepw DB_PASSWORD=somepw
`) `)
th.WriteF("/app/overlay/configmap/app-init.ini", ` th.WriteF("overlay/configmap/app-init.ini", `
FOO=bar FOO=bar
BAR=baz BAR=baz
`) `)
th.WriteF("/app/overlay/deployment/deployment.yaml", ` th.WriteF("overlay/deployment/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -291,7 +291,7 @@ metadata:
spec: spec:
replicas: 1000 replicas: 1000
`) `)
m := th.Run("/app/overlay", th.MakeDefaultOptions()) m := th.Run("overlay", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -347,7 +347,7 @@ spec:
func TestSharedPatchDisAllowed(t *testing.T) { func TestSharedPatchDisAllowed(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeSmallBase(th) writeSmallBase(th)
th.WriteK("/app/overlay", ` th.WriteK("overlay", `
commonLabels: commonLabels:
env: prod env: prod
resources: resources:
@@ -355,7 +355,7 @@ resources:
patchesStrategicMerge: patchesStrategicMerge:
- ../shared/deployment-patch.yaml - ../shared/deployment-patch.yaml
`) `)
th.WriteF("/app/shared/deployment-patch.yaml", ` th.WriteF("shared/deployment-patch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -363,14 +363,14 @@ metadata:
spec: spec:
replicas: 1000 replicas: 1000
`) `)
err := th.RunWithErr("/app/overlay", func() Options { err := th.RunWithErr("overlay", func() Options {
o := th.MakeDefaultOptions() o := th.MakeDefaultOptions()
o.LoadRestrictions = types.LoadRestrictionsRootOnly o.LoadRestrictions = types.LoadRestrictionsRootOnly
return o return o
}()) }())
if !strings.Contains( if !strings.Contains(
err.Error(), err.Error(),
"security; file '/app/shared/deployment-patch.yaml' is not in or below '/app/overlay'") { "security; file '/shared/deployment-patch.yaml' is not in or below '/overlay'") {
t.Fatalf("unexpected error: %s", err) t.Fatalf("unexpected error: %s", err)
} }
} }
@@ -378,7 +378,7 @@ spec:
func TestSharedPatchAllowed(t *testing.T) { func TestSharedPatchAllowed(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeSmallBase(th) writeSmallBase(th)
th.WriteK("/app/overlay", ` th.WriteK("overlay", `
commonLabels: commonLabels:
env: prod env: prod
resources: resources:
@@ -386,7 +386,7 @@ resources:
patchesStrategicMerge: patchesStrategicMerge:
- ../shared/deployment-patch.yaml - ../shared/deployment-patch.yaml
`) `)
th.WriteF("/app/shared/deployment-patch.yaml", ` th.WriteF("shared/deployment-patch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -394,7 +394,7 @@ metadata:
spec: spec:
replicas: 1000 replicas: 1000
`) `)
m := th.Run("/app/overlay", func() Options { m := th.Run("overlay", func() Options {
o := th.MakeDefaultOptions() o := th.MakeDefaultOptions()
o.LoadRestrictions = types.LoadRestrictionsNone o.LoadRestrictions = types.LoadRestrictionsNone
return o return o
@@ -444,7 +444,7 @@ spec:
func TestSmallOverlayJSONPatch(t *testing.T) { func TestSmallOverlayJSONPatch(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeSmallBase(th) writeSmallBase(th)
th.WriteK("/app/overlay", ` th.WriteK("overlay", `
resources: resources:
- ../base - ../base
patchesJson6902: patchesJson6902:
@@ -455,12 +455,12 @@ patchesJson6902:
path: service-patch.yaml path: service-patch.yaml
`) `)
th.WriteF("/app/overlay/service-patch.yaml", ` th.WriteF("overlay/service-patch.yaml", `
- op: add - op: add
path: /spec/selector/backend path: /spec/selector/backend
value: beagle value: beagle
`) `)
m := th.Run("/app/overlay", th.MakeDefaultOptions()) m := th.Run("overlay", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment

View File

@@ -41,37 +41,37 @@ import (
func TestBaseReuseNameConflict(t *testing.T) { func TestBaseReuseNameConflict(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/component1/base", ` th.WriteK("component1/base", `
resources: resources:
- ../../shared - ../../shared
namePrefix: component1- namePrefix: component1-
`) `)
th.WriteK("/app/component1/overlay", ` th.WriteK("component1/overlay", `
resources: resources:
- ../base - ../base
namePrefix: overlay- namePrefix: overlay-
`) `)
th.WriteK("/app/component2/base", ` th.WriteK("component2/base", `
resources: resources:
- ../../shared - ../../shared
namePrefix: component2- namePrefix: component2-
`) `)
th.WriteK("/app/component2/overlay", ` th.WriteK("component2/overlay", `
resources: resources:
- ../base - ../base
namePrefix: overlay- namePrefix: overlay-
`) `)
th.WriteK("/app/shared", ` th.WriteK("shared", `
resources: resources:
- resources.yaml - resources.yaml
`) `)
th.WriteF("/app/shared/resources.yaml", ` th.WriteF("shared/resources.yaml", `
--- ---
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
@@ -111,13 +111,13 @@ spec:
claimName: postgres claimName: postgres
`) `)
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- component1/overlay - component1/overlay
- component2/overlay - component2/overlay
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim

View File

@@ -32,13 +32,13 @@ func TestChartInflatorPlugin(t *testing.T) {
PrepExecPlugin("someteam.example.com", "v1", "ChartInflator") PrepExecPlugin("someteam.example.com", "v1", "ChartInflator")
defer th.Reset() defer th.Reset()
th.WriteK("/app", ` th.WriteK(".", `
generators: generators:
- chartInflator.yaml - chartInflator.yaml
namePrefix: LOOOOOOOONG- namePrefix: LOOOOOOOONG-
`) `)
th.WriteF("/app/chartInflator.yaml", ` th.WriteF("./chartInflator.yaml", `
apiVersion: someteam.example.com/v1 apiVersion: someteam.example.com/v1
kind: ChartInflator kind: ChartInflator
metadata: metadata:
@@ -46,7 +46,7 @@ metadata:
chartName: minecraft chartName: minecraft
`) `)
m := th.Run("/app", th.MakeOptionsPluginsEnabled()) m := th.Run(".", th.MakeOptionsPluginsEnabled())
chartName := regexp.MustCompile("chart: minecraft-[0-9.]+") chartName := regexp.MustCompile("chart: minecraft-[0-9.]+")
th.AssertActualEqualsExpectedWithTweak(m, th.AssertActualEqualsExpectedWithTweak(m,
func(x []byte) []byte { func(x []byte) []byte {

View File

@@ -27,11 +27,11 @@ spec:
` `
func writeStatefulSetBase(th kusttest_test.Harness) { func writeStatefulSetBase(th kusttest_test.Harness) {
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- statefulset.yaml - statefulset.yaml
`) `)
th.WriteF("/app/base/statefulset.yaml", ` th.WriteF("base/statefulset.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
@@ -56,15 +56,15 @@ spec:
} }
func writeHTTPSOverlay(th kusttest_test.Harness) { func writeHTTPSOverlay(th kusttest_test.Harness) {
th.WriteK("/app/https", ` th.WriteK("https", `
resources: resources:
- ../base - ../base
- https-svc.yaml - https-svc.yaml
patchesStrategicMerge: patchesStrategicMerge:
- sts-patch.yaml - sts-patch.yaml
`) `)
th.WriteF("/app/https/https-svc.yaml", httpsService) th.WriteF("https/https-svc.yaml", httpsService)
th.WriteF("/app/https/sts-patch.yaml", ` th.WriteF("https/sts-patch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
@@ -75,8 +75,8 @@ spec:
} }
func writeHTTPSTransformerRaw(th kusttest_test.Harness) { func writeHTTPSTransformerRaw(th kusttest_test.Harness) {
th.WriteF("/app/https/service/https-svc.yaml", httpsService) th.WriteF("https/service/https-svc.yaml", httpsService)
th.WriteF("/app/https/transformer/transformer.yaml", ` th.WriteF("https/transformer/transformer.yaml", `
apiVersion: builtin apiVersion: builtin
kind: PatchTransformer kind: PatchTransformer
metadata: metadata:
@@ -97,11 +97,11 @@ patch: |-
} }
func writeHTTPSTransformerBase(th kusttest_test.Harness) { func writeHTTPSTransformerBase(th kusttest_test.Harness) {
th.WriteK("/app/https/service", ` th.WriteK("https/service", `
resources: resources:
- https-svc.yaml - https-svc.yaml
`) `)
th.WriteK("/app/https/transformer", ` th.WriteK("https/transformer", `
resources: resources:
- transformer.yaml - transformer.yaml
`) `)
@@ -109,7 +109,7 @@ resources:
} }
func writeConfigFromEnvOverlay(th kusttest_test.Harness) { func writeConfigFromEnvOverlay(th kusttest_test.Harness) {
th.WriteK("/app/config", ` th.WriteK("config", `
resources: resources:
- ../base - ../base
configMapGenerator: configMapGenerator:
@@ -121,7 +121,7 @@ generatorOptions:
patchesStrategicMerge: patchesStrategicMerge:
- sts-patch.yaml - sts-patch.yaml
`) `)
th.WriteF("/app/config/sts-patch.yaml", ` th.WriteF("config/sts-patch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
@@ -138,7 +138,7 @@ spec:
} }
func writeConfigFromEnvTransformerRaw(th kusttest_test.Harness) { func writeConfigFromEnvTransformerRaw(th kusttest_test.Harness) {
th.WriteF("/app/config/map/generator.yaml", ` th.WriteF("config/map/generator.yaml", `
apiVersion: builtin apiVersion: builtin
kind: ConfigMapGenerator kind: ConfigMapGenerator
metadata: metadata:
@@ -148,7 +148,7 @@ options:
literals: literals:
- MY_ENV=foo - MY_ENV=foo
`) `)
th.WriteF("/app/config/transformer/transformer.yaml", ` th.WriteF("config/transformer/transformer.yaml", `
apiVersion: builtin apiVersion: builtin
kind: PatchTransformer kind: PatchTransformer
metadata: metadata:
@@ -174,11 +174,11 @@ patch: |-
`) `)
} }
func writeConfigFromEnvTransformerBase(th kusttest_test.Harness) { func writeConfigFromEnvTransformerBase(th kusttest_test.Harness) {
th.WriteK("/app/config/map", ` th.WriteK("config/map", `
resources: resources:
- generator.yaml - generator.yaml
`) `)
th.WriteK("/app/config/transformer", ` th.WriteK("config/transformer", `
resources: resources:
- transformer.yaml - transformer.yaml
`) `)
@@ -186,13 +186,13 @@ resources:
} }
func writeTolerationsOverlay(th kusttest_test.Harness) { func writeTolerationsOverlay(th kusttest_test.Harness) {
th.WriteK("/app/tolerations", ` th.WriteK("tolerations", `
resources: resources:
- ../base - ../base
patchesStrategicMerge: patchesStrategicMerge:
- sts-patch.yaml - sts-patch.yaml
`) `)
th.WriteF("/app/tolerations/sts-patch.yaml", ` th.WriteF("tolerations/sts-patch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
@@ -208,7 +208,7 @@ spec:
} }
func writeTolerationsTransformerRaw(th kusttest_test.Harness) { func writeTolerationsTransformerRaw(th kusttest_test.Harness) {
th.WriteF("/app/tolerations/transformer.yaml", ` th.WriteF("tolerations/transformer.yaml", `
apiVersion: builtin apiVersion: builtin
kind: PatchTransformer kind: PatchTransformer
metadata: metadata:
@@ -234,7 +234,7 @@ patch: |-
} }
func writeTolerationsTransformerBase(th kusttest_test.Harness) { func writeTolerationsTransformerBase(th kusttest_test.Harness) {
th.WriteK("/app/tolerations", ` th.WriteK("tolerations", `
resources: resources:
- transformer.yaml - transformer.yaml
`) `)
@@ -242,7 +242,7 @@ resources:
} }
func writeStorageOverlay(th kusttest_test.Harness) { func writeStorageOverlay(th kusttest_test.Harness) {
th.WriteK("/app/storage", ` th.WriteK("storage", `
resources: resources:
- ../base - ../base
patchesJson6902: patchesJson6902:
@@ -253,13 +253,13 @@ patchesJson6902:
name: my-sts name: my-sts
path: sts-patch.json path: sts-patch.json
`) `)
th.WriteF("/app/storage/sts-patch.json", ` th.WriteF("storage/sts-patch.json", `
[{"op": "replace", "path": "/spec/volumeClaimTemplates/0/spec/storageClassName", "value": "my-sc"}] [{"op": "replace", "path": "/spec/volumeClaimTemplates/0/spec/storageClassName", "value": "my-sc"}]
`) `)
} }
func writeStorageTransformerRaw(th kusttest_test.Harness) { func writeStorageTransformerRaw(th kusttest_test.Harness) {
th.WriteF("/app/storage/transformer.yaml", ` th.WriteF("storage/transformer.yaml", `
apiVersion: builtin apiVersion: builtin
kind: PatchTransformer kind: PatchTransformer
metadata: metadata:
@@ -275,7 +275,7 @@ patch: |-
} }
func writeStorageTransformerBase(th kusttest_test.Harness) { func writeStorageTransformerBase(th kusttest_test.Harness) {
th.WriteK("/app/storage", ` th.WriteK("storage", `
resources: resources:
- transformer.yaml - transformer.yaml
`) `)
@@ -358,12 +358,12 @@ func TestComplexComposition_Dev_Failure(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeStatefulSetBase(th) writeStatefulSetBase(th)
writePatchingOverlays(th) writePatchingOverlays(th)
th.WriteK("/app/dev", ` th.WriteK("dev", `
resources: resources:
- ../storage - ../storage
- ../config - ../config
`) `)
err := th.RunWithErr("/app/dev", th.MakeDefaultOptions()) err := th.RunWithErr("dev", th.MakeDefaultOptions())
if err == nil { if err == nil {
t.Fatalf("Expected resource accumulation error") t.Fatalf("Expected resource accumulation error")
} }
@@ -410,7 +410,7 @@ func TestComplexComposition_Dev_SuccessWithRawTransformers(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeStatefulSetBase(th) writeStatefulSetBase(th)
writePatchingTransformersRaw(th) writePatchingTransformersRaw(th)
th.WriteK("/app/dev", ` th.WriteK("dev", `
resources: resources:
- ../base - ../base
generators: generators:
@@ -419,7 +419,7 @@ transformers:
- ../config/transformer/transformer.yaml - ../config/transformer/transformer.yaml
- ../storage/transformer.yaml - ../storage/transformer.yaml
`) `)
m := th.Run("/app/dev", func() Options { m := th.Run("dev", func() Options {
o := th.MakeDefaultOptions() o := th.MakeDefaultOptions()
o.LoadRestrictions = types.LoadRestrictionsNone o.LoadRestrictions = types.LoadRestrictionsNone
return o return o
@@ -431,7 +431,7 @@ func TestComplexComposition_Dev_SuccessWithBaseTransformers(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeStatefulSetBase(th) writeStatefulSetBase(th)
writePatchingTransformerBases(th) writePatchingTransformerBases(th)
th.WriteK("/app/dev", ` th.WriteK("dev", `
resources: resources:
- ../base - ../base
generators: generators:
@@ -440,7 +440,7 @@ transformers:
- ../config/transformer - ../config/transformer
- ../storage - ../storage
`) `)
m := th.Run("/app/dev", th.MakeDefaultOptions()) m := th.Run("dev", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, devDesiredResult) th.AssertActualEqualsExpected(m, devDesiredResult)
} }
@@ -448,13 +448,13 @@ func TestComplexComposition_Prod_Failure(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeStatefulSetBase(th) writeStatefulSetBase(th)
writePatchingOverlays(th) writePatchingOverlays(th)
th.WriteK("/app/prod", ` th.WriteK("prod", `
resources: resources:
- ../config - ../config
- ../tolerations - ../tolerations
- ../https - ../https
`) `)
err := th.RunWithErr("/app/prod", th.MakeDefaultOptions()) err := th.RunWithErr("prod", th.MakeDefaultOptions())
if err == nil { if err == nil {
t.Fatalf("Expected resource accumulation error") t.Fatalf("Expected resource accumulation error")
} }
@@ -517,7 +517,7 @@ func TestComplexComposition_Prod_SuccessWithRawTransformers(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeStatefulSetBase(th) writeStatefulSetBase(th)
writePatchingTransformersRaw(th) writePatchingTransformersRaw(th)
th.WriteK("/app/prod", ` th.WriteK("prod", `
resources: resources:
- ../base - ../base
- ../https/service/https-svc.yaml - ../https/service/https-svc.yaml
@@ -528,7 +528,7 @@ transformers:
- ../https/transformer/transformer.yaml - ../https/transformer/transformer.yaml
- ../tolerations/transformer.yaml - ../tolerations/transformer.yaml
`) `)
m := th.Run("/app/prod", func() Options { m := th.Run("prod", func() Options {
o := th.MakeDefaultOptions() o := th.MakeDefaultOptions()
o.LoadRestrictions = types.LoadRestrictionsNone o.LoadRestrictions = types.LoadRestrictionsNone
return o return o
@@ -540,7 +540,7 @@ func TestComplexComposition_Prod_SuccessWithBaseTransformers(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeStatefulSetBase(th) writeStatefulSetBase(th)
writePatchingTransformerBases(th) writePatchingTransformerBases(th)
th.WriteK("/app/prod", ` th.WriteK("prod", `
resources: resources:
- ../base - ../base
- ../https/service - ../https/service
@@ -551,6 +551,6 @@ transformers:
- ../https/transformer - ../https/transformer
- ../tolerations - ../tolerations
`) `)
m := th.Run("/app/prod", th.MakeDefaultOptions()) m := th.Run("prod", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, prodDesiredResult) th.AssertActualEqualsExpected(m, prodDesiredResult)
} }

View File

@@ -33,7 +33,7 @@ func writeK(path string, content string) FileGen {
} }
func writeTestBase(th kusttest_test.Harness) { func writeTestBase(th kusttest_test.Harness) {
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deploy.yaml - deploy.yaml
configMapGenerator: configMapGenerator:
@@ -42,7 +42,7 @@ configMapGenerator:
- testValue=purple - testValue=purple
- otherValue=green - otherValue=green
`) `)
th.WriteF("/app/base/deploy.yaml", ` th.WriteF("base/deploy.yaml", `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -53,7 +53,7 @@ spec:
} }
func writeTestComponent(th kusttest_test.Harness) { func writeTestComponent(th kusttest_test.Harness) {
th.WriteC("/app/comp", ` th.WriteC("comp", `
namePrefix: comp- namePrefix: comp-
replicas: replicas:
- name: storefront - name: storefront
@@ -67,7 +67,7 @@ configMapGenerator:
- testValue=blue - testValue=blue
- compValue=red - compValue=red
`) `)
th.WriteF("/app/comp/stub.yaml", ` th.WriteF("comp/stub.yaml", `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -78,7 +78,7 @@ spec:
} }
func writeOverlayProd(th kusttest_test.Harness) { func writeOverlayProd(th kusttest_test.Harness) {
th.WriteK("/app/prod", ` th.WriteK("prod", `
resources: resources:
- ../base - ../base
- db - db
@@ -90,7 +90,7 @@ components:
} }
func writeDB(th kusttest_test.Harness) { func writeDB(th kusttest_test.Harness) {
deployment("db", "/app/prod/db")(th) deployment("db", "prod/db")(th)
} }
func deployment(name string, path string) FileGen { func deployment(name string, path string) FileGen {
@@ -114,7 +114,7 @@ func TestComponent(t *testing.T) {
// resources that come before it in the resources list of the parent Kustomization. // resources that come before it in the resources list of the parent Kustomization.
"basic-component": { "basic-component": {
input: []FileGen{writeTestBase, writeTestComponent, writeOverlayProd}, input: []FileGen{writeTestBase, writeTestComponent, writeOverlayProd},
runPath: "/app/prod", runPath: "prod",
expectedOutput: ` expectedOutput: `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
@@ -149,14 +149,14 @@ spec:
}, },
"multiple-components": { "multiple-components": {
input: []FileGen{writeTestBase, writeTestComponent, writeDB, input: []FileGen{writeTestBase, writeTestComponent, writeDB,
writeC("/app/additionalcomp", ` writeC("additionalcomp", `
configMapGenerator: configMapGenerator:
- name: my-configmap - name: my-configmap
behavior: merge behavior: merge
literals: literals:
- otherValue=orange - otherValue=orange
`), `),
writeK("/app/prod", ` writeK("prod", `
resources: resources:
- ../base - ../base
- db - db
@@ -166,7 +166,7 @@ components:
- ../additionalcomp - ../additionalcomp
`), `),
}, },
runPath: "/app/prod", runPath: "prod",
expectedOutput: ` expectedOutput: `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
@@ -201,7 +201,7 @@ spec:
}, },
"nested-components": { "nested-components": {
input: []FileGen{writeTestBase, writeTestComponent, writeDB, input: []FileGen{writeTestBase, writeTestComponent, writeDB,
writeC("/app/additionalcomp", ` writeC("additionalcomp", `
components: components:
- ../comp - ../comp
configMapGenerator: configMapGenerator:
@@ -210,7 +210,7 @@ configMapGenerator:
literals: literals:
- otherValue=orange - otherValue=orange
`), `),
writeK("/app/prod", ` writeK("prod", `
resources: resources:
- ../base - ../base
- db - db
@@ -219,7 +219,7 @@ components:
- ../additionalcomp - ../additionalcomp
`), `),
}, },
runPath: "/app/prod", runPath: "prod",
expectedOutput: ` expectedOutput: `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
@@ -256,13 +256,13 @@ spec:
// without being affected by the component in another branch of the resource tree // without being affected by the component in another branch of the resource tree
"basic-component-with-repeated-base": { "basic-component-with-repeated-base": {
input: []FileGen{writeTestBase, writeTestComponent, writeOverlayProd, input: []FileGen{writeTestBase, writeTestComponent, writeOverlayProd,
writeK("/app/repeated", ` writeK("repeated", `
resources: resources:
- ../base - ../base
- ../prod - ../prod
`), `),
}, },
runPath: "/app/repeated", runPath: "repeated",
expectedOutput: ` expectedOutput: `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
@@ -312,7 +312,7 @@ spec:
}, },
"applying-component-directly-should-be-same-as-kustomization": { "applying-component-directly-should-be-same-as-kustomization": {
input: []FileGen{writeTestBase, writeTestComponent, input: []FileGen{writeTestBase, writeTestComponent,
writeC("/app/direct-component", ` writeC("direct-component", `
resources: resources:
- ../base - ../base
configMapGenerator: configMapGenerator:
@@ -323,7 +323,7 @@ configMapGenerator:
- testValue=blue - testValue=blue
`), `),
}, },
runPath: "/app/direct-component", runPath: "direct-component",
expectedOutput: ` expectedOutput: `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
@@ -344,7 +344,7 @@ metadata:
}, },
"missing-optional-component-api-version": { "missing-optional-component-api-version": {
input: []FileGen{writeTestBase, writeOverlayProd, input: []FileGen{writeTestBase, writeOverlayProd,
writeF("/app/comp/"+konfig.DefaultKustomizationFileName(), ` writeF("comp/"+konfig.DefaultKustomizationFileName(), `
kind: Component kind: Component
configMapGenerator: configMapGenerator:
- name: my-configmap - name: my-configmap
@@ -353,7 +353,7 @@ configMapGenerator:
- otherValue=orange - otherValue=orange
`), `),
}, },
runPath: "/app/prod", runPath: "prod",
expectedOutput: ` expectedOutput: `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
@@ -382,25 +382,25 @@ spec:
// accumulator when "comp-b" is accumulated. In practice we could use simple Kustomizations for this example. // accumulator when "comp-b" is accumulated. In practice we could use simple Kustomizations for this example.
"components-can-add-the-same-base-if-the-first-renames-resources": { "components-can-add-the-same-base-if-the-first-renames-resources": {
input: []FileGen{writeTestBase, input: []FileGen{writeTestBase,
deployment("proxy", "/app/comp-a/proxy.yaml"), deployment("proxy", "comp-a/proxy.yaml"),
writeC("/app/comp-a", ` writeC("comp-a", `
resources: resources:
- ../base - ../base
nameSuffix: "-a" nameSuffix: "-a"
`), `),
writeC("/app/comp-b", ` writeC("comp-b", `
resources: resources:
- ../base - ../base
nameSuffix: "-b" nameSuffix: "-b"
`), `),
writeK("/app/prod", ` writeK("prod", `
components: components:
- ../comp-a - ../comp-a
- ../comp-b`), - ../comp-b`),
}, },
runPath: "/app/prod", runPath: "prod",
expectedOutput: ` expectedOutput: `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
@@ -436,34 +436,34 @@ metadata:
"multiple-bases-can-add-the-same-component-if-it-doesn-not-define-named-entities": { "multiple-bases-can-add-the-same-component-if-it-doesn-not-define-named-entities": {
input: []FileGen{ input: []FileGen{
writeC("/app/comp", ` writeC("comp", `
namespace: prod namespace: prod
`), `),
writeK("/app/base-a", ` writeK("base-a", `
resources: resources:
- proxy.yaml - proxy.yaml
components: components:
- ../comp - ../comp
`), `),
deployment("proxy-a", "/app/base-a/proxy.yaml"), deployment("proxy-a", "base-a/proxy.yaml"),
writeK("/app/base-b", ` writeK("base-b", `
resources: resources:
- proxy.yaml - proxy.yaml
components: components:
- ../comp - ../comp
`), `),
deployment("proxy-b", "/app/base-b/proxy.yaml"), deployment("proxy-b", "base-b/proxy.yaml"),
writeK("/app/prod", ` writeK("prod", `
resources: resources:
- proxy.yaml - proxy.yaml
- ../base-a - ../base-a
- ../base-b - ../base-b
`), `),
deployment("proxy-prod", "/app/prod/proxy.yaml"), deployment("proxy-prod", "prod/proxy.yaml"),
}, },
runPath: "/app/prod", runPath: "prod",
// Note that the namepsace has not been applied to proxy-prod because it was not in scope when the // Note that the namepsace has not been applied to proxy-prod because it was not in scope when the
// component was applied // component was applied
expectedOutput: ` expectedOutput: `
@@ -513,30 +513,30 @@ func TestComponentErrors(t *testing.T) {
}{ }{
"components-cannot-be-added-to-resources": { "components-cannot-be-added-to-resources": {
input: []FileGen{writeTestBase, writeTestComponent, input: []FileGen{writeTestBase, writeTestComponent,
writeK("/app/compinres", ` writeK("compinres", `
resources: resources:
- ../base - ../base
- ../comp - ../comp
`), `),
}, },
runPath: "app/compinres", runPath: "compinres",
expectedError: "expected kind != 'Component' for path '/app/comp'", expectedError: "expected kind != 'Component' for path '/comp'",
}, },
"kustomizations-cannot-be-added-to-components": { "kustomizations-cannot-be-added-to-components": {
input: []FileGen{writeTestBase, writeTestComponent, input: []FileGen{writeTestBase, writeTestComponent,
writeK("/app/kustincomponents", ` writeK("kustincomponents", `
components: components:
- ../base - ../base
- ../comp - ../comp
`), `),
}, },
runPath: "/app/kustincomponents", runPath: "kustincomponents",
expectedError: "accumulating components: accumulateDirectory: \"expected kind 'Component' for path " + expectedError: "accumulating components: accumulateDirectory: \"expected kind 'Component' for path " +
"'/app/base' but got 'Kustomization'", "'/base' but got 'Kustomization'",
}, },
"files-cannot-be-added-to-components-list": { "files-cannot-be-added-to-components-list": {
input: []FileGen{writeTestBase, input: []FileGen{writeTestBase,
writeF("/app/filesincomponents/stub.yaml", ` writeF("filesincomponents/stub.yaml", `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -544,18 +544,18 @@ metadata:
spec: spec:
replicas: 1 replicas: 1
`), `),
writeK("/app/filesincomponents", ` writeK("filesincomponents", `
components: components:
- stub.yaml - stub.yaml
- ../comp - ../comp
`), `),
}, },
runPath: "/app/filesincomponents", runPath: "filesincomponents",
expectedError: "'/app/filesincomponents/stub.yaml' must be a directory to be a root", expectedError: "'/filesincomponents/stub.yaml' must be a directory to be a root",
}, },
"invalid-component-api-version": { "invalid-component-api-version": {
input: []FileGen{writeTestBase, writeOverlayProd, input: []FileGen{writeTestBase, writeOverlayProd,
writeF("/app/comp/"+konfig.DefaultKustomizationFileName(), ` writeF("comp/"+konfig.DefaultKustomizationFileName(), `
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Component kind: Component
configMapGenerator: configMapGenerator:
@@ -565,22 +565,22 @@ configMapGenerator:
- otherValue=orange - otherValue=orange
`), `),
}, },
runPath: "/app/prod", runPath: "prod",
expectedError: "apiVersion for Component should be kustomize.config.k8s.io/v1alpha1", expectedError: "apiVersion for Component should be kustomize.config.k8s.io/v1alpha1",
}, },
"components-cannot-add-the-same-resource": { "components-cannot-add-the-same-resource": {
input: []FileGen{writeTestBase, input: []FileGen{writeTestBase,
writeC("/app/comp-a", ` writeC("comp-a", `
resources: resources:
- proxy.yaml - proxy.yaml
`), `),
deployment("proxy", "/app/comp-a/proxy.yaml"), deployment("proxy", "comp-a/proxy.yaml"),
writeC("/app/comp-b", ` writeC("comp-b", `
resources: resources:
- proxy.yaml - proxy.yaml
`), `),
deployment("proxy", "/app/comp-b/proxy.yaml"), deployment("proxy", "comp-b/proxy.yaml"),
writeK("/app/prod", ` writeK("prod", `
resources: resources:
- ../base - ../base
@@ -588,49 +588,49 @@ components:
- ../comp-a - ../comp-a
- ../comp-b`), - ../comp-b`),
}, },
runPath: "/app/prod", runPath: "prod",
expectedError: "may not add resource with an already registered id: ~G_v1_Deployment|~X|proxy", expectedError: "may not add resource with an already registered id: ~G_v1_Deployment|~X|proxy",
}, },
"components-cannot-add-the-same-base": { "components-cannot-add-the-same-base": {
input: []FileGen{writeTestBase, input: []FileGen{writeTestBase,
deployment("proxy", "/app/comp-a/proxy.yaml"), deployment("proxy", "comp-a/proxy.yaml"),
writeC("/app/comp-a", ` writeC("comp-a", `
resources: resources:
- ../base - ../base
`), `),
writeC("/app/comp-b", ` writeC("comp-b", `
resources: resources:
- ../base - ../base
`), `),
writeK("/app/prod", ` writeK("prod", `
components: components:
- ../comp-a - ../comp-a
- ../comp-b`), - ../comp-b`),
}, },
runPath: "/app/prod", runPath: "prod",
expectedError: "may not add resource with an already registered id: ~G_v1_Deployment|~X|storefront", expectedError: "may not add resource with an already registered id: ~G_v1_Deployment|~X|storefront",
}, },
"components-cannot-add-bases-containing-the-same-resource": { "components-cannot-add-bases-containing-the-same-resource": {
input: []FileGen{writeTestBase, input: []FileGen{writeTestBase,
writeC("/app/comp-a", ` writeC("comp-a", `
resources: resources:
- ../base-a - ../base-a
`), `),
writeK("/app/base-a", ` writeK("base-a", `
resources: resources:
- proxy.yaml - proxy.yaml
`), `),
deployment("proxy", "/app/base-a/proxy.yaml"), deployment("proxy", "base-a/proxy.yaml"),
writeC("/app/comp-b", ` writeC("comp-b", `
resources: resources:
- ../base-b - ../base-b
`), `),
writeK("/app/base-b", ` writeK("base-b", `
resources: resources:
- proxy.yaml - proxy.yaml
`), `),
deployment("proxy", "/app/base-b/proxy.yaml"), deployment("proxy", "base-b/proxy.yaml"),
writeK("/app/prod", ` writeK("prod", `
resources: resources:
- ../base - ../base
@@ -638,7 +638,7 @@ components:
- ../comp-a - ../comp-a
- ../comp-b`), - ../comp-b`),
}, },
runPath: "/app/prod", runPath: "prod",
expectedError: "may not add resource with an already registered id: ~G_v1_Deployment|~X|proxy", expectedError: "may not add resource with an already registered id: ~G_v1_Deployment|~X|proxy",
}, },
} }

View File

@@ -123,7 +123,7 @@ metadata:
// to compare the result. // to compare the result.
func TestGeneratorBasics(t *testing.T) { func TestGeneratorBasics(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK(".", `
namePrefix: blah- namePrefix: blah-
configMapGenerator: configMapGenerator:
- name: bob - name: bob
@@ -154,23 +154,23 @@ secretGenerator:
- passphrase=phrase.dat - passphrase=phrase.dat
- forces.txt - forces.txt
`) `)
th.WriteF("/app/foo.env", ` th.WriteF("foo.env", `
MOUNTAIN=everest MOUNTAIN=everest
OCEAN=pacific OCEAN=pacific
`) `)
th.WriteF("/app/phrase.dat", ` th.WriteF("phrase.dat", `
Life is short. Life is short.
But the years are long. But the years are long.
Not while the evil days come not. Not while the evil days come not.
`) `)
th.WriteF("/app/forces.txt", ` th.WriteF("forces.txt", `
gravitational gravitational
electromagnetic electromagnetic
strong nuclear strong nuclear
weak nuclear weak nuclear
`) `)
opts := th.MakeDefaultOptions() opts := th.MakeDefaultOptions()
m := th.Run("/app", opts) m := th.Run(".", opts)
expFmt := `apiVersion: v1 expFmt := `apiVersion: v1
data: data:
MOUNTAIN: everest MOUNTAIN: everest
@@ -233,7 +233,7 @@ type: Opaque
// TODO: These should be errors instead. // TODO: These should be errors instead.
func TestGeneratorRepeatsInKustomization(t *testing.T) { func TestGeneratorRepeatsInKustomization(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK(".", `
namePrefix: blah- namePrefix: blah-
configMapGenerator: configMapGenerator:
- name: bob - name: bob
@@ -249,13 +249,13 @@ configMapGenerator:
files: files:
- nobles=nobility.txt - nobles=nobility.txt
`) `)
th.WriteF("/app/forces.txt", ` th.WriteF("forces.txt", `
gravitational gravitational
electromagnetic electromagnetic
strong nuclear strong nuclear
weak nuclear weak nuclear
`) `)
th.WriteF("/app/nobility.txt", ` th.WriteF("nobility.txt", `
helium helium
neon neon
argon argon
@@ -263,7 +263,7 @@ krypton
xenon xenon
radon radon
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
data: data:
@@ -345,9 +345,58 @@ metadata:
`) `)
} }
var binaryHello = []byte{
0xff, // non-utf8
0x68, // h
0x65, // e
0x6c, // l
0x6c, // l
0x6f, // o
}
func manyHellos(count int) (result []byte) {
for i := 0; i < count; i++ {
result = append(result, binaryHello...)
}
return
}
func TestGeneratorOverlaysBinaryData(t *testing.T) {
th := kusttest_test.MakeHarness(t)
th.WriteF("base/data.bin", string(manyHellos(30)))
th.WriteK("base", `
namePrefix: p1-
configMapGenerator:
- name: com1
behavior: create
files:
- data.bin
`)
th.WriteK("overlay", `
resources:
- ../base
configMapGenerator:
- name: com1
behavior: merge
`)
m := th.Run("overlay", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, `
apiVersion: v1
binaryData:
data.bin: |
/2hlbGxv/2hlbGxv/2hlbGxv/2hlbGxv/2hlbGxv/2hlbGxv/2hlbGxv/2hlbGxv/2hlbG
xv/2hlbGxv/2hlbGxv/2hlbGxv/2hlbGxv/2hlbGxv/2hlbGxv/2hlbGxv/2hlbGxv/2hl
bGxv/2hlbGxv/2hlbGxv/2hlbGxv/2hlbGxv/2hlbGxv/2hlbGxv/2hlbGxv/2hlbGxv/2
hlbGxv/2hlbGxv/2hlbGxv/2hlbGxv
kind: ConfigMap
metadata:
name: p1-com1-96gmmt6gt5
`)
}
func TestGeneratorOverlays(t *testing.T) { func TestGeneratorOverlays(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/base1", ` th.WriteK("base1", `
namePrefix: p1- namePrefix: p1-
configMapGenerator: configMapGenerator:
- name: com1 - name: com1
@@ -355,7 +404,7 @@ configMapGenerator:
literals: literals:
- from=base - from=base
`) `)
th.WriteK("/app/base2", ` th.WriteK("base2", `
namePrefix: p2- namePrefix: p2-
configMapGenerator: configMapGenerator:
- name: com2 - name: com2
@@ -363,7 +412,7 @@ configMapGenerator:
literals: literals:
- from=base - from=base
`) `)
th.WriteK("/app/overlay/o1", ` th.WriteK("overlay/o1", `
resources: resources:
- ../../base1 - ../../base1
configMapGenerator: configMapGenerator:
@@ -372,7 +421,7 @@ configMapGenerator:
literals: literals:
- from=overlay - from=overlay
`) `)
th.WriteK("/app/overlay/o2", ` th.WriteK("overlay/o2", `
resources: resources:
- ../../base2 - ../../base2
configMapGenerator: configMapGenerator:
@@ -381,7 +430,7 @@ configMapGenerator:
literals: literals:
- from=overlay - from=overlay
`) `)
th.WriteK("/app/overlay", ` th.WriteK("overlay", `
resources: resources:
- o1 - o1
- o2 - o2
@@ -392,7 +441,7 @@ configMapGenerator:
- foo=bar - foo=bar
- baz=qux - baz=qux
`) `)
m := th.Run("/app/overlay", th.MakeDefaultOptions()) m := th.Run("overlay", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
data: data:
@@ -415,24 +464,24 @@ metadata:
func TestConfigMapGeneratorMergeNamePrefix(t *testing.T) { func TestConfigMapGeneratorMergeNamePrefix(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/base", ` th.WriteK("base", `
configMapGenerator: configMapGenerator:
- name: cm - name: cm
behavior: create behavior: create
literals: literals:
- foo=bar - foo=bar
`) `)
th.WriteK("/app/o1", ` th.WriteK("o1", `
resources: resources:
- ../base - ../base
namePrefix: o1- namePrefix: o1-
`) `)
th.WriteK("/app/o2", ` th.WriteK("o2", `
resources: resources:
- ../base - ../base
nameSuffix: -o2 nameSuffix: -o2
`) `)
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- o1 - o1
- o2 - o2
@@ -446,7 +495,7 @@ configMapGenerator:
literals: literals:
- big=crunch - big=crunch
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
data: data:
@@ -468,11 +517,11 @@ metadata:
func TestConfigMapGeneratorLiteralNewline(t *testing.T) { func TestConfigMapGeneratorLiteralNewline(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK(".", `
generators: generators:
- configmaps.yaml - configmaps.yaml
`) `)
th.WriteF("/app/configmaps.yaml", ` th.WriteF("configmaps.yaml", `
apiVersion: builtin apiVersion: builtin
kind: ConfigMapGenerator kind: ConfigMapGenerator
metadata: metadata:
@@ -486,7 +535,7 @@ literals:
behavior behavior
--- ---
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected( th.AssertActualEqualsExpected(
m, ` m, `
apiVersion: v1 apiVersion: v1

View File

@@ -10,7 +10,7 @@ import (
) )
func writeBaseWithCrd(th kusttest_test.Harness) { func writeBaseWithCrd(th kusttest_test.Harness) {
th.WriteK("/app/base", ` th.WriteK("base", `
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
crds: crds:
@@ -23,7 +23,7 @@ resources:
namePrefix: x- namePrefix: x-
`) `)
th.WriteF("/app/base/bee.yaml", ` th.WriteF("base/bee.yaml", `
apiVersion: v1beta1 apiVersion: v1beta1
kind: Bee kind: Bee
metadata: metadata:
@@ -31,7 +31,7 @@ metadata:
spec: spec:
action: fly action: fly
`) `)
th.WriteF("/app/base/mykind.yaml", ` th.WriteF("base/mykind.yaml", `
apiVersion: jingfang.example.com/v1 apiVersion: jingfang.example.com/v1
kind: MyKind kind: MyKind
metadata: metadata:
@@ -42,7 +42,7 @@ spec:
beeRef: beeRef:
name: bee name: bee
`) `)
th.WriteF("/app/base/secret.yaml", ` th.WriteF("base/secret.yaml", `
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
@@ -50,7 +50,7 @@ metadata:
data: data:
PATH: yellowBrickRoad PATH: yellowBrickRoad
`) `)
th.WriteF("/app/base/mycrd.json", ` th.WriteF("base/mycrd.json", `
{ {
"github.com/example/pkg/apis/jingfang/v1beta1.Bee": { "github.com/example/pkg/apis/jingfang/v1beta1.Bee": {
"Schema": { "Schema": {
@@ -227,7 +227,7 @@ data:
func TestCrdBase(t *testing.T) { func TestCrdBase(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeBaseWithCrd(th) writeBaseWithCrd(th)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
data: data:
@@ -258,7 +258,7 @@ spec:
func TestCrdWithOverlay(t *testing.T) { func TestCrdWithOverlay(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeBaseWithCrd(th) writeBaseWithCrd(th)
th.WriteK("/app/overlay", ` th.WriteK("overlay", `
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
namePrefix: prod- namePrefix: prod-
@@ -267,7 +267,7 @@ resources:
patchesStrategicMerge: patchesStrategicMerge:
- bee.yaml - bee.yaml
`) `)
th.WriteF("/app/overlay/bee.yaml", ` th.WriteF("overlay/bee.yaml", `
apiVersion: v1beta1 apiVersion: v1beta1
kind: Bee kind: Bee
metadata: metadata:
@@ -275,7 +275,7 @@ metadata:
spec: spec:
action: makehoney action: makehoney
`) `)
m := th.Run("/app/overlay", th.MakeDefaultOptions()) m := th.Run("overlay", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
@@ -306,7 +306,7 @@ spec:
func TestCrdWithContainers(t *testing.T) { func TestCrdWithContainers(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/crd/containers", ` th.WriteK("crd/containers", `
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
@@ -316,7 +316,7 @@ images:
newName: registry.gitlab.com/test newName: registry.gitlab.com/test
newTag: latest newTag: latest
`) `)
th.WriteF("/app/crd/containers/crd.yaml", ` th.WriteF("crd/containers/crd.yaml", `
apiVersion: apiextensions.k8s.io/v1beta1 apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
@@ -337,7 +337,7 @@ spec:
containers: containers:
description: Containers allows injecting additional containers description: Containers allows injecting additional containers
`) `)
m := th.Run("/app/crd/containers", th.MakeDefaultOptions()) m := th.Run("crd/containers", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apiextensions.k8s.io/v1beta1 apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition kind: CustomResourceDefinition

View File

@@ -10,7 +10,7 @@ import (
) )
func makeBaseReferencingCustomConfig(th kusttest_test.Harness) { func makeBaseReferencingCustomConfig(th kusttest_test.Harness) {
th.WriteK("/app/base", ` th.WriteK("base", `
namePrefix: x- namePrefix: x-
commonLabels: commonLabels:
app: myApp app: myApp
@@ -35,7 +35,7 @@ configurations:
- config/defaults.yaml - config/defaults.yaml
- config/custom.yaml - config/custom.yaml
`) `)
th.WriteF("/app/base/giraffes.yaml", ` th.WriteF("base/giraffes.yaml", `
kind: Giraffe kind: Giraffe
metadata: metadata:
name: april name: april
@@ -50,7 +50,7 @@ spec:
diet: acacia diet: acacia
location: SE location: SE
`) `)
th.WriteF("/app/base/gorilla.yaml", ` th.WriteF("base/gorilla.yaml", `
kind: Gorilla kind: Gorilla
metadata: metadata:
name: koko name: koko
@@ -58,7 +58,7 @@ spec:
diet: bambooshoots diet: bambooshoots
location: SW location: SW
`) `)
th.WriteF("/app/base/animalPark.yaml", ` th.WriteF("base/animalPark.yaml", `
apiVersion: foo apiVersion: foo
kind: AnimalPark kind: AnimalPark
metadata: metadata:
@@ -77,8 +77,8 @@ spec:
func TestCustomConfig(t *testing.T) { func TestCustomConfig(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeBaseReferencingCustomConfig(th) makeBaseReferencingCustomConfig(th)
th.WriteLegacyConfigs("/app/base/config/defaults.yaml") th.WriteLegacyConfigs("base/config/defaults.yaml")
th.WriteF("/app/base/config/custom.yaml", ` th.WriteF("base/config/custom.yaml", `
nameReference: nameReference:
- kind: Gorilla - kind: Gorilla
fieldSpecs: fieldSpecs:
@@ -92,7 +92,7 @@ varReference:
- path: spec/food - path: spec/food
kind: AnimalPark kind: AnimalPark
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: foo apiVersion: foo
kind: AnimalPark kind: AnimalPark
@@ -141,11 +141,11 @@ spec:
func TestCustomConfigWithDefaultOverspecification(t *testing.T) { func TestCustomConfigWithDefaultOverspecification(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeBaseReferencingCustomConfig(th) makeBaseReferencingCustomConfig(th)
th.WriteLegacyConfigs("/app/base/config/defaults.yaml") th.WriteLegacyConfigs("base/config/defaults.yaml")
// Specifying namePrefix here conflicts with (is the same as) // Specifying namePrefix here conflicts with (is the same as)
// the defaults written above. This is intentional in the // the defaults written above. This is intentional in the
// test to assure duplicate config doesn't cause problems. // test to assure duplicate config doesn't cause problems.
th.WriteF("/app/base/config/custom.yaml", ` th.WriteF("base/config/custom.yaml", `
namePrefix: namePrefix:
- path: metadata/name - path: metadata/name
nameReference: nameReference:
@@ -161,7 +161,7 @@ varReference:
- path: spec/food - path: spec/food
kind: AnimalPark kind: AnimalPark
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: foo apiVersion: foo
kind: AnimalPark kind: AnimalPark
@@ -210,8 +210,8 @@ spec:
func TestFixedBug605_BaseCustomizationAvailableInOverlay(t *testing.T) { func TestFixedBug605_BaseCustomizationAvailableInOverlay(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeBaseReferencingCustomConfig(th) makeBaseReferencingCustomConfig(th)
th.WriteLegacyConfigs("/app/base/config/defaults.yaml") th.WriteLegacyConfigs("base/config/defaults.yaml")
th.WriteF("/app/base/config/custom.yaml", ` th.WriteF("base/config/custom.yaml", `
nameReference: nameReference:
- kind: Gorilla - kind: Gorilla
fieldSpecs: fieldSpecs:
@@ -228,7 +228,7 @@ varReference:
apiVersion: foo apiVersion: foo
kind: AnimalPark kind: AnimalPark
`) `)
th.WriteK("/app/overlay", ` th.WriteK("overlay", `
namePrefix: o- namePrefix: o-
commonLabels: commonLabels:
movie: planetOfTheApes movie: planetOfTheApes
@@ -238,7 +238,7 @@ resources:
- ../base - ../base
- ursus.yaml - ursus.yaml
`) `)
th.WriteF("/app/overlay/ursus.yaml", ` th.WriteF("overlay/ursus.yaml", `
kind: Gorilla kind: Gorilla
metadata: metadata:
name: ursus name: ursus
@@ -247,7 +247,7 @@ spec:
location: Arizona location: Arizona
`) `)
// The following replaces the gorillaRef in the AnimalPark. // The following replaces the gorillaRef in the AnimalPark.
th.WriteF("/app/overlay/animalPark.yaml", ` th.WriteF("overlay/animalPark.yaml", `
apiVersion: foo apiVersion: foo
kind: AnimalPark kind: AnimalPark
metadata: metadata:
@@ -256,7 +256,7 @@ spec:
gorillaRef: gorillaRef:
name: ursus name: ursus
`) `)
m := th.Run("/app/overlay", th.MakeDefaultOptions()) m := th.Run("overlay", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: foo apiVersion: foo
kind: AnimalPark kind: AnimalPark

View File

@@ -17,7 +17,7 @@ func TestCustomNamePrefixer(t *testing.T) {
PrepBuiltin("PrefixSuffixTransformer") PrepBuiltin("PrefixSuffixTransformer")
defer th.Reset() defer th.Reset()
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- deployment.yaml - deployment.yaml
- role.yaml - role.yaml
@@ -25,7 +25,7 @@ resources:
transformers: transformers:
- prefixer.yaml - prefixer.yaml
`) `)
th.WriteF("/app/prefixer.yaml", ` th.WriteF("prefixer.yaml", `
apiVersion: builtin apiVersion: builtin
kind: PrefixSuffixTransformer kind: PrefixSuffixTransformer
metadata: metadata:
@@ -37,7 +37,7 @@ fieldSpecs:
- kind: Service - kind: Service
path: metadata/name path: metadata/name
`) `)
th.WriteF("/app/deployment.yaml", ` th.WriteF("deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -52,20 +52,20 @@ spec:
- name: whatever - name: whatever
image: whatever image: whatever
`) `)
th.WriteF("/app/role.yaml", ` th.WriteF("role.yaml", `
apiVersion: v1 apiVersion: v1
kind: Role kind: Role
metadata: metadata:
name: myRole name: myRole
`) `)
th.WriteF("/app/service.yaml", ` th.WriteF("service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: myService name: myService
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment

View File

@@ -23,7 +23,7 @@ func TestReusableCustomTransformers(t *testing.T) {
// First write three custom configurations for builtin plugins. // First write three custom configurations for builtin plugins.
// A custom name prefixer that only touches Deployments and Services. // A custom name prefixer that only touches Deployments and Services.
th.WriteF("/app/mytransformers/deploymentServicePrefixer.yaml", ` th.WriteF("mytransformers/deploymentServicePrefixer.yaml", `
apiVersion: builtin apiVersion: builtin
kind: PrefixSuffixTransformer kind: PrefixSuffixTransformer
metadata: metadata:
@@ -37,7 +37,7 @@ fieldSpecs:
`) `)
// A custom annotator exclusively annotating Roles. // A custom annotator exclusively annotating Roles.
th.WriteF("/app/mytransformers/roleAnnotator.yaml", ` th.WriteF("mytransformers/roleAnnotator.yaml", `
apiVersion: builtin apiVersion: builtin
kind: AnnotationsTransformer kind: AnnotationsTransformer
metadata: metadata:
@@ -55,7 +55,7 @@ fieldSpecs:
// and only labels them at their top metadata level // and only labels them at their top metadata level
// exclusively. It does not modify selectors or // exclusively. It does not modify selectors or
// add labels to pods in the template. // add labels to pods in the template.
th.WriteF("/app/mytransformers/deploymentLabeller.yaml", ` th.WriteF("mytransformers/deploymentLabeller.yaml", `
apiVersion: builtin apiVersion: builtin
kind: LabelTransformer kind: LabelTransformer
metadata: metadata:
@@ -73,7 +73,7 @@ fieldSpecs:
// all happen to be plugin configurations. This makes // all happen to be plugin configurations. This makes
// these plugins re-usable as a group in any number of other // these plugins re-usable as a group in any number of other
// kustomizations. // kustomizations.
th.WriteK("/app/mytransformers", ` th.WriteK("mytransformers", `
resources: resources:
- deploymentServicePrefixer.yaml - deploymentServicePrefixer.yaml
- roleAnnotator.yaml - roleAnnotator.yaml
@@ -82,7 +82,7 @@ resources:
// Finally, define the kustomization for the (arbitrarily named) // Finally, define the kustomization for the (arbitrarily named)
// staging environment. // staging environment.
th.WriteK("/app/staging", ` th.WriteK("staging", `
# Bring in the custom transformers. # Bring in the custom transformers.
transformers: transformers:
@@ -104,7 +104,7 @@ resources:
- role.yaml - role.yaml
- service.yaml - service.yaml
`) `)
th.WriteF("/app/staging/deployment.yaml", ` th.WriteF("staging/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -119,20 +119,20 @@ spec:
- name: whatever - name: whatever
image: whatever image: whatever
`) `)
th.WriteF("/app/staging/role.yaml", ` th.WriteF("staging/role.yaml", `
apiVersion: v1 apiVersion: v1
kind: Role kind: Role
metadata: metadata:
name: myRole name: myRole
`) `)
th.WriteF("/app/staging/service.yaml", ` th.WriteF("staging/service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: myService name: myService
`) `)
m := th.Run("/app/staging", th.MakeDefaultOptions()) m := th.Run("staging", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment

View File

@@ -59,12 +59,12 @@ spec:
const patchJsonRestartPolicy = `[{"op": "add", "path": "/spec/template/spec/restartPolicy", "value": "Always"}]` const patchJsonRestartPolicy = `[{"op": "add", "path": "/spec/template/spec/restartPolicy", "value": "Always"}]`
func writeDeploymentBase(th kusttest_test.Harness) { func writeDeploymentBase(th kusttest_test.Harness) {
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
`) `)
th.WriteF("/app/base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -80,33 +80,33 @@ spec:
} }
func writeProbeOverlay(th kusttest_test.Harness) { func writeProbeOverlay(th kusttest_test.Harness) {
th.WriteK("/app/probe", ` th.WriteK("probe", `
resources: resources:
- ../base - ../base
patchesStrategicMerge: patchesStrategicMerge:
- dep-patch.yaml - dep-patch.yaml
`) `)
th.WriteF("/app/probe/dep-patch.yaml", patchAddProbe) th.WriteF("probe/dep-patch.yaml", patchAddProbe)
} }
func writeDNSOverlay(th kusttest_test.Harness) { func writeDNSOverlay(th kusttest_test.Harness) {
th.WriteK("/app/dns", ` th.WriteK("dns", `
resources: resources:
- ../base - ../base
patchesStrategicMerge: patchesStrategicMerge:
- dep-patch.yaml - dep-patch.yaml
`) `)
th.WriteF("/app/dns/dep-patch.yaml", patchDnsPolicy) th.WriteF("dns/dep-patch.yaml", patchDnsPolicy)
} }
func writeRestartOverlay(th kusttest_test.Harness) { func writeRestartOverlay(th kusttest_test.Harness) {
th.WriteK("/app/restart", ` th.WriteK("restart", `
resources: resources:
- ../base - ../base
patchesStrategicMerge: patchesStrategicMerge:
- dep-patch.yaml - dep-patch.yaml
`) `)
th.WriteF("/app/restart/dep-patch.yaml", patchRestartPolicy) th.WriteF("restart/dep-patch.yaml", patchRestartPolicy)
} }
// Here's a composite kustomization, that combines multiple overlays // Here's a composite kustomization, that combines multiple overlays
@@ -129,14 +129,14 @@ func TestIssue1251_CompositeDiamond_Failure(t *testing.T) {
writeDNSOverlay(th) writeDNSOverlay(th)
writeRestartOverlay(th) writeRestartOverlay(th)
th.WriteK("/app/composite", ` th.WriteK("composite", `
resources: resources:
- ../probe - ../probe
- ../dns - ../dns
- ../restart - ../restart
`) `)
err := th.RunWithErr("/app/composite", th.MakeDefaultOptions()) err := th.RunWithErr("composite", th.MakeDefaultOptions())
if err == nil { if err == nil {
t.Fatalf("Expected resource accumulation error") t.Fatalf("Expected resource accumulation error")
} }
@@ -176,7 +176,7 @@ func TestIssue1251_Patches_Overlayed(t *testing.T) {
// dns overlays probe. // dns overlays probe.
writeDNSOverlay(th) writeDNSOverlay(th)
th.WriteK("/app/dns", ` th.WriteK("dns", `
resources: resources:
- ../probe - ../probe
patchesStrategicMerge: patchesStrategicMerge:
@@ -185,14 +185,14 @@ patchesStrategicMerge:
// restart overlays dns. // restart overlays dns.
writeRestartOverlay(th) writeRestartOverlay(th)
th.WriteK("/app/restart", ` th.WriteK("restart", `
resources: resources:
- ../dns - ../dns
patchesStrategicMerge: patchesStrategicMerge:
- dep-patch.yaml - dep-patch.yaml
`) `)
m := th.Run("/app/restart", th.MakeDefaultOptions()) m := th.Run("restart", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, expectedPatchedDeployment) th.AssertActualEqualsExpected(m, expectedPatchedDeployment)
} }
@@ -200,7 +200,7 @@ func TestIssue1251_Patches_Local(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeDeploymentBase(th) writeDeploymentBase(th)
th.WriteK("/app/composite", ` th.WriteK("composite", `
resources: resources:
- ../base - ../base
patchesStrategicMerge: patchesStrategicMerge:
@@ -208,20 +208,20 @@ patchesStrategicMerge:
- patchDnsPolicy.yaml - patchDnsPolicy.yaml
- patchRestartPolicy.yaml - patchRestartPolicy.yaml
`) `)
th.WriteF("/app/composite/patchRestartPolicy.yaml", patchRestartPolicy) th.WriteF("composite/patchRestartPolicy.yaml", patchRestartPolicy)
th.WriteF("/app/composite/patchDnsPolicy.yaml", patchDnsPolicy) th.WriteF("composite/patchDnsPolicy.yaml", patchDnsPolicy)
th.WriteF("/app/composite/patchAddProbe.yaml", patchAddProbe) th.WriteF("composite/patchAddProbe.yaml", patchAddProbe)
m := th.Run("/app/composite", th.MakeDefaultOptions()) m := th.Run("composite", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, expectedPatchedDeployment) th.AssertActualEqualsExpected(m, expectedPatchedDeployment)
} }
func definePatchDirStructure(th kusttest_test.Harness) { func definePatchDirStructure(th kusttest_test.Harness) {
writeDeploymentBase(th) writeDeploymentBase(th)
th.WriteF("/app/patches/patchRestartPolicy.yaml", patchRestartPolicy) th.WriteF("patches/patchRestartPolicy.yaml", patchRestartPolicy)
th.WriteF("/app/patches/patchDnsPolicy.yaml", patchDnsPolicy) th.WriteF("patches/patchDnsPolicy.yaml", patchDnsPolicy)
th.WriteF("/app/patches/patchAddProbe.yaml", patchAddProbe) th.WriteF("patches/patchAddProbe.yaml", patchAddProbe)
} }
// Fails due to file load restrictor. // Fails due to file load restrictor.
@@ -229,7 +229,7 @@ func TestIssue1251_Patches_ProdVsDev_Failure(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
definePatchDirStructure(th) definePatchDirStructure(th)
th.WriteK("/app/prod", ` th.WriteK("prod", `
resources: resources:
- ../base - ../base
patchesStrategicMerge: patchesStrategicMerge:
@@ -237,13 +237,13 @@ patchesStrategicMerge:
- ../patches/patchDnsPolicy.yaml - ../patches/patchDnsPolicy.yaml
`) `)
err := th.RunWithErr("/app/prod", th.MakeDefaultOptions()) err := th.RunWithErr("prod", th.MakeDefaultOptions())
if err == nil { if err == nil {
t.Fatalf("expected error") t.Fatalf("expected error")
} }
if !strings.Contains( if !strings.Contains(
err.Error(), err.Error(),
"security; file '/app/patches/patchAddProbe.yaml' is not in or below '/app/prod'") { "security; file '/patches/patchAddProbe.yaml' is not in or below '/prod'") {
t.Fatalf("unexpected error: %v", err) t.Fatalf("unexpected error: %v", err)
} }
} }
@@ -302,7 +302,7 @@ func TestIssue1251_Patches_ProdVsDev(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
definePatchDirStructure(th) definePatchDirStructure(th)
th.WriteK("/app/prod", ` th.WriteK("prod", `
resources: resources:
- ../base - ../base
patchesStrategicMerge: patchesStrategicMerge:
@@ -312,13 +312,13 @@ patchesStrategicMerge:
opts := th.MakeDefaultOptions() opts := th.MakeDefaultOptions()
opts.LoadRestrictions = types.LoadRestrictionsNone opts.LoadRestrictions = types.LoadRestrictionsNone
m := th.Run("/app/prod", opts) m := th.Run("prod", opts)
th.AssertActualEqualsExpected(m, prodDevMergeResult1) th.AssertActualEqualsExpected(m, prodDevMergeResult1)
th = kusttest_test.MakeHarness(t) th = kusttest_test.MakeHarness(t)
definePatchDirStructure(th) definePatchDirStructure(th)
th.WriteK("/app/dev", ` th.WriteK("dev", `
resources: resources:
- ../base - ../base
patchesStrategicMerge: patchesStrategicMerge:
@@ -326,7 +326,7 @@ patchesStrategicMerge:
- ../patches/patchRestartPolicy.yaml - ../patches/patchRestartPolicy.yaml
`) `)
m = th.Run("/app/dev", opts) m = th.Run("dev", opts)
th.AssertActualEqualsExpected(m, prodDevMergeResult2) th.AssertActualEqualsExpected(m, prodDevMergeResult2)
} }
@@ -336,7 +336,7 @@ func TestIssue1251_Plugins_ProdVsDev(t *testing.T) {
defer th.Reset() defer th.Reset()
defineTransformerDirStructure(th) defineTransformerDirStructure(th)
th.WriteK("/app/prod", ` th.WriteK("prod", `
resources: resources:
- ../base - ../base
transformers: transformers:
@@ -344,11 +344,11 @@ transformers:
- ../patches/addDnsPolicy - ../patches/addDnsPolicy
`) `)
m := th.Run("/app/prod", th.MakeDefaultOptions()) m := th.Run("prod", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, prodDevMergeResult1) th.AssertActualEqualsExpected(m, prodDevMergeResult1)
defineTransformerDirStructure(th) defineTransformerDirStructure(th)
th.WriteK("/app/dev", ` th.WriteK("dev", `
resources: resources:
- ../base - ../base
transformers: transformers:
@@ -356,7 +356,7 @@ transformers:
- ../patches/addDnsPolicy - ../patches/addDnsPolicy
`) `)
m = th.Run("/app/dev", th.MakeDefaultOptions()) m = th.Run("dev", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, prodDevMergeResult2) th.AssertActualEqualsExpected(m, prodDevMergeResult2)
} }
@@ -368,13 +368,13 @@ func TestIssue1251_Plugins_Local(t *testing.T) {
writeDeploymentBase(th.Harness) writeDeploymentBase(th.Harness)
writeJsonTransformerPluginConfig( writeJsonTransformerPluginConfig(
th, "/app/composite", "addDnsPolicy", patchJsonDnsPolicy) th, "composite", "addDnsPolicy", patchJsonDnsPolicy)
writeJsonTransformerPluginConfig( writeJsonTransformerPluginConfig(
th, "/app/composite", "addRestartPolicy", patchJsonRestartPolicy) th, "composite", "addRestartPolicy", patchJsonRestartPolicy)
writeJsonTransformerPluginConfig( writeJsonTransformerPluginConfig(
th, "/app/composite", "addProbe", patchJsonAddProbe) th, "composite", "addProbe", patchJsonAddProbe)
th.WriteK("/app/composite", ` th.WriteK("composite", `
resources: resources:
- ../base - ../base
transformers: transformers:
@@ -382,7 +382,7 @@ transformers:
- addRestartPolicyConfig.yaml - addRestartPolicyConfig.yaml
- addProbeConfig.yaml - addProbeConfig.yaml
`) `)
m := th.Run("/app/composite", th.MakeDefaultOptions()) m := th.Run("composite", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, expectedPatchedDeployment) th.AssertActualEqualsExpected(m, expectedPatchedDeployment)
} }
@@ -410,50 +410,50 @@ func TestIssue1251_Plugins_Bundled(t *testing.T) {
defer th.Reset() defer th.Reset()
writeDeploymentBase(th.Harness) writeDeploymentBase(th.Harness)
th.WriteK("/app/patches", ` th.WriteK("patches", `
resources: resources:
- addDnsPolicyConfig.yaml - addDnsPolicyConfig.yaml
- addRestartPolicyConfig.yaml - addRestartPolicyConfig.yaml
- addProbeConfig.yaml - addProbeConfig.yaml
`) `)
writeJsonTransformerPluginConfig( writeJsonTransformerPluginConfig(
th, "/app/patches", "addDnsPolicy", patchJsonDnsPolicy) th, "patches", "addDnsPolicy", patchJsonDnsPolicy)
writeJsonTransformerPluginConfig( writeJsonTransformerPluginConfig(
th, "/app/patches", "addRestartPolicy", patchJsonRestartPolicy) th, "patches", "addRestartPolicy", patchJsonRestartPolicy)
writeJsonTransformerPluginConfig( writeJsonTransformerPluginConfig(
th, "/app/patches", "addProbe", patchJsonAddProbe) th, "patches", "addProbe", patchJsonAddProbe)
th.WriteK("/app/composite", ` th.WriteK("composite", `
resources: resources:
- ../base - ../base
transformers: transformers:
- ../patches - ../patches
`) `)
m := th.Run("/app/composite", th.MakeDefaultOptions()) m := th.Run("composite", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, expectedPatchedDeployment) th.AssertActualEqualsExpected(m, expectedPatchedDeployment)
} }
func defineTransformerDirStructure(th *kusttest_test.HarnessEnhanced) { func defineTransformerDirStructure(th *kusttest_test.HarnessEnhanced) {
writeDeploymentBase(th.Harness) writeDeploymentBase(th.Harness)
th.WriteK("/app/patches/addDnsPolicy", ` th.WriteK("patches/addDnsPolicy", `
resources: resources:
- addDnsPolicyConfig.yaml - addDnsPolicyConfig.yaml
`) `)
writeJsonTransformerPluginConfig( writeJsonTransformerPluginConfig(
th, "/app/patches/addDnsPolicy", "addDnsPolicy", patchJsonDnsPolicy) th, "patches/addDnsPolicy", "addDnsPolicy", patchJsonDnsPolicy)
th.WriteK("/app/patches/addRestartPolicy", ` th.WriteK("patches/addRestartPolicy", `
resources: resources:
- addRestartPolicyConfig.yaml - addRestartPolicyConfig.yaml
`) `)
writeJsonTransformerPluginConfig( writeJsonTransformerPluginConfig(
th, "/app/patches/addRestartPolicy", "addRestartPolicy", patchJsonRestartPolicy) th, "patches/addRestartPolicy", "addRestartPolicy", patchJsonRestartPolicy)
th.WriteK("/app/patches/addProbe", ` th.WriteK("patches/addProbe", `
resources: resources:
- addProbeConfig.yaml - addProbeConfig.yaml
`) `)
writeJsonTransformerPluginConfig( writeJsonTransformerPluginConfig(
th, "/app/patches/addProbe", "addProbe", patchJsonAddProbe) th, "patches/addProbe", "addProbe", patchJsonAddProbe)
} }

View File

@@ -31,11 +31,11 @@ import (
// base // base
// //
func writeDiamondBase(th kusttest_test.Harness) { func writeDiamondBase(th kusttest_test.Harness) {
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deploy.yaml - deploy.yaml
`) `)
th.WriteF("/app/base/deploy.yaml", ` th.WriteF("base/deploy.yaml", `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -46,7 +46,7 @@ spec:
} }
func writeKirk(th kusttest_test.Harness) { func writeKirk(th kusttest_test.Harness) {
th.WriteK("/app/kirk", ` th.WriteK("kirk", `
namePrefix: kirk- namePrefix: kirk-
resources: resources:
- ../base - ../base
@@ -54,7 +54,7 @@ resources:
patchesStrategicMerge: patchesStrategicMerge:
- dep-patch.yaml - dep-patch.yaml
`) `)
th.WriteF("/app/kirk/dep-patch.yaml", ` th.WriteF("kirk/dep-patch.yaml", `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -62,7 +62,7 @@ metadata:
spec: spec:
type: Confident type: Confident
`) `)
th.WriteF("/app/kirk/configmap.yaml", ` th.WriteF("kirk/configmap.yaml", `
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
@@ -73,14 +73,14 @@ data:
} }
func writeSpock(th kusttest_test.Harness) { func writeSpock(th kusttest_test.Harness) {
th.WriteK("/app/spock", ` th.WriteK("spock", `
namePrefix: spock- namePrefix: spock-
resources: resources:
- ../base - ../base
patchesStrategicMerge: patchesStrategicMerge:
- dep-patch.yaml - dep-patch.yaml
`) `)
th.WriteF("/app/spock/dep-patch.yaml", ` th.WriteF("spock/dep-patch.yaml", `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -91,14 +91,14 @@ spec:
} }
func writeBones(th kusttest_test.Harness) { func writeBones(th kusttest_test.Harness) {
th.WriteK("/app/bones", ` th.WriteK("bones", `
namePrefix: bones- namePrefix: bones-
resources: resources:
- ../base - ../base
patchesStrategicMerge: patchesStrategicMerge:
- dep-patch.yaml - dep-patch.yaml
`) `)
th.WriteF("/app/bones/dep-patch.yaml", ` th.WriteF("bones/dep-patch.yaml", `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -109,7 +109,7 @@ spec:
} }
func writeTenants(th kusttest_test.Harness) { func writeTenants(th kusttest_test.Harness) {
th.WriteK("/app/tenants", ` th.WriteK("tenants", `
namePrefix: t- namePrefix: t-
resources: resources:
- ../kirk - ../kirk
@@ -119,7 +119,7 @@ resources:
patchesStrategicMerge: patchesStrategicMerge:
- bones-patch.yaml - bones-patch.yaml
`) `)
th.WriteF("/app/tenants/bones-patch.yaml", ` th.WriteF("tenants/bones-patch.yaml", `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -127,7 +127,7 @@ metadata:
spec: spec:
mood: Cantankerous mood: Cantankerous
`) `)
th.WriteF("/app/tenants/configMap.yaml", ` th.WriteF("tenants/configMap.yaml", `
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
@@ -145,7 +145,7 @@ func TestBasicDiamond(t *testing.T) {
writeSpock(th) writeSpock(th)
writeBones(th) writeBones(th)
writeTenants(th) writeTenants(th)
th.WriteK("/app/prod", ` th.WriteK("prod", `
namePrefix: prod- namePrefix: prod-
resources: resources:
- ../tenants - ../tenants
@@ -154,7 +154,7 @@ patchesStrategicMerge:
`) `)
// The patch only has to be specific enough // The patch only has to be specific enough
// to match the item. // to match the item.
th.WriteF("/app/prod/patches.yaml", ` th.WriteF("prod/patches.yaml", `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -177,7 +177,7 @@ data:
zone: twilight zone: twilight
`) `)
m := th.Run("/app/prod", th.MakeDefaultOptions()) m := th.Run("prod", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment

View File

@@ -11,19 +11,19 @@ import (
func TestIssue596AllowDirectoriesThatAreSubstringsOfEachOther(t *testing.T) { func TestIssue596AllowDirectoriesThatAreSubstringsOfEachOther(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/base", "") th.WriteK("base", "")
th.WriteK("/app/overlays/aws", ` th.WriteK("overlays/aws", `
resources: resources:
- ../../base - ../../base
`) `)
th.WriteK("/app/overlays/aws-nonprod", ` th.WriteK("overlays/aws-nonprod", `
resources: resources:
- ../aws - ../aws
`) `)
th.WriteK("/app/overlays/aws-sandbox2.us-east-1", ` th.WriteK("overlays/aws-sandbox2.us-east-1", `
resources: resources:
- ../aws-nonprod - ../aws-nonprod
`) `)
m := th.Run("/app/overlays/aws-sandbox2.us-east-1", th.MakeDefaultOptions()) m := th.Run("overlays/aws-sandbox2.us-east-1", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, "") th.AssertActualEqualsExpected(m, "")
} }

View File

@@ -10,7 +10,7 @@ import (
) )
func makeCommonFileForExtendedPatchTest(th kusttest_test.Harness) { func makeCommonFileForExtendedPatchTest(th kusttest_test.Harness) {
th.WriteF("/app/base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -61,7 +61,7 @@ spec:
name: configmap-in-base name: configmap-in-base
name: configmap-in-base name: configmap-in-base
`) `)
th.WriteF("/app/base/service.yaml", ` th.WriteF("base/service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@@ -91,7 +91,7 @@ spec:
func TestExtendedPatchNameSelector(t *testing.T) { func TestExtendedPatchNameSelector(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFileForExtendedPatchTest(th) makeCommonFileForExtendedPatchTest(th)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
- service.yaml - service.yaml
@@ -100,7 +100,7 @@ patches:
target: target:
name: busybox name: busybox
`) `)
th.WriteF("/app/base/patch.yaml", ` th.WriteF("base/patch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -108,7 +108,7 @@ metadata:
annotations: annotations:
new-key: new-value new-key: new-value
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -193,7 +193,7 @@ spec:
func TestExtendedPatchGvkSelector(t *testing.T) { func TestExtendedPatchGvkSelector(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFileForExtendedPatchTest(th) makeCommonFileForExtendedPatchTest(th)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
- service.yaml - service.yaml
@@ -202,7 +202,7 @@ patches:
target: target:
kind: Deployment kind: Deployment
`) `)
th.WriteF("/app/base/patch.yaml", ` th.WriteF("base/patch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -210,7 +210,7 @@ metadata:
annotations: annotations:
new-key: new-value new-key: new-value
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -295,7 +295,7 @@ spec:
func TestExtendedPatchLabelSelector(t *testing.T) { func TestExtendedPatchLabelSelector(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFileForExtendedPatchTest(th) makeCommonFileForExtendedPatchTest(th)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
- service.yaml - service.yaml
@@ -304,7 +304,7 @@ patches:
target: target:
labelSelector: app=nginx labelSelector: app=nginx
`) `)
th.WriteF("/app/base/patch.yaml", ` th.WriteF("base/patch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -312,7 +312,7 @@ metadata:
annotations: annotations:
new-key: new-value new-key: new-value
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -397,7 +397,7 @@ spec:
func TestExtendedPatchNameGvkSelector(t *testing.T) { func TestExtendedPatchNameGvkSelector(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFileForExtendedPatchTest(th) makeCommonFileForExtendedPatchTest(th)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
- service.yaml - service.yaml
@@ -407,7 +407,7 @@ patches:
name: busybox name: busybox
kind: Deployment kind: Deployment
`) `)
th.WriteF("/app/base/patch.yaml", ` th.WriteF("base/patch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -415,7 +415,7 @@ metadata:
annotations: annotations:
new-key: new-value new-key: new-value
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -498,7 +498,7 @@ spec:
func TestExtendedPatchNameLabelSelector(t *testing.T) { func TestExtendedPatchNameLabelSelector(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFileForExtendedPatchTest(th) makeCommonFileForExtendedPatchTest(th)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
- service.yaml - service.yaml
@@ -508,7 +508,7 @@ patches:
name: .* name: .*
labelSelector: app=busybox labelSelector: app=busybox
`) `)
th.WriteF("/app/base/patch.yaml", ` th.WriteF("base/patch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -516,7 +516,7 @@ metadata:
annotations: annotations:
new-key: new-value new-key: new-value
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -601,7 +601,7 @@ spec:
func TestExtendedPatchGvkLabelSelector(t *testing.T) { func TestExtendedPatchGvkLabelSelector(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFileForExtendedPatchTest(th) makeCommonFileForExtendedPatchTest(th)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
- service.yaml - service.yaml
@@ -611,7 +611,7 @@ patches:
kind: Deployment kind: Deployment
labelSelector: app=busybox labelSelector: app=busybox
`) `)
th.WriteF("/app/base/patch.yaml", ` th.WriteF("base/patch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -619,7 +619,7 @@ metadata:
annotations: annotations:
new-key: new-value new-key: new-value
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -702,7 +702,7 @@ spec:
func TestExtendedPatchNameGvkLabelSelector(t *testing.T) { func TestExtendedPatchNameGvkLabelSelector(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFileForExtendedPatchTest(th) makeCommonFileForExtendedPatchTest(th)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
- service.yaml - service.yaml
@@ -713,7 +713,7 @@ patches:
kind: Deployment kind: Deployment
labelSelector: app=busybox labelSelector: app=busybox
`) `)
th.WriteF("/app/base/patch.yaml", ` th.WriteF("base/patch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -721,7 +721,7 @@ metadata:
annotations: annotations:
new-key: new-value new-key: new-value
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -804,7 +804,7 @@ spec:
func TestExtendedPatchNoMatch(t *testing.T) { func TestExtendedPatchNoMatch(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFileForExtendedPatchTest(th) makeCommonFileForExtendedPatchTest(th)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
- service.yaml - service.yaml
@@ -813,7 +813,7 @@ patches:
target: target:
name: no-match name: no-match
`) `)
th.WriteF("/app/base/patch.yaml", ` th.WriteF("base/patch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -821,7 +821,7 @@ metadata:
annotations: annotations:
new-key: new-value new-key: new-value
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -902,14 +902,14 @@ spec:
func TestExtendedPatchWithoutTarget(t *testing.T) { func TestExtendedPatchWithoutTarget(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFileForExtendedPatchTest(th) makeCommonFileForExtendedPatchTest(th)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
- service.yaml - service.yaml
patches: patches:
- path: patch.yaml - path: patch.yaml
`) `)
th.WriteF("/app/base/patch.yaml", ` th.WriteF("base/patch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -917,7 +917,7 @@ metadata:
annotations: annotations:
new-key: new-value new-key: new-value
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -1000,7 +1000,7 @@ spec:
func TestExtendedPatchNoMatchMultiplePatch(t *testing.T) { func TestExtendedPatchNoMatchMultiplePatch(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFileForExtendedPatchTest(th) makeCommonFileForExtendedPatchTest(th)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
- service.yaml - service.yaml
@@ -1013,7 +1013,7 @@ patches:
name: busybox name: busybox
kind: Job kind: Job
`) `)
th.WriteF("/app/base/patch.yaml", ` th.WriteF("base/patch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -1021,7 +1021,7 @@ metadata:
annotations: annotations:
new-key: new-value new-key: new-value
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -1102,7 +1102,7 @@ spec:
func TestExtendedPatchMultiplePatchOverlapping(t *testing.T) { func TestExtendedPatchMultiplePatchOverlapping(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFileForExtendedPatchTest(th) makeCommonFileForExtendedPatchTest(th)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
- service.yaml - service.yaml
@@ -1115,7 +1115,7 @@ patches:
name: busybox name: busybox
kind: Deployment kind: Deployment
`) `)
th.WriteF("/app/base/patch1.yaml", ` th.WriteF("base/patch1.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -1123,7 +1123,7 @@ metadata:
annotations: annotations:
new-key-from-patch1: new-value new-key-from-patch1: new-value
`) `)
th.WriteF("/app/base/patch2.yaml", ` th.WriteF("base/patch2.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -1131,7 +1131,7 @@ metadata:
annotations: annotations:
new-key-from-patch2: new-value new-key-from-patch2: new-value
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment

View File

@@ -11,7 +11,7 @@ func TestFnExecGenerator(t *testing.T) {
th := kusttest_test.MakeEnhancedHarness(t) th := kusttest_test.MakeEnhancedHarness(t)
defer th.Reset() defer th.Reset()
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- short_secret.yaml - short_secret.yaml
generators: generators:
@@ -19,7 +19,7 @@ generators:
`) `)
// Create some additional resource just to make sure everything is added // Create some additional resource just to make sure everything is added
th.WriteF("/app/short_secret.yaml", ` th.WriteF("short_secret.yaml", `
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
@@ -33,7 +33,7 @@ stringData:
- mkdir /mnt/vda - mkdir /mnt/vda
`) `)
th.WriteF("/app/gener.yaml", ` th.WriteF("gener.yaml", `
kind: executable kind: executable
metadata: metadata:
name: demo name: demo
@@ -45,7 +45,7 @@ spec:
`) `)
o := th.MakeOptionsPluginsEnabled() o := th.MakeOptionsPluginsEnabled()
o.PluginConfig.FnpLoadingOptions.EnableExec = true o.PluginConfig.FnpLoadingOptions.EnableExec = true
m := th.Run("/app", o) m := th.Run(".", o)
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
@@ -95,14 +95,14 @@ func TestFnContainerGenerator(t *testing.T) {
th := kusttest_test.MakeEnhancedHarness(t) th := kusttest_test.MakeEnhancedHarness(t)
defer th.Reset() defer th.Reset()
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- short_secret.yaml - short_secret.yaml
generators: generators:
- gener.yaml - gener.yaml
`) `)
// Create generator config // Create generator config
th.WriteF("/app/gener.yaml", ` th.WriteF("gener.yaml", `
apiVersion: examples.config.kubernetes.io/v1beta1 apiVersion: examples.config.kubernetes.io/v1beta1
kind: CockroachDB kind: CockroachDB
metadata: metadata:
@@ -115,7 +115,7 @@ spec:
replicas: 3 replicas: 3
`) `)
// Create some additional resource just to make sure everything is added // Create some additional resource just to make sure everything is added
th.WriteF("/app/short_secret.yaml", ` th.WriteF("short_secret.yaml", `
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
@@ -128,7 +128,7 @@ stringData:
bootcmd: bootcmd:
- mkdir /mnt/vda - mkdir /mnt/vda
`) `)
m := th.Run("/app", th.MakeOptionsPluginsEnabled()) m := th.Run(".", th.MakeOptionsPluginsEnabled())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
@@ -311,7 +311,7 @@ func TestFnContainerTransformer(t *testing.T) {
th := kusttest_test.MakeEnhancedHarness(t) th := kusttest_test.MakeEnhancedHarness(t)
defer th.Reset() defer th.Reset()
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- data.yaml - data.yaml
transformers: transformers:
@@ -319,7 +319,7 @@ transformers:
- transf2.yaml - transf2.yaml
`) `)
th.WriteF("/app/data.yaml", ` th.WriteF("data.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -343,7 +343,7 @@ spec:
`) `)
// This transformer should add resource reservations based on annotation in data.yaml // This transformer should add resource reservations based on annotation in data.yaml
// See https://github.com/kubernetes-sigs/kustomize/tree/master/functions/examples/injection-tshirt-sizes // See https://github.com/kubernetes-sigs/kustomize/tree/master/functions/examples/injection-tshirt-sizes
th.WriteF("/app/transf1.yaml", ` th.WriteF("transf1.yaml", `
apiVersion: examples.config.kubernetes.io/v1beta1 apiVersion: examples.config.kubernetes.io/v1beta1
kind: Validator kind: Validator
metadata: metadata:
@@ -355,7 +355,7 @@ metadata:
`) `)
// This transformer will check resources without and won't do any changes // This transformer will check resources without and won't do any changes
// See https://github.com/kubernetes-sigs/kustomize/tree/master/functions/examples/validator-kubeval // See https://github.com/kubernetes-sigs/kustomize/tree/master/functions/examples/validator-kubeval
th.WriteF("/app/transf2.yaml", ` th.WriteF("transf2.yaml", `
apiVersion: examples.config.kubernetes.io/v1beta1 apiVersion: examples.config.kubernetes.io/v1beta1
kind: Kubeval kind: Kubeval
metadata: metadata:
@@ -375,7 +375,7 @@ spec:
kubernetesVersion: "1.16.0" kubernetesVersion: "1.16.0"
schemaLocation: "file:///schemas" schemaLocation: "file:///schemas"
`) `)
m := th.Run("/app", th.MakeOptionsPluginsEnabled()) m := th.Run(".", th.MakeOptionsPluginsEnabled())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -411,7 +411,7 @@ func TestFnContainerTransformerWithConfig(t *testing.T) {
th := kusttest_test.MakeEnhancedHarness(t) th := kusttest_test.MakeEnhancedHarness(t)
defer th.Reset() defer th.Reset()
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- data1.yaml - data1.yaml
- data2.yaml - data2.yaml
@@ -419,18 +419,18 @@ transformers:
- label_namespace.yaml - label_namespace.yaml
`) `)
th.WriteF("/app/data1.yaml", `apiVersion: v1 th.WriteF("data1.yaml", `apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: my-namespace name: my-namespace
`) `)
th.WriteF("/app/data2.yaml", `apiVersion: v1 th.WriteF("data2.yaml", `apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: another-namespace name: another-namespace
`) `)
th.WriteF("/app/label_namespace.yaml", `apiVersion: v1 th.WriteF("label_namespace.yaml", `apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: label_namespace name: label_namespace
@@ -443,7 +443,7 @@ data:
label_value: function-test label_value: function-test
`) `)
m := th.Run("/app", th.MakeOptionsPluginsEnabled()) m := th.Run(".", th.MakeOptionsPluginsEnabled())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
@@ -471,7 +471,7 @@ func TestFnContainerEnvVars(t *testing.T) {
th := kusttest_test.MakeEnhancedHarness(t) th := kusttest_test.MakeEnhancedHarness(t)
defer th.Reset() defer th.Reset()
th.WriteK("/app", ` th.WriteK(".", `
generators: generators:
- gener.yaml - gener.yaml
`) `)
@@ -479,7 +479,7 @@ generators:
// TODO: cheange image to gcr.io/kpt-functions/templater:stable // TODO: cheange image to gcr.io/kpt-functions/templater:stable
// when https://github.com/GoogleContainerTools/kpt-functions-catalog/pull/103 // when https://github.com/GoogleContainerTools/kpt-functions-catalog/pull/103
// is merged // is merged
th.WriteF("/app/gener.yaml", ` th.WriteF("gener.yaml", `
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
@@ -499,7 +499,7 @@ data:
data: data:
value: '{{ env "TESTTEMPLATE" }}' value: '{{ env "TESTTEMPLATE" }}'
`) `)
m := th.Run("/app", th.MakeOptionsPluginsEnabled()) m := th.Run(".", th.MakeOptionsPluginsEnabled())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
data: data:

View File

@@ -12,7 +12,7 @@ import (
func TestSimpleBase(t *testing.T) { func TestSimpleBase(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/base", ` th.WriteK("app/base", `
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
namePrefix: team-foo- namePrefix: team-foo-
@@ -27,7 +27,7 @@ resources:
- deployment.yaml - deployment.yaml
- networkpolicy.yaml - networkpolicy.yaml
`) `)
th.WriteF("/app/base/service.yaml", ` th.WriteF("app/base/service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@@ -40,7 +40,7 @@ spec:
selector: selector:
app: nginx app: nginx
`) `)
th.WriteF("/app/base/networkpolicy.yaml", ` th.WriteF("app/base/networkpolicy.yaml", `
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: NetworkPolicy kind: NetworkPolicy
metadata: metadata:
@@ -55,7 +55,7 @@ spec:
matchLabels: matchLabels:
app: nginx app: nginx
`) `)
th.WriteF("/app/base/deployment.yaml", ` th.WriteF("app/base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -72,7 +72,7 @@ spec:
- name: nginx - name: nginx
image: nginx image: nginx
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("app/base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@@ -149,7 +149,7 @@ spec:
} }
func makeBaseWithGenerators(th kusttest_test.Harness) { func makeBaseWithGenerators(th kusttest_test.Harness) {
th.WriteK("/app", ` th.WriteK("app", `
namePrefix: team-foo- namePrefix: team-foo-
commonLabels: commonLabels:
app: mynginx app: mynginx
@@ -170,7 +170,7 @@ secretGenerator:
- username=admin - username=admin
- password=somepw - password=somepw
`) `)
th.WriteF("/app/deployment.yaml", ` th.WriteF("app/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -196,7 +196,7 @@ spec:
name: configmap-in-base name: configmap-in-base
name: configmap-in-base name: configmap-in-base
`) `)
th.WriteF("/app/service.yaml", ` th.WriteF("app/service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@@ -214,7 +214,7 @@ spec:
func TestBaseWithGeneratorsAlone(t *testing.T) { func TestBaseWithGeneratorsAlone(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeBaseWithGenerators(th) makeBaseWithGenerators(th)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run("app", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -305,7 +305,7 @@ type: Opaque
func TestMergeAndReplaceGenerators(t *testing.T) { func TestMergeAndReplaceGenerators(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeBaseWithGenerators(th) makeBaseWithGenerators(th)
th.WriteF("/overlay/deployment.yaml", ` th.WriteF("overlay/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -322,7 +322,7 @@ spec:
name: configmap-in-overlay name: configmap-in-overlay
name: configmap-in-overlay name: configmap-in-overlay
`) `)
th.WriteK("/overlay", ` th.WriteK("overlay", `
namePrefix: staging- namePrefix: staging-
commonLabels: commonLabels:
env: staging env: staging
@@ -345,7 +345,7 @@ secretGenerator:
literals: literals:
- proxy=haproxy - proxy=haproxy
`) `)
m := th.Run("/overlay", th.MakeDefaultOptions()) m := th.Run("overlay", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -457,7 +457,7 @@ metadata:
func TestGeneratingIntoNamespaces(t *testing.T) { func TestGeneratingIntoNamespaces(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK("app", `
configMapGenerator: configMapGenerator:
- name: test - name: test
namespace: default namespace: default
@@ -479,7 +479,7 @@ secretGenerator:
- username=admin - username=admin
- password=somepw - password=somepw
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run("app", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
data: data:
@@ -523,7 +523,7 @@ type: Opaque
// and namespace left to default // and namespace left to default
func TestConfigMapGeneratingIntoSameNamespace(t *testing.T) { func TestConfigMapGeneratingIntoSameNamespace(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK("app", `
configMapGenerator: configMapGenerator:
- name: test - name: test
namespace: default namespace: default
@@ -533,7 +533,7 @@ configMapGenerator:
literals: literals:
- key=value - key=value
`) `)
err := th.RunWithErr("/app", th.MakeDefaultOptions()) err := th.RunWithErr("app", th.MakeDefaultOptions())
if err == nil { if err == nil {
t.Fatalf("expected error") t.Fatalf("expected error")
} }
@@ -546,7 +546,7 @@ configMapGenerator:
// and namespace left to default // and namespace left to default
func TestSecretGeneratingIntoSameNamespace(t *testing.T) { func TestSecretGeneratingIntoSameNamespace(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK("app", `
secretGenerator: secretGenerator:
- name: test - name: test
namespace: default namespace: default
@@ -558,7 +558,7 @@ secretGenerator:
- username=admin - username=admin
- password=somepw - password=somepw
`) `)
err := th.RunWithErr("/app", th.MakeDefaultOptions()) err := th.RunWithErr("app", th.MakeDefaultOptions())
if err == nil { if err == nil {
t.Fatalf("expected error") t.Fatalf("expected error")
} }

View File

@@ -11,7 +11,7 @@ import (
func TestSecretGenerator(t *testing.T) { func TestSecretGenerator(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK(".", `
secretGenerator: secretGenerator:
- name: bob - name: bob
literals: literals:
@@ -23,12 +23,12 @@ secretGenerator:
envs: envs:
- foo.env - foo.env
`) `)
th.WriteF("/app/foo.env", ` th.WriteF("foo.env", `
MOUNTAIN=everest MOUNTAIN=everest
OCEAN=pacific OCEAN=pacific
`) `)
th.WriteF("/app/phrase.dat", "dat phrase") th.WriteF("phrase.dat", "dat phrase")
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
data: data:
@@ -47,7 +47,7 @@ type: Opaque
func TestGeneratorOptionsWithBases(t *testing.T) { func TestGeneratorOptionsWithBases(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/base", ` th.WriteK("base", `
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
generatorOptions: generatorOptions:
@@ -59,7 +59,7 @@ configMapGenerator:
literals: literals:
- foo=bar - foo=bar
`) `)
th.WriteK("/app/overlay", ` th.WriteK("overlay", `
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
@@ -73,7 +73,7 @@ configMapGenerator:
literals: literals:
- fruit=apple - fruit=apple
`) `)
m := th.Run("/app/overlay", th.MakeDefaultOptions()) m := th.Run("overlay", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
data: data:

View File

@@ -15,8 +15,8 @@ import (
func TestKeepOriginalGVKN(t *testing.T) { func TestKeepOriginalGVKN(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("apps/deployment.yaml", ` th.WriteF("deployment.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -28,14 +28,14 @@ spec:
image: nginx image: nginx
`) `)
th.WriteF("apps/patch.yaml", ` th.WriteF("patch.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
name: new-name name: new-name
`) `)
th.WriteK("apps", ` th.WriteK(".", `
resources: resources:
- deployment.yaml - deployment.yaml
@@ -45,9 +45,9 @@ patches:
kind: Deployment kind: Deployment
`) `)
m := th.Run("apps", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -65,8 +65,8 @@ spec:
func TestChangeName(t *testing.T) { func TestChangeName(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("apps/deployment.yaml", ` th.WriteF("deployment.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -78,14 +78,14 @@ spec:
image: nginx image: nginx
`) `)
th.WriteF("apps/patch.yaml", ` th.WriteF("patch.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: new-name name: new-name
`) `)
th.WriteK("apps", ` th.WriteK(".", `
resources: resources:
- deployment.yaml - deployment.yaml
@@ -99,9 +99,9 @@ patches:
options.AllowResourceIdChanges = true options.AllowResourceIdChanges = true
// name should become `new-name` // name should become `new-name`
m := th.Run("apps", options) m := th.Run(".", options)
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -117,8 +117,8 @@ spec:
func TestChangeKind(t *testing.T) { func TestChangeKind(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("apps/deployment.yaml", ` th.WriteF("deployment.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -130,14 +130,14 @@ spec:
image: nginx image: nginx
`) `)
th.WriteF("apps/patch.yaml", ` th.WriteF("patch.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
name: old-name name: old-name
`) `)
th.WriteK("apps", ` th.WriteK(".", `
resources: resources:
- deployment.yaml - deployment.yaml
@@ -151,9 +151,9 @@ patches:
options.AllowResourceIdChanges = true options.AllowResourceIdChanges = true
// kind should become `StatefulSet` // kind should become `StatefulSet`
m := th.Run("apps", options) m := th.Run(".", options)
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -169,8 +169,8 @@ spec:
func TestChangeNameAndKind(t *testing.T) { func TestChangeNameAndKind(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("apps/deployment.yaml", ` th.WriteF("deployment.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -182,14 +182,14 @@ spec:
image: nginx image: nginx
`) `)
th.WriteF("apps/patch.yaml", ` th.WriteF("patch.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
name: new-name name: new-name
`) `)
th.WriteK("apps", ` th.WriteK(".", `
resources: resources:
- deployment.yaml - deployment.yaml
@@ -204,9 +204,9 @@ patches:
// kind should become `StatefulSet` // kind should become `StatefulSet`
// name should become `new-name` // name should become `new-name`
m := th.Run("apps", options) m := th.Run(".", options)
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -226,7 +226,7 @@ func TestPatchOriginalName(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -238,7 +238,7 @@ spec:
image: nginx image: nginx
`) `)
th.WriteF("base/patch.yaml", ` th.WriteF("base/patch.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: new-name name: new-name
@@ -260,7 +260,7 @@ patchesStrategicMerge:
- depPatch.yaml - depPatch.yaml
`) `)
th.WriteF("overlay/depPatch.yaml", ` th.WriteF("overlay/depPatch.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -274,7 +274,7 @@ spec:
// name should become `new-name` // name should become `new-name`
m := th.Run("overlay", options) m := th.Run("overlay", options)
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -292,7 +292,7 @@ func TestPatchNewName(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -304,7 +304,7 @@ spec:
image: nginx image: nginx
`) `)
th.WriteF("base/patch.yaml", ` th.WriteF("base/patch.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: new-name name: new-name
@@ -326,7 +326,7 @@ patchesStrategicMerge:
- depPatch.yaml - depPatch.yaml
`) `)
th.WriteF("overlay/depPatch.yaml", ` th.WriteF("overlay/depPatch.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: new-name name: new-name
@@ -346,7 +346,7 @@ func TestPatchOriginalNameAndKind(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -358,7 +358,7 @@ spec:
image: nginx image: nginx
`) `)
th.WriteF("base/patch.yaml", ` th.WriteF("base/patch.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
name: new-name name: new-name
@@ -380,7 +380,7 @@ patchesStrategicMerge:
- depPatch.yaml - depPatch.yaml
`) `)
th.WriteF("overlay/depPatch.yaml", ` th.WriteF("overlay/depPatch.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -395,7 +395,7 @@ spec:
// name should become `new-name` // name should become `new-name`
m := th.Run("overlay", options) m := th.Run("overlay", options)
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -413,7 +413,7 @@ func TestPatchNewNameAndKind(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -425,7 +425,7 @@ spec:
image: nginx image: nginx
`) `)
th.WriteF("base/patch.yaml", ` th.WriteF("base/patch.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
name: new-name name: new-name
@@ -447,7 +447,7 @@ patchesStrategicMerge:
- depPatch.yaml - depPatch.yaml
`) `)
th.WriteF("overlay/depPatch.yaml", ` th.WriteF("overlay/depPatch.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
name: new-name name: new-name
@@ -469,7 +469,7 @@ func TestPatchOriginalNameAndNewKind(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: old-name name: old-name
@@ -481,7 +481,7 @@ spec:
image: nginx image: nginx
`) `)
th.WriteF("base/patch.yaml", ` th.WriteF("base/patch.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
name: new-name name: new-name
@@ -503,7 +503,7 @@ patchesStrategicMerge:
- depPatch.yaml - depPatch.yaml
`) `)
th.WriteF("overlay/depPatch.yaml", ` th.WriteF("overlay/depPatch.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: new-name name: new-name
@@ -558,7 +558,7 @@ resources:
- deployment.yaml - deployment.yaml
`) `)
th.WriteF("/app/shared/deployment.yaml", ` th.WriteF("/app/shared/deployment.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
name: my-deploy name: my-deploy
@@ -592,7 +592,7 @@ patches:
name: my-deploy name: my-deploy
`) `)
th.WriteF("/app/component2/base/patch.yaml", ` th.WriteF("/app/component2/base/patch.yaml", `
apiVersion: apps/v1 apiVersion: v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
name: my-stateful-set name: my-stateful-set

View File

@@ -10,7 +10,7 @@ import (
) )
func makeResourcesForPatchTest(th kusttest_test.Harness) { func makeResourcesForPatchTest(th kusttest_test.Harness) {
th.WriteF("/app/base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -41,7 +41,7 @@ spec:
func TestStrategicMergePatchInline(t *testing.T) { func TestStrategicMergePatchInline(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeResourcesForPatchTest(th) makeResourcesForPatchTest(th)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
@@ -58,7 +58,7 @@ patchesStrategicMerge:
- name: nginx - name: nginx
image: image1 image: image1
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -90,7 +90,7 @@ spec:
func TestJSONPatchInline(t *testing.T) { func TestJSONPatchInline(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeResourcesForPatchTest(th) makeResourcesForPatchTest(th)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
@@ -105,7 +105,7 @@ patchesJson6902:
path: /spec/template/spec/containers/0/image path: /spec/template/spec/containers/0/image
value: image1 value: image1
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -137,7 +137,7 @@ spec:
func TestExtendedPatchInlineJSON(t *testing.T) { func TestExtendedPatchInlineJSON(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeResourcesForPatchTest(th) makeResourcesForPatchTest(th)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
@@ -150,7 +150,7 @@ patches:
path: /spec/template/spec/containers/0/image path: /spec/template/spec/containers/0/image
value: image1 value: image1
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -182,7 +182,7 @@ spec:
func TestExtendedPatchInlineYAML(t *testing.T) { func TestExtendedPatchInlineYAML(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeResourcesForPatchTest(th) makeResourcesForPatchTest(th)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
@@ -202,7 +202,7 @@ patches:
- name: nginx - name: nginx
image: image1 image: image1
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment

View File

@@ -13,14 +13,14 @@ func TestInlineTransformer(t *testing.T) {
th := kusttest_test.MakeEnhancedHarness(t) th := kusttest_test.MakeEnhancedHarness(t)
defer th.Reset() defer th.Reset()
th.WriteF("/app/resource.yaml", ` th.WriteF("resource.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: whatever name: whatever
data: {} data: {}
`) `)
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- resource.yaml - resource.yaml
transformers: transformers:
@@ -44,7 +44,7 @@ metadata:
namespace: test namespace: test
` `
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, expected) th.AssertActualEqualsExpected(m, expected)
} }
@@ -52,7 +52,7 @@ func TestInlineGenerator(t *testing.T) {
th := kusttest_test.MakeEnhancedHarness(t) th := kusttest_test.MakeEnhancedHarness(t)
defer th.Reset() defer th.Reset()
th.WriteK("/app", ` th.WriteK(".", `
generators: generators:
- |- - |-
apiVersion: builtin apiVersion: builtin
@@ -74,6 +74,6 @@ metadata:
name: mymap-kfd8tf729k name: mymap-kfd8tf729k
` `
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, expected) th.AssertActualEqualsExpected(m, expected)
} }

View File

@@ -13,14 +13,14 @@ import (
// Ref: Issue #3455 // Ref: Issue #3455
func TestIntermediateName(t *testing.T) { func TestIntermediateName(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/gcp", ` th.WriteK("gcp", `
namePrefix: gcp- namePrefix: gcp-
resources: resources:
- ../emea - ../emea
patchesStrategicMerge: patchesStrategicMerge:
- depPatch.yaml - depPatch.yaml
`) `)
th.WriteF("/app/gcp/depPatch.yaml", ` th.WriteF("gcp/depPatch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -28,21 +28,21 @@ metadata:
spec: spec:
replicas: 999 replicas: 999
`) `)
th.WriteK("/app/emea", ` th.WriteK("emea", `
namePrefix: emea- namePrefix: emea-
resources: resources:
- ../prod - ../prod
`) `)
th.WriteK("/app/prod", ` th.WriteK("prod", `
namePrefix: prod- namePrefix: prod-
resources: resources:
- ../base - ../base
`) `)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
`) `)
th.WriteF("/app/base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -53,7 +53,7 @@ spec:
containers: containers:
- image: whatever - image: whatever
`) `)
m := th.Run("/app/gcp", th.MakeDefaultOptions()) m := th.Run("gcp", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -72,14 +72,14 @@ spec:
// transformations) have the same name, there is no conflict // transformations) have the same name, there is no conflict
func TestIntermediateNameSameNameDifferentLayer(t *testing.T) { func TestIntermediateNameSameNameDifferentLayer(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/gcp", ` th.WriteK("gcp", `
namePrefix: gcp- namePrefix: gcp-
resources: resources:
- ../emea - ../emea
patchesStrategicMerge: patchesStrategicMerge:
- depPatch.yaml - depPatch.yaml
`) `)
th.WriteF("/app/gcp/depPatch.yaml", ` th.WriteF("gcp/depPatch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -87,13 +87,13 @@ metadata:
spec: spec:
replicas: 999 replicas: 999
`) `)
th.WriteK("/app/emea", ` th.WriteK("emea", `
namePrefix: emea- namePrefix: emea-
resources: resources:
- ../prod - ../prod
- deployment.yaml - deployment.yaml
`) `)
th.WriteF("/app/emea/deployment.yaml", ` th.WriteF("emea/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -104,16 +104,16 @@ spec:
containers: containers:
- image: whatever - image: whatever
`) `)
th.WriteK("/app/prod", ` th.WriteK("prod", `
namePrefix: prod- namePrefix: prod-
resources: resources:
- ../base - ../base
`) `)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
`) `)
th.WriteF("/app/base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -124,7 +124,7 @@ spec:
containers: containers:
- image: whatever - image: whatever
`) `)
m := th.Run("/app/gcp", th.MakeDefaultOptions()) m := th.Run("gcp", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -153,14 +153,14 @@ spec:
// instead of prod-foo // instead of prod-foo
func TestIntermediateNameAmbiguous(t *testing.T) { func TestIntermediateNameAmbiguous(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/gcp", ` th.WriteK("gcp", `
namePrefix: gcp- namePrefix: gcp-
resources: resources:
- ../emea - ../emea
patchesStrategicMerge: patchesStrategicMerge:
- depPatch.yaml - depPatch.yaml
`) `)
th.WriteF("/app/gcp/depPatch.yaml", ` th.WriteF("gcp/depPatch.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -168,13 +168,13 @@ metadata:
spec: spec:
replicas: 999 replicas: 999
`) `)
th.WriteK("/app/emea", ` th.WriteK("emea", `
namePrefix: emea- namePrefix: emea-
resources: resources:
- ../prod - ../prod
- deployment.yaml - deployment.yaml
`) `)
th.WriteF("/app/emea/deployment.yaml", ` th.WriteF("emea/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -185,16 +185,16 @@ spec:
containers: containers:
- image: whatever - image: whatever
`) `)
th.WriteK("/app/prod", ` th.WriteK("prod", `
namePrefix: prod- namePrefix: prod-
resources: resources:
- ../base - ../base
`) `)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
`) `)
th.WriteF("/app/base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -205,7 +205,7 @@ spec:
containers: containers:
- image: whatever - image: whatever
`) `)
err := th.RunWithErr("/app/gcp", th.MakeDefaultOptions()) err := th.RunWithErr("gcp", th.MakeDefaultOptions())
assert.Error(t, err) assert.Error(t, err)
} }
@@ -220,13 +220,13 @@ namePrefix: project-
resources: resources:
- app`) - app`)
th.WriteK("/app", ` th.WriteK("app", `
resources: resources:
- resources/deployment.yaml - resources/deployment.yaml
- resources/xql - resources/xql
`) `)
th.WriteK("/app/resources/xql", ` th.WriteK("app/resources/xql", `
resources: resources:
- xql-zero - xql-zero
- xql-one - xql-one
@@ -234,12 +234,12 @@ configurations:
- ./kustomizeconfig.yaml - ./kustomizeconfig.yaml
`) `)
th.WriteF("/app/resources/xql/kustomizeconfig.yaml", ` th.WriteF("app/resources/xql/kustomizeconfig.yaml", `
varReference: varReference:
- path: spec/template/spec/containers/env/valueFrom/secretKeyRef/name - path: spec/template/spec/containers/env/valueFrom/secretKeyRef/name
`) `)
th.WriteK("/app/resources/xql/xql-one", ` th.WriteK("app/resources/xql/xql-one", `
namePrefix: xql-one- namePrefix: xql-one-
resources: resources:
- ../../../../bases/xql - ../../../../bases/xql
@@ -258,11 +258,11 @@ vars:
fieldpath: metadata.name fieldpath: metadata.name
`) `)
th.WriteF("/app/resources/xql/xql-one/config/xql-one-secret.env", ` th.WriteF("app/resources/xql/xql-one/config/xql-one-secret.env", `
arg=1 arg=1
`) `)
th.WriteK("/app/resources/xql/xql-zero", ` th.WriteK("app/resources/xql/xql-zero", `
namePrefix: xql-zero- namePrefix: xql-zero-
resources: resources:
- ../../../../bases/xql - ../../../../bases/xql
@@ -281,7 +281,7 @@ vars:
fieldpath: metadata.name fieldpath: metadata.name
`) `)
th.WriteF("/app/resources/xql/xql-zero/config/xql-zero-secret.env", ` th.WriteF("app/resources/xql/xql-zero/config/xql-zero-secret.env", `
arg=0 arg=0
`) `)
@@ -320,7 +320,7 @@ spec:
key: password key: password
`) `)
th.WriteK("/bases/xql", ` th.WriteK("bases/xql", `
secretGenerator: secretGenerator:
- name: xql-secret - name: xql-secret
envs: envs:

View File

@@ -8,7 +8,7 @@ import (
func TestKeepEmptyArray(t *testing.T) { func TestKeepEmptyArray(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("/app/resources.yaml", ` th.WriteF("resources.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -24,11 +24,11 @@ spec:
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
imagePullSecrets: []`) imagePullSecrets: []`)
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- resources.yaml`) - resources.yaml`)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment

View File

@@ -5,6 +5,7 @@ package krusty
import ( import (
"fmt" "fmt"
"path/filepath"
"sigs.k8s.io/kustomize/api/builtins" "sigs.k8s.io/kustomize/api/builtins"
"sigs.k8s.io/kustomize/api/filesys" "sigs.k8s.io/kustomize/api/filesys"
@@ -19,22 +20,21 @@ import (
"sigs.k8s.io/kustomize/kyaml/openapi" "sigs.k8s.io/kustomize/kyaml/openapi"
) )
// Kustomizer performs kustomizations. It's meant to behave // Kustomizer performs kustomizations.
// similarly to the kustomize CLI, and can be used instead of //
// performing an exec to a kustomize CLI subprocess. // It's meant to behave similarly to the kustomize CLI, and can be
// used instead of performing an exec to a kustomize CLI subprocess.
// To use, load a filesystem with kustomization files (any // To use, load a filesystem with kustomization files (any
// number of overlays and bases), then make a Kustomizer // number of overlays and bases), then make a Kustomizer
// injected with the given fileystem, then call Run. // injected with the given fileystem, then call Run.
type Kustomizer struct { type Kustomizer struct {
fSys filesys.FileSystem
options *Options options *Options
depProvider *provider.DepProvider depProvider *provider.DepProvider
} }
// MakeKustomizer returns an instance of Kustomizer. // MakeKustomizer returns an instance of Kustomizer.
func MakeKustomizer(fSys filesys.FileSystem, o *Options) *Kustomizer { func MakeKustomizer(o *Options) *Kustomizer {
return &Kustomizer{ return &Kustomizer{
fSys: fSys,
options: o, options: o,
depProvider: provider.NewDepProvider(o.UseKyaml), depProvider: provider.NewDepProvider(o.UseKyaml),
} }
@@ -42,16 +42,16 @@ func MakeKustomizer(fSys filesys.FileSystem, o *Options) *Kustomizer {
// Run performs a kustomization. // Run performs a kustomization.
// //
// It uses its internal filesystem reference to read the file at // It reads given path from the given file system, interprets it as
// the given path argument, interpret it as a kustomization.yaml // a kustomization.yaml file, perform the kustomization it represents,
// file, perform the kustomization it represents, and return the // and return the resulting resources.
// resulting resources.
// //
// Any files referenced by the kustomization must be present in the // Any files referenced by the kustomization must be present on the
// internal filesystem. One may call Run any number of times, // filesystem. One may call Run any number of times, on any number
// on any number of internal paths (e.g. the filesystem may contain // of internal paths (e.g. the filesystem may contain multiple overlays,
// multiple overlays, and Run can be called on each of them). // and Run can be called on each of them).
func (b *Kustomizer) Run(path string) (resmap.ResMap, error) { func (b *Kustomizer) Run(
fSys filesys.FileSystem, path string) (resmap.ResMap, error) {
resmapFactory := resmap.NewFactory( resmapFactory := resmap.NewFactory(
b.depProvider.GetResourceFactory(), b.depProvider.GetResourceFactory(),
b.depProvider.GetConflictDetectorFactory()) b.depProvider.GetConflictDetectorFactory())
@@ -59,7 +59,7 @@ func (b *Kustomizer) Run(path string) (resmap.ResMap, error) {
if b.options.LoadRestrictions == types.LoadRestrictionsRootOnly { if b.options.LoadRestrictions == types.LoadRestrictionsRootOnly {
lr = fLdr.RestrictionRootOnly lr = fLdr.RestrictionRootOnly
} }
ldr, err := fLdr.NewLoader(lr, path, b.fSys) ldr, err := fLdr.NewLoader(lr, path, fSys)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -74,7 +74,14 @@ func (b *Kustomizer) Run(path string) (resmap.ResMap, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
err = openapi.SetSchemaVersion(kt.Kustomization().OpenAPI, true) var bytes []byte
if openApiPath, exists := kt.Kustomization().OpenAPI["path"]; exists {
bytes, err = ldr.Load(filepath.Join(ldr.Root(), openApiPath))
if err != nil {
return nil, err
}
}
err = openapi.SetSchema(kt.Kustomization().OpenAPI, bytes, true)
if err != nil { if err != nil {
return nil, err return nil, err
} }

View File

@@ -16,9 +16,8 @@ import (
// For more substantial tests and examples, // For more substantial tests and examples,
// see other tests in this package. // see other tests in this package.
func TestEmptyFileSystem(t *testing.T) { func TestEmptyFileSystem(t *testing.T) {
fSys := filesys.MakeFsInMemory() b := krusty.MakeKustomizer(krusty.MakeDefaultOptions())
b := krusty.MakeKustomizer(fSys, krusty.MakeDefaultOptions()) _, err := b.Run(filesys.MakeFsInMemory(), "noSuchThing")
_, err := b.Run("noSuchThing")
if err == nil { if err == nil {
t.Fatalf("expected error") t.Fatalf("expected error")
} }

View File

@@ -11,7 +11,7 @@ import (
func TestAddManagedbyLabel(t *testing.T) { func TestAddManagedbyLabel(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("/app/service.yaml", ` th.WriteF("service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@@ -20,7 +20,7 @@ spec:
ports: ports:
- port: 7002 - port: 7002
`) `)
th.WriteK("/app", ` th.WriteK(".", `
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
@@ -28,7 +28,7 @@ resources:
`) `)
options := th.MakeDefaultOptions() options := th.MakeDefaultOptions()
options.AddManagedbyLabel = true options.AddManagedbyLabel = true
m := th.Run("/app", options) m := th.Run(".", options)
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service

View File

@@ -10,7 +10,7 @@ import (
) )
func makeCommonFileForMergeEnvFromTest(th kusttest_test.Harness) { func makeCommonFileForMergeEnvFromTest(th kusttest_test.Harness) {
th.WriteF("/app/deployment.yaml", ` th.WriteF("deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -33,7 +33,7 @@ spec:
func TestMergeEnvFrom(t *testing.T) { func TestMergeEnvFrom(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFileForMergeEnvFromTest(th) makeCommonFileForMergeEnvFromTest(th)
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- deployment.yaml - deployment.yaml
@@ -52,7 +52,7 @@ patchesStrategicMerge:
- configMapRef: - configMapRef:
name: another-config name: another-config
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -73,7 +73,7 @@ spec:
func TestMergeEnvFromViaJsonInline(t *testing.T) { func TestMergeEnvFromViaJsonInline(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFileForMergeEnvFromTest(th) makeCommonFileForMergeEnvFromTest(th)
th.WriteK("app", ` th.WriteK(".", `
resources: resources:
- deployment.yaml - deployment.yaml
patches: patches:
@@ -87,7 +87,7 @@ patches:
configMapRef: configMapRef:
name: another-config name: another-config
`) `)
m := th.Run("app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment

View File

@@ -506,7 +506,7 @@ metadata:
} }
func makeCommonFilesForMultiplePatchTests(th kusttest_test.Harness) { func makeCommonFilesForMultiplePatchTests(th kusttest_test.Harness) {
th.WriteK("/app/base", ` th.WriteK("base", `
namePrefix: team-foo- namePrefix: team-foo-
commonLabels: commonLabels:
app: mynginx app: mynginx
@@ -522,7 +522,7 @@ configMapGenerator:
literals: literals:
- foo=bar - foo=bar
`) `)
th.WriteF("/app/base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -548,7 +548,7 @@ spec:
name: configmap-in-base name: configmap-in-base
name: configmap-in-base name: configmap-in-base
`) `)
th.WriteF("/app/base/service.yaml", ` th.WriteF("base/service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@@ -561,7 +561,7 @@ spec:
selector: selector:
app: nginx app: nginx
`) `)
th.WriteK("/app/overlay/staging", ` th.WriteK("overlay/staging", `
namePrefix: staging- namePrefix: staging-
commonLabels: commonLabels:
env: staging env: staging
@@ -580,7 +580,7 @@ configMapGenerator:
func TestMultiplePatchesNoConflict(t *testing.T) { func TestMultiplePatchesNoConflict(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFilesForMultiplePatchTests(th) makeCommonFilesForMultiplePatchTests(th)
th.WriteF("/app/overlay/staging/deployment-patch1.yaml", ` th.WriteF("overlay/staging/deployment-patch1.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -602,7 +602,7 @@ spec:
name: configmap-in-overlay name: configmap-in-overlay
name: configmap-in-overlay name: configmap-in-overlay
`) `)
th.WriteF("/app/overlay/staging/deployment-patch2.yaml", ` th.WriteF("overlay/staging/deployment-patch2.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -616,7 +616,7 @@ spec:
- name: ANOTHERENV - name: ANOTHERENV
value: FOO value: FOO
`) `)
m := th.Run("/app/overlay/staging", th.MakeDefaultOptions()) m := th.Run("overlay/staging", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -718,7 +718,7 @@ metadata:
func TestMultiplePatchesWithConflict(t *testing.T) { func TestMultiplePatchesWithConflict(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFilesForMultiplePatchTests(th) makeCommonFilesForMultiplePatchTests(th)
th.WriteF("/app/overlay/staging/deployment-patch1.yaml", ` th.WriteF("overlay/staging/deployment-patch1.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -739,7 +739,7 @@ spec:
name: configmap-in-overlay name: configmap-in-overlay
name: configmap-in-overlay name: configmap-in-overlay
`) `)
th.WriteF("/app/overlay/staging/deployment-patch2.yaml", ` th.WriteF("overlay/staging/deployment-patch2.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -757,7 +757,7 @@ spec:
if opts.UseKyaml { if opts.UseKyaml {
// kyaml doesn't try to detect conflicts in patches // kyaml doesn't try to detect conflicts in patches
// (so ENABLE_FEATURE_FOO FALSE wins). // (so ENABLE_FEATURE_FOO FALSE wins).
m := th.Run("/app/overlay/staging", opts) m := th.Run("overlay/staging", opts)
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -853,7 +853,7 @@ metadata:
name: staging-configmap-in-overlay-dc6fm46dhm name: staging-configmap-in-overlay-dc6fm46dhm
`) `)
} else { } else {
err := th.RunWithErr("/app/overlay/staging", opts) err := th.RunWithErr("overlay/staging", opts)
if err == nil { if err == nil {
t.Fatalf("expected conflict") t.Fatalf("expected conflict")
} }
@@ -910,9 +910,9 @@ spec:
t.Run(c.name, func(t *testing.T) { t.Run(c.name, func(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFilesForMultiplePatchTests(th) makeCommonFilesForMultiplePatchTests(th)
th.WriteF("/app/overlay/staging/deployment-patch1.yaml", c.patch1) th.WriteF("overlay/staging/deployment-patch1.yaml", c.patch1)
th.WriteF("/app/overlay/staging/deployment-patch2.yaml", c.patch2) th.WriteF("overlay/staging/deployment-patch2.yaml", c.patch2)
m := th.Run("/app/overlay/staging", th.MakeDefaultOptions()) m := th.Run("overlay/staging", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, `apiVersion: apps/v1 th.AssertActualEqualsExpected(m, `apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -1005,7 +1005,7 @@ metadata:
func TestMultiplePatchesBothWithPatchDeleteDirective(t *testing.T) { func TestMultiplePatchesBothWithPatchDeleteDirective(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeCommonFilesForMultiplePatchTests(th) makeCommonFilesForMultiplePatchTests(th)
th.WriteF("/app/overlay/staging/deployment-patch1.yaml", ` th.WriteF("overlay/staging/deployment-patch1.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -1017,7 +1017,7 @@ spec:
- $patch: delete - $patch: delete
name: sidecar name: sidecar
`) `)
th.WriteF("/app/overlay/staging/deployment-patch2.yaml", ` th.WriteF("overlay/staging/deployment-patch2.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -1033,7 +1033,7 @@ spec:
if opt.UseKyaml { if opt.UseKyaml {
// kyaml doesn't fail on conflicts in patches; both containers // kyaml doesn't fail on conflicts in patches; both containers
// (nginx and sidecar) are deleted per this patching instruction. // (nginx and sidecar) are deleted per this patching instruction.
m := th.Run("/app/overlay/staging", opt) m := th.Run("overlay/staging", opt)
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -1114,7 +1114,7 @@ metadata:
`) `)
} else { } else {
// No kyaml means error on a patch conflict. // No kyaml means error on a patch conflict.
err := th.RunWithErr("/app/overlay/staging", opt) err := th.RunWithErr("overlay/staging", opt)
if err == nil { if err == nil {
t.Fatalf("Expected error") t.Fatalf("Expected error")
} }
@@ -1124,3 +1124,141 @@ metadata:
} }
} }
} }
// test for #3513
func TestSmpWithDifferentKeysOnDifferentPorts(t *testing.T) {
th := kusttest_test.MakeHarness(t)
th.WriteK(".", `
resources:
- resource.yaml
patches:
- path: patch.yaml
target:
kind: StatefulSet
name: myapp
`)
th.WriteF("resource.yaml", `
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: myapp
spec:
template:
spec:
containers:
- name: consul
image: "dashicorp/consul:1.9.1"
ports:
- containerPort: 8500
name: http
- containerPort: 8501
name: https
- containerPort: 8301
protocol: "TCP"
name: serflan-tcp
- containerPort: 8301
protocol: "UDP"
name: serflan-udp
- containerPort: 8302
name: serfwan
- containerPort: 8300
name: server
- containerPort: 8600
name: dns-tcp
protocol: "TCP"
- containerPort: 8600
name: dns-udp
protocol: "UDP"`)
th.WriteF("patch.yaml", `
kind: StatefulSet
metadata:
name: myapp
labels:
test: label
`)
m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
test: label
name: myapp
spec:
template:
spec:
containers:
- image: dashicorp/consul:1.9.1
name: consul
ports:
- containerPort: 8301
name: serflan-tcp
protocol: TCP
- containerPort: 8301
name: serflan-udp
protocol: UDP
- containerPort: 8600
name: dns-tcp
protocol: TCP
- containerPort: 8600
name: dns-udp
protocol: UDP
- containerPort: 8500
name: http
- containerPort: 8501
name: https
- containerPort: 8302
name: serfwan
- containerPort: 8300
name: server
`)
}
// test for #3616
func TestSmpDeleteOnResource(t *testing.T) {
th := kusttest_test.MakeHarness(t)
th.WriteK(".", `
resources:
- workloads.yaml
patches:
- patch: |
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: rule1
$patch: delete
`)
th.WriteF("workloads.yaml", `
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
labels:
role: alert-rules
name: rule1
spec:
groups:
- name: rabbitmq.rules
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
labels:
role: alert-rules
name: rule2
spec:
groups:
- name: rabbitmq.rules
`)
m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, `
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
labels:
role: alert-rules
name: rule2
spec:
groups:
- name: rabbitmq.rules
`)
}

View File

@@ -514,13 +514,13 @@ type: Opaque
func TestEmptyFieldSpecValue(t *testing.T) { func TestEmptyFieldSpecValue(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK(".", `
generators: generators:
- generators.yaml - generators.yaml
configurations: configurations:
- kustomizeconfig.yaml - kustomizeconfig.yaml
`) `)
th.WriteF("/app/generators.yaml", ` th.WriteF("generators.yaml", `
apiVersion: builtin apiVersion: builtin
kind: ConfigMapGenerator kind: ConfigMapGenerator
metadata: metadata:
@@ -530,7 +530,7 @@ labels:
literals: literals:
- this_is_a_secret_name= - this_is_a_secret_name=
`) `)
th.WriteF("/app/kustomizeconfig.yaml", ` th.WriteF("kustomizeconfig.yaml", `
nameReference: nameReference:
- kind: Secret - kind: Secret
version: v1 version: v1
@@ -538,7 +538,7 @@ nameReference:
- path: data/this_is_a_secret_name - path: data/this_is_a_secret_name
kind: ConfigMap kind: ConfigMap
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
data: data:

View File

@@ -11,7 +11,7 @@ import (
func TestNamespacedGenerator(t *testing.T) { func TestNamespacedGenerator(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK(".", `
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
configMapGenerator: configMapGenerator:
@@ -34,7 +34,7 @@ secretGenerator:
literals: literals:
- password.txt=anotherSecret - password.txt=anotherSecret
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
data: data:
@@ -74,7 +74,7 @@ type: Opaque
func TestNamespacedGeneratorWithOverlays(t *testing.T) { func TestNamespacedGeneratorWithOverlays(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/base", ` th.WriteK("base", `
namespace: base namespace: base
configMapGenerator: configMapGenerator:
@@ -82,7 +82,7 @@ configMapGenerator:
literals: literals:
- base=apple - base=apple
`) `)
th.WriteK("/app/overlay", ` th.WriteK("overlay", `
resources: resources:
- ../base - ../base
@@ -94,7 +94,7 @@ configMapGenerator:
literals: literals:
- overlay=peach - overlay=peach
`) `)
m := th.Run("/app/overlay", th.MakeDefaultOptions()) m := th.Run("overlay", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
data: data:

View File

@@ -12,7 +12,7 @@ import (
func TestNamespacedSecrets(t *testing.T) { func TestNamespacedSecrets(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("/app/secrets.yaml", ` th.WriteF("secrets.yaml", `
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
@@ -33,7 +33,7 @@ data:
`) `)
// This should find the proper secret. // This should find the proper secret.
th.WriteF("/app/role.yaml", ` th.WriteF("role.yaml", `
kind: ClusterRole kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
metadata: metadata:
@@ -45,7 +45,7 @@ rules:
verbs: ["get"] verbs: ["get"]
`) `)
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- secrets.yaml - secrets.yaml
- role.yaml - role.yaml
@@ -55,7 +55,7 @@ resources:
// The ClusterRole (by def) is not in a namespace, // The ClusterRole (by def) is not in a namespace,
// and in this case applies to *any* Secret resource // and in this case applies to *any* Secret resource
// named "dummy" // named "dummy"
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
data: data:
@@ -722,14 +722,14 @@ func TestVariablesDisambiguatedWithNamespace(t *testing.T) {
func TestAddNamePrefixWithNamespace(t *testing.T) { func TestAddNamePrefixWithNamespace(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("/app/serviceaccount.yaml", ` th.WriteF("serviceaccount.yaml", `
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: prometheus name: prometheus
`) `)
th.WriteF("/app/clusterrolebinding.yaml", ` th.WriteF("clusterrolebinding.yaml", `
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding kind: ClusterRoleBinding
metadata: metadata:
@@ -744,7 +744,7 @@ subjects:
namespace: iter8-monitoring namespace: iter8-monitoring
`) `)
th.WriteK("/app", ` th.WriteK(".", `
namePrefix: iter8- namePrefix: iter8-
namespace: iter8-monitoring namespace: iter8-monitoring
resources: resources:
@@ -752,7 +752,7 @@ resources:
- serviceaccount.yaml - serviceaccount.yaml
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding kind: ClusterRoleBinding

View File

@@ -9,7 +9,7 @@ import (
// https://github.com/kubernetes-sigs/kustomize/issues/2640 // https://github.com/kubernetes-sigs/kustomize/issues/2640
func TestNameUpdateInRoleRef(t *testing.T) { func TestNameUpdateInRoleRef(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("/app/rbac.yaml", ` th.WriteF("rbac.yaml", `
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole kind: ClusterRole
metadata: metadata:
@@ -61,7 +61,7 @@ subjects:
name: default name: default
`) `)
th.WriteK("/app", ` th.WriteK(".", `
namespace: foo namespace: foo
resources: resources:
- rbac.yaml - rbac.yaml
@@ -78,7 +78,7 @@ patches:
name: my-role name: my-role
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole kind: ClusterRole
@@ -138,7 +138,7 @@ subjects:
// https://github.com/kubernetes-sigs/kustomize/issues/3073 // https://github.com/kubernetes-sigs/kustomize/issues/3073
func TestNameUpdateInRoleRef2(t *testing.T) { func TestNameUpdateInRoleRef2(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("/app/workloads.yaml", ` th.WriteF("workloads.yaml", `
--- ---
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@@ -198,7 +198,7 @@ subjects:
name: myapp name: myapp
`) `)
th.WriteF("/app/suffixTransformer.yaml", ` th.WriteF("suffixTransformer.yaml", `
apiVersion: builtin apiVersion: builtin
kind: PrefixSuffixTransformer kind: PrefixSuffixTransformer
metadata: metadata:
@@ -213,7 +213,7 @@ fieldSpecs:
name: myapp name: myapp
`) `)
th.WriteK("/app", ` th.WriteK(".", `
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
@@ -224,7 +224,7 @@ namespace: test
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount

View File

@@ -11,7 +11,7 @@ import (
func TestNullValues1(t *testing.T) { func TestNullValues1(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("/app/deployment.yaml", ` th.WriteF("deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -32,13 +32,13 @@ spec:
image: image image: image
name: example name: example
`) `)
th.WriteF("/app/kustomization.yaml", ` th.WriteF("kustomization.yaml", `
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- deployment.yaml - deployment.yaml
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1

View File

@@ -14,7 +14,7 @@ func TestNumericCommonLabels(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
// A basic deployment just used to put labels into // A basic deployment just used to put labels into
th.WriteF("/app/default/deployment.yaml", ` th.WriteF("default/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -24,14 +24,14 @@ metadata:
// Combine these custom transformers in one kustomization file. // Combine these custom transformers in one kustomization file.
// This kustomization file has a string-valued commonLabel that // This kustomization file has a string-valued commonLabel that
// should always be quoted to remain a string // should always be quoted to remain a string
th.WriteK("/app/default", ` th.WriteK("default", `
commonLabels: commonLabels:
version: "1" version: "1"
resources: resources:
- deployment.yaml - deployment.yaml
`) `)
m := th.Run("/app/default", th.MakeDefaultOptions()) m := th.Run("default", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment

View File

@@ -0,0 +1,230 @@
package krusty_test
import (
"io/ioutil"
"testing"
"github.com/stretchr/testify/assert"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
"sigs.k8s.io/kustomize/kyaml/openapi"
)
func writeTestSchema(th kusttest_test.Harness, filepath string) {
bytes, _ := ioutil.ReadFile("testdata/customschema.json")
th.WriteF(filepath+"mycrd_schema.json", string(bytes))
}
func writeCustomResource(th kusttest_test.Harness, filepath string) {
th.WriteF(filepath, `
apiVersion: example.com/v1alpha1
kind: MyCRD
metadata:
name: service
spec:
template:
spec:
containers:
- name: server
image: server
command: example
ports:
- name: grpc
protocol: TCP
containerPort: 8080
`)
}
func writeTestComponentWithCustomSchema(th kusttest_test.Harness) {
writeTestSchema(th, "comp/")
openapi.ResetOpenAPI()
th.WriteC("comp", `
openapi:
path: mycrd_schema.json
`)
th.WriteF("comp/stub.yaml", `
apiVersion: v1
kind: Deployment
metadata:
name: stub
spec:
replicas: 1
`)
}
const customSchemaPatch = `
patchesStrategicMerge:
- |-
apiVersion: example.com/v1alpha1
kind: MyCRD
metadata:
name: service
spec:
template:
spec:
containers:
- name: server
image: nginx
`
const patchedCustomResource = `
apiVersion: example.com/v1alpha1
kind: MyCRD
metadata:
name: service
spec:
template:
spec:
containers:
- command: example
image: nginx
name: server
ports:
- containerPort: 8080
name: grpc
protocol: TCP
`
// Test for issue #2825
func TestCustomOpenApiFieldBasicUsage(t *testing.T) {
th := kusttest_test.MakeHarness(t)
th.WriteK(".", `
resources:
- mycrd.yaml
openapi:
path: mycrd_schema.json
`+customSchemaPatch)
writeCustomResource(th, "mycrd.yaml")
writeTestSchema(th, "./")
openapi.ResetOpenAPI()
m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, patchedCustomResource)
}
// Error if user tries to specify both builtin version
// and custom schema
func TestCustomOpenApiFieldBothPathAndVersion(t *testing.T) {
th := kusttest_test.MakeHarness(t)
th.WriteK(".", `
resources:
- mycrd.yaml
openapi:
version: v1.18.8
path: mycrd_schema.json
`+customSchemaPatch)
writeCustomResource(th, "mycrd.yaml")
writeTestSchema(th, "./")
openapi.ResetOpenAPI()
err := th.RunWithErr(".", th.MakeDefaultOptions())
assert.Error(t, err)
assert.Equal(t,
"builtin version and custom schema provided, cannot use both",
err.Error())
}
// Test for if the filepath specified is not found
func TestCustomOpenApiFieldFileNotFound(t *testing.T) {
th := kusttest_test.MakeHarness(t)
th.WriteK(".", `
resources:
- mycrd.yaml
openapi:
path: mycrd_schema.json
`+customSchemaPatch)
writeCustomResource(th, "mycrd.yaml")
openapi.ResetOpenAPI()
err := th.RunWithErr(".", th.MakeDefaultOptions())
assert.Error(t, err)
assert.Equal(t,
"'/mycrd_schema.json' doesn't exist",
err.Error())
}
func TestCustomOpenApiFieldFromBase(t *testing.T) {
th := kusttest_test.MakeHarness(t)
th.WriteK("base", `
resources:
- mycrd.yaml
openapi:
path: mycrd_schema.json
`)
th.WriteK("overlay", `
resources:
- ../base
`+customSchemaPatch)
writeCustomResource(th, "base/mycrd.yaml")
writeTestSchema(th, "base/")
openapi.ResetOpenAPI()
m := th.Run("overlay", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, patchedCustomResource)
assert.Equal(t, "using custom schema from file provided",
openapi.GetSchemaVersion())
}
func TestCustomOpenApiFieldFromOverlay(t *testing.T) {
th := kusttest_test.MakeHarness(t)
th.WriteK("base", `
resources:
- mycrd.yaml
`)
th.WriteK("overlay", `
resources:
- ../base
openapi:
path: mycrd_schema.json
`+customSchemaPatch)
writeCustomResource(th, "base/mycrd.yaml")
writeTestSchema(th, "overlay/")
openapi.ResetOpenAPI()
m := th.Run("overlay", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, patchedCustomResource)
assert.Equal(t, "using custom schema from file provided",
openapi.GetSchemaVersion())
}
func TestCustomOpenApiFieldOverlayTakesPrecedence(t *testing.T) {
th := kusttest_test.MakeHarness(t)
th.WriteK("base", `
resources:
- mycrd.yaml
openapi:
path: mycrd_schema.json
`)
th.WriteK("overlay", `
resources:
- ../base
openapi:
version: v1.19.1
`+customSchemaPatch)
writeCustomResource(th, "base/mycrd.yaml")
writeTestSchema(th, "base/")
openapi.ResetOpenAPI()
m := th.Run("overlay", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, `
apiVersion: example.com/v1alpha1
kind: MyCRD
metadata:
name: service
spec:
template:
spec:
containers:
- image: nginx
name: server
`)
assert.Equal(t, "v1191", openapi.GetSchemaVersion())
}
func TestCustomOpenAPIFieldFromComponent(t *testing.T) {
input := []FileGen{
writeTestBase,
writeTestComponentWithCustomSchema,
writeOverlayProd}
th := kusttest_test.MakeHarness(t)
for _, f := range input {
f(th)
}
openapi.ResetOpenAPI()
th.Run(runPath, th.MakeDefaultOptions())
assert.Equal(t, "using custom schema from file provided", openapi.GetSchemaVersion())
}

View File

@@ -11,13 +11,13 @@ import (
func TestOpenApiFieldBasicUsage(t *testing.T) { func TestOpenApiFieldBasicUsage(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK(".", `
openapi: openapi:
version: v1.18.8 version: v1.18.8
resources: resources:
- deployment.yaml - deployment.yaml
`) `)
th.WriteF("/app/deployment.yaml", ` th.WriteF("deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -29,7 +29,7 @@ spec:
- image: whatever - image: whatever
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -46,13 +46,13 @@ spec:
func TestOpenApiFieldNotBuiltin(t *testing.T) { func TestOpenApiFieldNotBuiltin(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK(".", `
openapi: openapi:
version: v1.14.1 version: v1.14.1
resources: resources:
- deployment.yaml - deployment.yaml
`) `)
th.WriteF("/app/deployment.yaml", ` th.WriteF("deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -64,7 +64,7 @@ spec:
- image: whatever - image: whatever
`) `)
err := th.RunWithErr("/app", th.MakeDefaultOptions()) err := th.RunWithErr(".", th.MakeDefaultOptions())
if err == nil { if err == nil {
t.Fatalf("expected an error") t.Fatalf("expected an error")
} }
@@ -72,11 +72,11 @@ spec:
func TestOpenApiFieldDefaultVersion(t *testing.T) { func TestOpenApiFieldDefaultVersion(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- deployment.yaml - deployment.yaml
`) `)
th.WriteF("/app/deployment.yaml", ` th.WriteF("deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -88,7 +88,7 @@ spec:
- image: whatever - image: whatever
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -260,7 +260,7 @@ spec:
func TestOpenAPIFieldFromComponentDefault(t *testing.T) { func TestOpenAPIFieldFromComponentDefault(t *testing.T) {
input := []FileGen{writeTestBase, writeTestComponent, writeOverlayProd} input := []FileGen{writeTestBase, writeTestComponent, writeOverlayProd}
runPath := "/app/prod" runPath := "prod"
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
for _, f := range input { for _, f := range input {
@@ -271,11 +271,11 @@ func TestOpenAPIFieldFromComponentDefault(t *testing.T) {
} }
func writeTestComponentWithOlderOpenAPIVersion(th kusttest_test.Harness) { func writeTestComponentWithOlderOpenAPIVersion(th kusttest_test.Harness) {
th.WriteC("/app/comp", ` th.WriteC("comp", `
openapi: openapi:
version: v1.18.8 version: v1.18.8
`) `)
th.WriteF("/app/comp/stub.yaml", ` th.WriteF("comp/stub.yaml", `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -285,12 +285,13 @@ spec:
`) `)
} }
const runPath = "prod"
func TestOpenAPIFieldFromComponent(t *testing.T) { func TestOpenAPIFieldFromComponent(t *testing.T) {
input := []FileGen{ input := []FileGen{
writeTestBase, writeTestBase,
writeTestComponentWithOlderOpenAPIVersion, writeTestComponentWithOlderOpenAPIVersion,
writeOverlayProd} writeOverlayProd}
runPath := "/app/prod"
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
for _, f := range input { for _, f := range input {

View File

@@ -34,6 +34,7 @@ type Options struct {
// Options related to kustomize plugins. // Options related to kustomize plugins.
PluginConfig *types.PluginConfig PluginConfig *types.PluginConfig
// TODO(#3588): Delete this field (it's always true).
// When true, use kyaml/ packages to manipulate KRM yaml. // When true, use kyaml/ packages to manipulate KRM yaml.
// When false, use k8sdeps/ instead (uses k8s.io/api* packages). // When false, use k8sdeps/ instead (uses k8s.io/api* packages).
UseKyaml bool UseKyaml bool

View File

@@ -14,8 +14,9 @@ import (
func TestRemoteLoad(t *testing.T) { func TestRemoteLoad(t *testing.T) {
fSys := filesys.MakeFsOnDisk() fSys := filesys.MakeFsOnDisk()
b := krusty.MakeKustomizer(fSys, krusty.MakeDefaultOptions()) b := krusty.MakeKustomizer(krusty.MakeDefaultOptions())
m, err := b.Run( m, err := b.Run(
fSys,
"github.com/kubernetes-sigs/kustomize/examples/multibases/dev/?ref=v1.0.6") "github.com/kubernetes-sigs/kustomize/examples/multibases/dev/?ref=v1.0.6")
if utils.IsErrTimeout(err) { if utils.IsErrTimeout(err) {
// Don't fail on timeouts. // Don't fail on timeouts.

View File

@@ -0,0 +1,177 @@
// Copyright 2021 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package krusty_test
import (
"strings"
"testing"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
// This is broken since kustomize v3.9.3.
// See https://github.com/kubernetes-sigs/kustomize/issues/3609 for details.
// Here is a structure of a kustomization of one resource inheriting from
// two bases. One of those bases is shared between the canary base and the
// final resource. This is named canary as it is a simple pattern to
// duplicate a resource that can be used with canary deployments.
//
// base
// | deployment.yaml
// | kustomization.yaml
// canary
// | deployment-canary-patch.yaml
// | kustomization.yaml
// mango
// | deployment-mango-patch.yaml
// | deployment-mango-canary-patch.yaml
// | kustomization.yaml
func TestRepeatBase(t *testing.T) {
th := kusttest_test.MakeHarness(t)
th.WriteK("base", `
resources:
- deployment.yaml
`)
th.WriteF("base/deployment.yaml", `
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: banana
spec:
selector:
matchLabels:
component: banana
template:
metadata:
labels:
component: banana
spec:
containers:
- name: banana
image: image
`)
th.WriteK("canary", `
resources:
- ../base
patches:
- patch: |
- op: replace
path: /metadata/name
value: banana-canary
target:
kind: Deployment
- path: deployment-canary-patch.yaml
`)
th.WriteF("canary/deployment-canary-patch.yaml", `
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: banana-canary
labels:
type: canary
spec:
selector:
matchLabels:
component: banana
type: canary
template:
metadata:
labels:
component: banana
type: canary
spec:
containers:
- name: banana
image: image-canary
`)
th.WriteK("mango", `
nameSuffix: -mango
resources:
- ../base
- ../canary
patches:
- path: deployment-mango-base-patch.yaml
- path: deployment-mango-canary-patch.yaml
`)
th.WriteF("mango/deployment-mango-base-patch.yaml", `
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: banana
spec:
template:
spec:
containers:
- name: banana
image: image-mango
`)
th.WriteF("mango/deployment-mango-canary-patch.yaml", `
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: banana-canary
spec:
template:
spec:
containers:
- name: banana
image: image-canary-mango
`)
err := th.RunWithErr("mango", th.MakeDefaultOptions())
if !strings.Contains(
err.Error(), "multiple matches for Id apps_v1_Deployment|~X|banana; failed to find unique target for patch") {
t.Fatalf("Unexpected err: %v", err)
}
// Uncomenting the following makes it work with kustomize v3.9.2 and bellow.
// m := th.Run("/app", th.MakeDefaultOptions())
// th.AssertActualEqualsExpected(m, `
//apiVersion: apps/v1
//kind: Deployment
//metadata:
// name: deployment-a
//spec:
// selector:
// matchLabels:
// component: deployment
// template:
// metadata:
// labels:
// component: deployment
// spec:
// containers:
// - image: image-a
// name: container-a
//---
//apiVersion: apps/v1
//kind: Deployment
//metadata:
// labels:
// type: canary
// name: deployment-canary-a
//spec:
// selector:
// matchLabels:
// component: deployment
// type: canary
// template:
// metadata:
// labels:
// component: deployment
// spec:
// containers:
// - image: image-canary-a
// name: container-a
//`)
}

View File

@@ -11,7 +11,7 @@ import (
) )
func writeBase(th kusttest_test.Harness) { func writeBase(th kusttest_test.Harness) {
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- serviceaccount.yaml - serviceaccount.yaml
- rolebinding.yaml - rolebinding.yaml
@@ -20,13 +20,13 @@ resources:
namePrefix: pfx- namePrefix: pfx-
nameSuffix: -sfx nameSuffix: -sfx
`) `)
th.WriteF("/app/base/serviceaccount.yaml", ` th.WriteF("base/serviceaccount.yaml", `
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: serviceaccount name: serviceaccount
`) `)
th.WriteF("/app/base/rolebinding.yaml", ` th.WriteF("base/rolebinding.yaml", `
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding kind: RoleBinding
metadata: metadata:
@@ -39,7 +39,7 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: serviceaccount name: serviceaccount
`) `)
th.WriteF("/app/base/clusterrolebinding.yaml", ` th.WriteF("base/clusterrolebinding.yaml", `
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding kind: ClusterRoleBinding
metadata: metadata:
@@ -52,7 +52,7 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: serviceaccount name: serviceaccount
`) `)
th.WriteF("/app/base/clusterrole.yaml", ` th.WriteF("base/clusterrole.yaml", `
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole kind: ClusterRole
metadata: metadata:
@@ -66,13 +66,13 @@ rules:
func writeMidOverlays(th kusttest_test.Harness) { func writeMidOverlays(th kusttest_test.Harness) {
// Mid-level overlays // Mid-level overlays
th.WriteK("/app/overlays/a", ` th.WriteK("overlays/a", `
resources: resources:
- ../../base - ../../base
namePrefix: a- namePrefix: a-
nameSuffix: -suffixA nameSuffix: -suffixA
`) `)
th.WriteK("/app/overlays/b", ` th.WriteK("overlays/b", `
resources: resources:
- ../../base - ../../base
namePrefix: b- namePrefix: b-
@@ -82,7 +82,7 @@ nameSuffix: -suffixB
func writeTopOverlay(th kusttest_test.Harness) { func writeTopOverlay(th kusttest_test.Harness) {
// Top overlay, combining the mid-level overlays // Top overlay, combining the mid-level overlays
th.WriteK("/app/combined", ` th.WriteK("combined", `
resources: resources:
- ../overlays/a - ../overlays/a
- ../overlays/b - ../overlays/b
@@ -92,7 +92,7 @@ resources:
func TestBase(t *testing.T) { func TestBase(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeBase(th) writeBase(th)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@@ -143,7 +143,7 @@ func TestMidLevelA(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeBase(th) writeBase(th)
writeMidOverlays(th) writeMidOverlays(th)
m := th.Run("/app/overlays/a", th.MakeDefaultOptions()) m := th.Run("overlays/a", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@@ -194,7 +194,7 @@ func TestMidLevelB(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
writeBase(th) writeBase(th)
writeMidOverlays(th) writeMidOverlays(th)
m := th.Run("/app/overlays/b", th.MakeDefaultOptions()) m := th.Run("overlays/b", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@@ -246,7 +246,7 @@ func TestMultibasesNoConflict(t *testing.T) {
writeBase(th) writeBase(th)
writeMidOverlays(th) writeMidOverlays(th)
writeTopOverlay(th) writeTopOverlay(th)
m := th.Run("/app/combined", th.MakeDefaultOptions()) m := th.Run("combined", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@@ -342,7 +342,7 @@ func TestMultibasesWithConflict(t *testing.T) {
writeMidOverlays(th) writeMidOverlays(th)
writeTopOverlay(th) writeTopOverlay(th)
th.WriteK("/app/overlays/a", ` th.WriteK("overlays/a", `
namePrefix: a- namePrefix: a-
nameSuffix: -suffixA nameSuffix: -suffixA
resources: resources:
@@ -351,14 +351,14 @@ resources:
`) `)
// Expect an error because this resource in the overlay // Expect an error because this resource in the overlay
// matches a resource in the base. // matches a resource in the base.
th.WriteF("/app/overlays/a/serviceaccount.yaml", ` th.WriteF("overlays/a/serviceaccount.yaml", `
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: serviceaccount name: serviceaccount
`) `)
err := th.RunWithErr("/app/combined", th.MakeDefaultOptions()) err := th.RunWithErr("combined", th.MakeDefaultOptions())
if err == nil { if err == nil {
t.Fatalf("expected error") t.Fatalf("expected error")
} }

View File

@@ -10,12 +10,12 @@ func TestRoleBindingAcrossNamespace(t *testing.T) {
th := kusttest_test.MakeEnhancedHarness(t) th := kusttest_test.MakeEnhancedHarness(t)
defer th.Reset() defer th.Reset()
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- resource.yaml - resource.yaml
nameSuffix: -ns2 nameSuffix: -ns2
`) `)
th.WriteF("/app/resource.yaml", ` th.WriteF("resource.yaml", `
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
@@ -77,7 +77,7 @@ subjects:
namespace: ns1 namespace: ns1
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@@ -145,12 +145,12 @@ func TestRoleBindingAcrossNamespaceWoSubjects(t *testing.T) {
th := kusttest_test.MakeEnhancedHarness(t) th := kusttest_test.MakeEnhancedHarness(t)
defer th.Reset() defer th.Reset()
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- resource.yaml - resource.yaml
nameSuffix: -ns2 nameSuffix: -ns2
`) `)
th.WriteF("/app/resource.yaml", ` th.WriteF("resource.yaml", `
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
@@ -181,7 +181,7 @@ roleRef:
name: my-role name: my-role
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@@ -219,18 +219,18 @@ roleRef:
func TestRoleBindingWhenSubjectsAcrossNamespace(t *testing.T) { func TestRoleBindingWhenSubjectsAcrossNamespace(t *testing.T) {
th := kusttest_test.MakeEnhancedHarness(t) th := kusttest_test.MakeEnhancedHarness(t)
defer th.Reset() defer th.Reset()
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- ./ns1 - ./ns1
- ./ns2 - ./ns2
`) `)
th.WriteK("/app/ns1", ` th.WriteK("ns1", `
namespace: namespace-1 namespace: namespace-1
resources: resources:
- role-ns1.yaml - role-ns1.yaml
- rolebinding-ns1.yaml - rolebinding-ns1.yaml
`) `)
th.WriteF("/app/ns1/role-ns1.yaml", ` th.WriteF("ns1/role-ns1.yaml", `
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
metadata: metadata:
@@ -240,7 +240,7 @@ rules:
resources: ["pods"] resources: ["pods"]
verbs: ["get"] verbs: ["get"]
`) `)
th.WriteF("/app/ns1/rolebinding-ns1.yaml", ` th.WriteF("ns1/rolebinding-ns1.yaml", `
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
metadata: metadata:
@@ -254,13 +254,13 @@ subjects:
name: testAccount name: testAccount
namespace: namespace-2 namespace: namespace-2
`) `)
th.WriteK("/app/ns2", ` th.WriteK("ns2", `
namespace: namespace-2 namespace: namespace-2
resources: resources:
- role-ns2.yaml - role-ns2.yaml
- rolebinding-ns2.yaml - rolebinding-ns2.yaml
`) `)
th.WriteF("/app/ns2/role-ns2.yaml", ` th.WriteF("ns2/role-ns2.yaml", `
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
metadata: metadata:
@@ -270,7 +270,7 @@ rules:
resources: ["pods"] resources: ["pods"]
verbs: ["get"] verbs: ["get"]
`) `)
th.WriteF("/app/ns2/rolebinding-ns2.yaml", ` th.WriteF("ns2/rolebinding-ns2.yaml", `
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
metadata: metadata:
@@ -285,7 +285,7 @@ subjects:
namespace: namespace-1 namespace: namespace-1
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role

View File

@@ -11,7 +11,7 @@ import (
func TestSimple1(t *testing.T) { func TestSimple1(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("/dep.yaml", ` th.WriteF("dep.yaml", `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -19,7 +19,7 @@ metadata:
spec: spec:
numReplicas: 1 numReplicas: 1
`) `)
th.WriteF("/patch.yaml", ` th.WriteF("patch.yaml", `
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -28,13 +28,13 @@ spec:
numReplicas: 999 numReplicas: 999
`) `)
th.WriteK("/", ` th.WriteK(".", `
resources: resources:
- dep.yaml - dep.yaml
patchesStrategicMerge: patchesStrategicMerge:
- patch.yaml - patch.yaml
`) `)
m := th.Run("/", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1

View File

@@ -13,7 +13,7 @@ import (
// is invalid as plain style. // is invalid as plain style.
func TestLongLineBreaks(t *testing.T) { func TestLongLineBreaks(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteF("/app/deployment.yaml", ` th.WriteF("deployment.yaml", `
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -42,11 +42,11 @@ spec:
- name: INVALID_PLAIN_STYLE_STRING - name: INVALID_PLAIN_STYLE_STRING
value: ': test' value: ': test'
`) `)
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- deployment.yaml - deployment.yaml
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment

92532
api/krusty/testdata/customschema.json vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -24,12 +24,12 @@ func TestPluginsNotEnabled(t *testing.T) {
BuildGoPlugin("someteam.example.com", "v1", "StringPrefixer") BuildGoPlugin("someteam.example.com", "v1", "StringPrefixer")
defer th.Reset() defer th.Reset()
th.WriteK("/app", ` th.WriteK(".", `
transformers: transformers:
- stringPrefixer.yaml - stringPrefixer.yaml
`) `)
writeStringPrefixer(th, "/app/stringPrefixer.yaml", "apple") writeStringPrefixer(th, "stringPrefixer.yaml", "apple")
err := th.RunWithErr("/app", th.MakeOptionsPluginsDisabled()) err := th.RunWithErr(".", th.MakeOptionsPluginsDisabled())
if err == nil { if err == nil {
t.Fatalf("expected error") t.Fatalf("expected error")
} }
@@ -43,7 +43,7 @@ func TestSedTransformer(t *testing.T) {
PrepExecPlugin("someteam.example.com", "v1", "SedTransformer") PrepExecPlugin("someteam.example.com", "v1", "SedTransformer")
defer th.Reset() defer th.Reset()
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- configmap.yaml - configmap.yaml
@@ -56,19 +56,19 @@ configMapGenerator:
- FOO=$FOO - FOO=$FOO
- BAR=$BAR - BAR=$BAR
`) `)
th.WriteF("/app/sed-transformer.yaml", ` th.WriteF("sed-transformer.yaml", `
apiVersion: someteam.example.com/v1 apiVersion: someteam.example.com/v1
kind: SedTransformer kind: SedTransformer
metadata: metadata:
name: some-random-name name: some-random-name
argsFromFile: sed-input.txt argsFromFile: sed-input.txt
`) `)
th.WriteF("/app/sed-input.txt", ` th.WriteF("sed-input.txt", `
s/$FOO/foo/g s/$FOO/foo/g
s/$BAR/bar/g s/$BAR/bar/g
`) `)
th.WriteF("/app/configmap.yaml", ` th.WriteF("configmap.yaml", `
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
@@ -79,7 +79,7 @@ data:
foo: $FOO foo: $FOO
`) `)
m := th.Run("/app", th.MakeOptionsPluginsEnabled()) m := th.Run(".", th.MakeOptionsPluginsEnabled())
th.AssertActualEqualsExpectedNoIdAnnotations(m, ` th.AssertActualEqualsExpectedNoIdAnnotations(m, `
apiVersion: v1 apiVersion: v1
data: data:
@@ -140,7 +140,7 @@ func TestOrderedTransformers(t *testing.T) {
BuildGoPlugin("someteam.example.com", "v1", "DatePrefixer") BuildGoPlugin("someteam.example.com", "v1", "DatePrefixer")
defer th.Reset() defer th.Reset()
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- deployment.yaml - deployment.yaml
transformers: transformers:
@@ -149,12 +149,12 @@ transformers:
- applePrefixer.yaml - applePrefixer.yaml
- date2Prefixer.yaml - date2Prefixer.yaml
`) `)
writeDeployment(th, "/app/deployment.yaml") writeDeployment(th, "deployment.yaml")
writeStringPrefixer(th, "/app/applePrefixer.yaml", "apple") writeStringPrefixer(th, "applePrefixer.yaml", "apple")
writeStringPrefixer(th, "/app/peachPrefixer.yaml", "peach") writeStringPrefixer(th, "peachPrefixer.yaml", "peach")
writeDatePrefixer(th, "/app/date1Prefixer.yaml", "date1") writeDatePrefixer(th, "date1Prefixer.yaml", "date1")
writeDatePrefixer(th, "/app/date2Prefixer.yaml", "date2") writeDatePrefixer(th, "date2Prefixer.yaml", "date2")
m := th.Run("/app", th.MakeOptionsPluginsEnabled()) m := th.Run(".", th.MakeOptionsPluginsEnabled())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -178,24 +178,24 @@ func TestTransformedTransformers(t *testing.T) {
BuildGoPlugin("someteam.example.com", "v1", "DatePrefixer") BuildGoPlugin("someteam.example.com", "v1", "DatePrefixer")
defer th.Reset() defer th.Reset()
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- stringPrefixer.yaml - stringPrefixer.yaml
transformers: transformers:
- datePrefixer.yaml - datePrefixer.yaml
`) `)
writeStringPrefixer(th, "/app/base/stringPrefixer.yaml", "apple") writeStringPrefixer(th, "base/stringPrefixer.yaml", "apple")
writeDatePrefixer(th, "/app/base/datePrefixer.yaml", "date") writeDatePrefixer(th, "base/datePrefixer.yaml", "date")
th.WriteK("/app/overlay", ` th.WriteK("overlay", `
resources: resources:
- deployment.yaml - deployment.yaml
transformers: transformers:
- ../base - ../base
`) `)
writeDeployment(th, "/app/overlay/deployment.yaml") writeDeployment(th, "overlay/deployment.yaml")
m := th.Run("/app/overlay", th.MakeOptionsPluginsEnabled()) m := th.Run("overlay", th.MakeOptionsPluginsEnabled())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment

View File

@@ -10,14 +10,14 @@ import (
) )
func makeStatefulSetKustomization(th kusttest_test.Harness) { func makeStatefulSetKustomization(th kusttest_test.Harness) {
th.WriteK("/app", ` th.WriteK(".", `
commonLabels: commonLabels:
notIn: arrays notIn: arrays
resources: resources:
- statefulset.yaml - statefulset.yaml
- statefulset-with-template.yaml - statefulset-with-template.yaml
`) `)
th.WriteF("/app/statefulset.yaml", ` th.WriteF("statefulset.yaml", `
kind: StatefulSet kind: StatefulSet
apiVersion: apps/v1 apiVersion: apps/v1
metadata: metadata:
@@ -42,7 +42,7 @@ spec:
- containerPort: 80 - containerPort: 80
name: web name: web
`) `)
th.WriteF("/app/statefulset-with-template.yaml", ` th.WriteF("statefulset-with-template.yaml", `
kind: StatefulSet kind: StatefulSet
apiVersion: apps/v1 apiVersion: apps/v1
metadata: metadata:
@@ -94,7 +94,7 @@ spec:
func TestTransformersNoCreateArrays(t *testing.T) { func TestTransformersNoCreateArrays(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeStatefulSetKustomization(th) makeStatefulSetKustomization(th)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet

View File

@@ -10,7 +10,7 @@ import (
) )
func makeTransfomersImageBase(th kusttest_test.Harness) { func makeTransfomersImageBase(th kusttest_test.Harness) {
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deploy1.yaml - deploy1.yaml
- random.yaml - random.yaml
@@ -34,7 +34,7 @@ images:
newName: my-docker newName: my-docker
digest: sha256:25a0d4b4 digest: sha256:25a0d4b4
`) `)
th.WriteF("/app/base/deploy1.yaml", ` th.WriteF("base/deploy1.yaml", `
group: apps group: apps
apiVersion: v1 apiVersion: v1
kind: Deployment kind: Deployment
@@ -56,7 +56,7 @@ spec:
- name: postgresdb - name: postgresdb
image: postgres:1.8.0 image: postgres:1.8.0
`) `)
th.WriteF("/app/base/random.yaml", ` th.WriteF("base/random.yaml", `
kind: randomKind kind: randomKind
metadata: metadata:
name: random name: random
@@ -95,7 +95,7 @@ spec3:
func TestIssue1281_JsonPatchAndImageTag(t *testing.T) { func TestIssue1281_JsonPatchAndImageTag(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK(".", `
resources: resources:
- deployment.yaml - deployment.yaml
@@ -113,7 +113,7 @@ patchesJson6902:
name: ben name: ben
path: patch.json path: patch.json
`) `)
th.WriteF("/app/deployment.yaml", ` th.WriteF("deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -138,7 +138,7 @@ spec:
image: abbott image: abbott
`) `)
th.WriteF("/app/patch.json", ` th.WriteF("patch.json", `
[ {"op": "add", [ {"op": "add",
"path": "/spec/replica", "value": "3"}, "path": "/spec/replica", "value": "3"},
{"op": "replace", {"op": "replace",
@@ -146,7 +146,7 @@ spec:
"value": { "image": "costello" } } ] "value": { "image": "costello" } } ]
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -179,7 +179,7 @@ spec:
func TestTransfomersImageDefaultConfig(t *testing.T) { func TestTransfomersImageDefaultConfig(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeTransfomersImageBase(th) makeTransfomersImageBase(th)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
group: apps group: apps
@@ -239,7 +239,7 @@ spec3:
} }
func makeTransfomersImageCustomBase(th kusttest_test.Harness) { func makeTransfomersImageCustomBase(th kusttest_test.Harness) {
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- custom.yaml - custom.yaml
configurations: configurations:
@@ -264,7 +264,7 @@ images:
newName: my-docker newName: my-docker
digest: sha256:25a0d4b4 digest: sha256:25a0d4b4
`) `)
th.WriteF("/app/base/custom.yaml", ` th.WriteF("base/custom.yaml", `
kind: customKind kind: customKind
metadata: metadata:
name: custom name: custom
@@ -299,7 +299,7 @@ spec3:
- name: my-cool-app - name: my-cool-app
image: gcr.io:8080/my-project/my-cool-app:latest image: gcr.io:8080/my-project/my-cool-app:latest
`) `)
th.WriteF("/app/base/config/custom.yaml", ` th.WriteF("base/config/custom.yaml", `
images: images:
- kind: Custom - kind: Custom
path: spec/template/spec/myContainers[]/image path: spec/template/spec/myContainers[]/image
@@ -313,7 +313,7 @@ images:
func TestTransfomersImageCustomConfig(t *testing.T) { func TestTransfomersImageCustomConfig(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeTransfomersImageCustomBase(th) makeTransfomersImageCustomBase(th)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
kind: customKind kind: customKind
metadata: metadata:
@@ -352,7 +352,7 @@ spec3:
} }
func makeTransfomersImageKnativeBase(th kusttest_test.Harness) { func makeTransfomersImageKnativeBase(th kusttest_test.Harness) {
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- knative.yaml - knative.yaml
configurations: configurations:
@@ -361,7 +361,7 @@ images:
- name: solsa-echo - name: solsa-echo
newTag: foo newTag: foo
`) `)
th.WriteF("/app/base/knative.yaml", ` th.WriteF("base/knative.yaml", `
apiVersion: serving.knative.dev/v1alpha1 apiVersion: serving.knative.dev/v1alpha1
kind: Service kind: Service
metadata: metadata:
@@ -374,7 +374,7 @@ spec:
container: container:
image: solsa-echo image: solsa-echo
`) `)
th.WriteF("/app/base/config/knative.yaml", ` th.WriteF("base/config/knative.yaml", `
images: images:
- path: spec/runLatest/configuration/revisionTemplate/spec/container/image - path: spec/runLatest/configuration/revisionTemplate/spec/container/image
apiVersion: serving.knative.dev/v1alpha1 apiVersion: serving.knative.dev/v1alpha1
@@ -385,7 +385,7 @@ images:
func TestTransfomersImageKnativeConfig(t *testing.T) { func TestTransfomersImageKnativeConfig(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
makeTransfomersImageKnativeBase(th) makeTransfomersImageKnativeBase(th)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: serving.knative.dev/v1alpha1 apiVersion: serving.knative.dev/v1alpha1
kind: Service kind: Service

View File

@@ -12,7 +12,7 @@ import (
func TestBasicVariableRef(t *testing.T) { func TestBasicVariableRef(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app", ` th.WriteK(".", `
namePrefix: base- namePrefix: base-
resources: resources:
- pod.yaml - pod.yaml
@@ -26,7 +26,7 @@ vars:
fieldpath: metadata.name fieldpath: metadata.name
`) `)
th.WriteF("/app/pod.yaml", ` th.WriteF("pod.yaml", `
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
@@ -42,7 +42,7 @@ spec:
- name: FOO - name: FOO
value: "$(POD_NAME)" value: "$(POD_NAME)"
`) `)
m := th.Run("/app", th.MakeDefaultOptions()) m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
@@ -63,7 +63,7 @@ spec:
func TestBasicVarCollision(t *testing.T) { func TestBasicVarCollision(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/base1", ` th.WriteK("base1", `
namePrefix: base1- namePrefix: base1-
resources: resources:
- pod.yaml - pod.yaml
@@ -76,7 +76,7 @@ vars:
fieldref: fieldref:
fieldpath: metadata.name fieldpath: metadata.name
`) `)
th.WriteF("/app/base1/pod.yaml", ` th.WriteF("base1/pod.yaml", `
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
@@ -93,7 +93,7 @@ spec:
value: "$(POD_NAME)" value: "$(POD_NAME)"
`) `)
th.WriteK("/app/base2", ` th.WriteK("base2", `
namePrefix: base2- namePrefix: base2-
resources: resources:
- pod.yaml - pod.yaml
@@ -106,7 +106,7 @@ vars:
fieldref: fieldref:
fieldpath: metadata.name fieldpath: metadata.name
`) `)
th.WriteF("/app/base2/pod.yaml", ` th.WriteF("base2/pod.yaml", `
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
@@ -123,12 +123,12 @@ spec:
value: "$(POD_NAME)" value: "$(POD_NAME)"
`) `)
th.WriteK("/app/overlay", ` th.WriteK("overlay", `
resources: resources:
- ../base1 - ../base1
- ../base2 - ../base2
`) `)
err := th.RunWithErr("/app/overlay", th.MakeDefaultOptions()) err := th.RunWithErr("overlay", th.MakeDefaultOptions())
if err == nil { if err == nil {
t.Fatalf("should have an error") t.Fatalf("should have an error")
} }
@@ -139,7 +139,7 @@ resources:
func TestVarPropagatesUp(t *testing.T) { func TestVarPropagatesUp(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/base1", ` th.WriteK("base1", `
namePrefix: base1- namePrefix: base1-
resources: resources:
- pod.yaml - pod.yaml
@@ -152,7 +152,7 @@ vars:
fieldref: fieldref:
fieldpath: metadata.name fieldpath: metadata.name
`) `)
th.WriteF("/app/base1/pod.yaml", ` th.WriteF("base1/pod.yaml", `
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
@@ -169,7 +169,7 @@ spec:
value: "$(POD_NAME1)" value: "$(POD_NAME1)"
`) `)
th.WriteK("/app/base2", ` th.WriteK("base2", `
namePrefix: base2- namePrefix: base2-
resources: resources:
- pod.yaml - pod.yaml
@@ -182,7 +182,7 @@ vars:
fieldref: fieldref:
fieldpath: metadata.name fieldpath: metadata.name
`) `)
th.WriteF("/app/base2/pod.yaml", ` th.WriteF("base2/pod.yaml", `
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
@@ -199,13 +199,13 @@ spec:
value: "$(POD_NAME2)" value: "$(POD_NAME2)"
`) `)
th.WriteK("/app/overlay", ` th.WriteK("overlay", `
resources: resources:
- pod.yaml - pod.yaml
- ../base1 - ../base1
- ../base2 - ../base2
`) `)
th.WriteF("/app/overlay/pod.yaml", ` th.WriteF("overlay/pod.yaml", `
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
@@ -224,7 +224,7 @@ spec:
- name: P2 - name: P2
value: "$(POD_NAME2)" value: "$(POD_NAME2)"
`) `)
m := th.Run("/app/overlay", th.MakeDefaultOptions()) m := th.Run("overlay", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
@@ -282,7 +282,7 @@ spec:
// twice, it's a collision, so it's denied. // twice, it's a collision, so it's denied.
func TestBug506(t *testing.T) { func TestBug506(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/base", ` th.WriteK("base", `
namePrefix: base- namePrefix: base-
resources: resources:
- pod.yaml - pod.yaml
@@ -295,7 +295,7 @@ vars:
fieldref: fieldref:
fieldpath: metadata.name fieldpath: metadata.name
`) `)
th.WriteF("/app/base/pod.yaml", ` th.WriteF("base/pod.yaml", `
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
@@ -308,17 +308,17 @@ spec:
- name: POD_NAME - name: POD_NAME
value: $(POD_NAME) value: $(POD_NAME)
`) `)
th.WriteK("/app/o1", ` th.WriteK("o1", `
nameprefix: p1- nameprefix: p1-
resources: resources:
- ../base - ../base
`) `)
th.WriteK("/app/o2", ` th.WriteK("o2", `
nameprefix: p2- nameprefix: p2-
resources: resources:
- ../base - ../base
`) `)
th.WriteK("/app/top", ` th.WriteK("top", `
resources: resources:
- ../o1 - ../o1
- ../o2 - ../o2
@@ -351,7 +351,7 @@ resources:
name: myServer name: myServer
` `
*/ */
err := th.RunWithErr("/app/top", th.MakeDefaultOptions()) err := th.RunWithErr("top", th.MakeDefaultOptions())
if err == nil { if err == nil {
t.Fatalf("should have an error") t.Fatalf("should have an error")
} }
@@ -543,7 +543,7 @@ metadata:
func TestVarRefBig(t *testing.T) { func TestVarRefBig(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/base", ` th.WriteK("base", `
namePrefix: base- namePrefix: base-
resources: resources:
- role-stuff.yaml - role-stuff.yaml
@@ -593,7 +593,7 @@ vars:
apiVersion: v1 apiVersion: v1
fieldref: fieldref:
fieldpath: metadata.name`) fieldpath: metadata.name`)
th.WriteF("/app/base/cronjob.yaml", ` th.WriteF("base/cronjob.yaml", `
apiVersion: batch/v1beta1 apiVersion: batch/v1beta1
kind: CronJob kind: CronJob
metadata: metadata:
@@ -616,7 +616,7 @@ spec:
- name: CDB_PUBLIC_SVC - name: CDB_PUBLIC_SVC
value: "$(CDB_PUBLIC_SVC)" value: "$(CDB_PUBLIC_SVC)"
`) `)
th.WriteF("/app/base/services.yaml", ` th.WriteF("base/services.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@@ -663,7 +663,7 @@ spec:
selector: selector:
app: cockroachdb app: cockroachdb
`) `)
th.WriteF("/app/base/role-stuff.yaml", ` th.WriteF("base/role-stuff.yaml", `
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
@@ -732,7 +732,7 @@ subjects:
name: cockroachdb name: cockroachdb
namespace: default namespace: default
`) `)
th.WriteF("/app/base/pdb.yaml", ` th.WriteF("base/pdb.yaml", `
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@@ -745,7 +745,7 @@ spec:
app: cockroachdb app: cockroachdb
maxUnavailable: 1 maxUnavailable: 1
`) `)
th.WriteF("/app/base/statefulset.yaml", ` th.WriteF("base/statefulset.yaml", `
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
@@ -854,12 +854,12 @@ spec:
requests: requests:
storage: 1Gi storage: 1Gi
`) `)
th.WriteK("/app/overlay/staging", ` th.WriteK("overlay/staging", `
namePrefix: dev- namePrefix: dev-
resources: resources:
- ../../base - ../../base
`) `)
m := th.Run("/app/overlay/staging", th.MakeDefaultOptions()) m := th.Run("overlay/staging", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@@ -1165,7 +1165,7 @@ metadata:
func TestVariableRefIngressOverlay(t *testing.T) { func TestVariableRefIngressOverlay(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- service.yaml - service.yaml
- deployment.yaml - deployment.yaml
@@ -1180,7 +1180,7 @@ vars:
fieldref: fieldref:
fieldpath: metadata.name fieldpath: metadata.name
`) `)
th.WriteF("/app/base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -1203,7 +1203,7 @@ spec:
- name: http - name: http
containerPort: 80 containerPort: 80
`) `)
th.WriteF("/app/base/ingress.yaml", ` th.WriteF("base/ingress.yaml", `
apiVersion: networking.k8s.io/v1beta1 apiVersion: networking.k8s.io/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:
@@ -1224,7 +1224,7 @@ spec:
- $(DEPLOYMENT_NAME).example.com - $(DEPLOYMENT_NAME).example.com
secretName: $(DEPLOYMENT_NAME).example.com-tls secretName: $(DEPLOYMENT_NAME).example.com-tls
`) `)
th.WriteF("/app/base/service.yaml", ` th.WriteF("base/service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@@ -1238,12 +1238,12 @@ spec:
protocol: TCP protocol: TCP
targetPort: http targetPort: http
`) `)
th.WriteK("/app/overlay", ` th.WriteK("overlay", `
nameprefix: kustomized- nameprefix: kustomized-
resources: resources:
- ../base - ../base
`) `)
m := th.Run("/app/overlay", th.MakeDefaultOptions()) m := th.Run("overlay", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@@ -1304,7 +1304,7 @@ spec:
func TestVariableRefMountPath(t *testing.T) { func TestVariableRefMountPath(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
- namespace.yaml - namespace.yaml
@@ -1317,7 +1317,7 @@ vars:
name: my-namespace name: my-namespace
`) `)
th.WriteF("/app/base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -1338,14 +1338,14 @@ vars:
- name: my-volume - name: my-volume
emptyDir: {} emptyDir: {}
`) `)
th.WriteF("/app/base/namespace.yaml", ` th.WriteF("base/namespace.yaml", `
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: my-namespace name: my-namespace
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -1376,7 +1376,7 @@ metadata:
func TestVariableRefMaps(t *testing.T) { func TestVariableRefMaps(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- deployment.yaml - deployment.yaml
- namespace.yaml - namespace.yaml
@@ -1387,7 +1387,7 @@ vars:
kind: Namespace kind: Namespace
name: my-namespace name: my-namespace
`) `)
th.WriteF("/app/base/deployment.yaml", ` th.WriteF("base/deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -1403,14 +1403,14 @@ vars:
- name: app - name: app
image: busybox image: busybox
`) `)
th.WriteF("/app/base/namespace.yaml", ` th.WriteF("base/namespace.yaml", `
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: my-namespace name: my-namespace
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@@ -1436,14 +1436,14 @@ metadata:
func TestVaribaleRefDifferentPrefix(t *testing.T) { func TestVaribaleRefDifferentPrefix(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/base", ` th.WriteK("base", `
namePrefix: base- namePrefix: base-
resources: resources:
- dev - dev
- test - test
`) `)
th.WriteK("/app/base/dev", ` th.WriteK("base/dev", `
namePrefix: dev- namePrefix: dev-
resources: resources:
- elasticsearch-dev-service.yml - elasticsearch-dev-service.yml
@@ -1457,7 +1457,7 @@ vars:
fieldpath: metadata.name fieldpath: metadata.name
`) `)
th.WriteF("/app/base/dev/elasticsearch-dev-service.yml", ` th.WriteF("base/dev/elasticsearch-dev-service.yml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
@@ -1483,7 +1483,7 @@ spec:
clusterIP: None clusterIP: None
`) `)
th.WriteK("/app/base/test", ` th.WriteK("base/test", `
namePrefix: test- namePrefix: test-
resources: resources:
- elasticsearch-test-service.yml - elasticsearch-test-service.yml
@@ -1496,7 +1496,7 @@ vars:
fieldref: fieldref:
fieldpath: metadata.name fieldpath: metadata.name
`) `)
th.WriteF("/app/base/test/elasticsearch-test-service.yml", ` th.WriteF("base/test/elasticsearch-test-service.yml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
@@ -1522,7 +1522,7 @@ spec:
clusterIP: None clusterIP: None
`) `)
m := th.Run("/app/base", th.MakeDefaultOptions()) m := th.Run("base", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet
@@ -1576,7 +1576,7 @@ spec:
func TestVariableRefNFSServer(t *testing.T) { func TestVariableRefNFSServer(t *testing.T) {
th := kusttest_test.MakeHarness(t) th := kusttest_test.MakeHarness(t)
th.WriteK("/app/base", ` th.WriteK("base", `
resources: resources:
- pv_pvc.yaml - pv_pvc.yaml
- nfs_deployment.yaml - nfs_deployment.yaml
@@ -1599,7 +1599,7 @@ vars:
fieldref: fieldref:
fieldpath: metadata.name fieldpath: metadata.name
`) `)
th.WriteF("/app/base/pv_pvc.yaml", ` th.WriteF("base/pv_pvc.yaml", `
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
@@ -1611,7 +1611,7 @@ spec:
requests: requests:
storage: 10Gi storage: 10Gi
`) `)
th.WriteF("/app/base/nfs_deployment.yaml", ` th.WriteF("base/nfs_deployment.yaml", `
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -1643,7 +1643,7 @@ spec:
persistentVolumeClaim: persistentVolumeClaim:
claimName: shared-volume-claim claimName: shared-volume-claim
`) `)
th.WriteF("/app/base/nfs_service.yaml", ` th.WriteF("base/nfs_service.yaml", `
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@@ -1659,7 +1659,7 @@ spec:
selector: selector:
role: nfs-server role: nfs-server
`) `)
th.WriteF("/app/base/Deployment.yaml", ` th.WriteF("base/Deployment.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@@ -1682,7 +1682,7 @@ spec:
- name: http - name: http
containerPort: 80 containerPort: 80
volumeMounts: volumeMounts:
- mountPath: /app/shared-files - mountPath: shared-files
name: nfs-files-vol name: nfs-files-vol
volumes: volumes:
- name: nfs-files-vol - name: nfs-files-vol
@@ -1691,7 +1691,7 @@ spec:
path: / path: /
readOnly: false readOnly: false
`) `)
th.WriteF("/app/base/CronJob.yaml", ` th.WriteF("base/CronJob.yaml", `
apiVersion: batch/v1beta1 apiVersion: batch/v1beta1
kind: CronJob kind: CronJob
metadata: metadata:
@@ -1711,7 +1711,7 @@ spec:
- date; echo Hello from the Kubernetes cluster - date; echo Hello from the Kubernetes cluster
restartPolicy: OnFailure restartPolicy: OnFailure
volumeMounts: volumeMounts:
- mountPath: /app/shared-files - mountPath: shared-files
name: nfs-files-vol name: nfs-files-vol
volumes: volumes:
- name: nfs-files-vol - name: nfs-files-vol
@@ -1720,7 +1720,7 @@ spec:
path: / path: /
readOnly: false readOnly: false
`) `)
th.WriteF("/app/base/DaemonSet.yaml", ` th.WriteF("base/DaemonSet.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: DaemonSet kind: DaemonSet
metadata: metadata:
@@ -1755,7 +1755,7 @@ spec:
- name: varlibdockercontainers - name: varlibdockercontainers
mountPath: /var/lib/docker/containers mountPath: /var/lib/docker/containers
readOnly: true readOnly: true
- mountPath: /app/shared-files - mountPath: shared-files
name: nfs-files-vol name: nfs-files-vol
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
volumes: volumes:
@@ -1771,7 +1771,7 @@ spec:
path: / path: /
readOnly: false readOnly: false
`) `)
th.WriteF("/app/base/ReplicaSet.yaml", ` th.WriteF("base/ReplicaSet.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: ReplicaSet kind: ReplicaSet
metadata: metadata:
@@ -1794,7 +1794,7 @@ spec:
- name: php-redis - name: php-redis
image: gcr.io/google_samples/gb-frontend:v3 image: gcr.io/google_samples/gb-frontend:v3
volumeMounts: volumeMounts:
- mountPath: /app/shared-files - mountPath: shared-files
name: nfs-files-vol name: nfs-files-vol
volumes: volumes:
- name: nfs-files-vol - name: nfs-files-vol
@@ -1804,7 +1804,7 @@ spec:
readOnly: false readOnly: false
`) `)
th.WriteF("/app/base/Job.yaml", ` th.WriteF("base/Job.yaml", `
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@@ -1817,7 +1817,7 @@ spec:
image: perl image: perl
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
volumeMounts: volumeMounts:
- mountPath: /app/shared-files - mountPath: shared-files
name: nfs-files-vol name: nfs-files-vol
restartPolicy: Never restartPolicy: Never
volumes: volumes:
@@ -1828,7 +1828,7 @@ spec:
readOnly: false readOnly: false
backoffLimit: 4 backoffLimit: 4
`) `)
th.WriteF("/app/base/StatefulSet.yaml", ` th.WriteF("base/StatefulSet.yaml", `
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
@@ -1864,7 +1864,7 @@ spec:
path: / path: /
readOnly: false readOnly: false
`) `)
th.WriteF("/app/base/Pod.yaml", ` th.WriteF("base/Pod.yaml", `
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
@@ -1880,7 +1880,7 @@ spec:
containerPort: 80 containerPort: 80
volumeMounts: volumeMounts:
- name: nfs-files-vol - name: nfs-files-vol
mountPath: /app/shared-files mountPath: shared-files
volumes: volumes:
- name: nfs-files-vol - name: nfs-files-vol
nfs: nfs:
@@ -1888,7 +1888,7 @@ spec:
path: / path: /
readOnly: false readOnly: false
`) `)
th.WriteF("/app/base/nfs_pv.yaml", ` th.WriteF("base/nfs_pv.yaml", `
apiVersion: v1 apiVersion: v1
kind: PersistentVolume kind: PersistentVolume
metadata: metadata:
@@ -1903,12 +1903,12 @@ spec:
path: / path: /
readOnly: false readOnly: false
`) `)
th.WriteK("/app/overlay", ` th.WriteK("overlay", `
nameprefix: kustomized- nameprefix: kustomized-
resources: resources:
- ../base - ../base
`) `)
m := th.Run("/app/overlay", th.MakeDefaultOptions()) m := th.Run("overlay", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, ` th.AssertActualEqualsExpected(m, `
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
@@ -1989,7 +1989,7 @@ spec:
- containerPort: 80 - containerPort: 80
name: http name: http
volumeMounts: volumeMounts:
- mountPath: /app/shared-files - mountPath: shared-files
name: nfs-files-vol name: nfs-files-vol
volumes: volumes:
- name: nfs-files-vol - name: nfs-files-vol
@@ -2016,7 +2016,7 @@ spec:
name: hello name: hello
restartPolicy: OnFailure restartPolicy: OnFailure
volumeMounts: volumeMounts:
- mountPath: /app/shared-files - mountPath: shared-files
name: nfs-files-vol name: nfs-files-vol
volumes: volumes:
- name: nfs-files-vol - name: nfs-files-vol
@@ -2057,7 +2057,7 @@ spec:
- mountPath: /var/lib/docker/containers - mountPath: /var/lib/docker/containers
name: varlibdockercontainers name: varlibdockercontainers
readOnly: true readOnly: true
- mountPath: /app/shared-files - mountPath: shared-files
name: nfs-files-vol name: nfs-files-vol
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
tolerations: tolerations:
@@ -2097,7 +2097,7 @@ spec:
- image: gcr.io/google_samples/gb-frontend:v3 - image: gcr.io/google_samples/gb-frontend:v3
name: php-redis name: php-redis
volumeMounts: volumeMounts:
- mountPath: /app/shared-files - mountPath: shared-files
name: nfs-files-vol name: nfs-files-vol
volumes: volumes:
- name: nfs-files-vol - name: nfs-files-vol
@@ -2156,7 +2156,7 @@ spec:
- containerPort: 80 - containerPort: 80
name: http name: http
volumeMounts: volumeMounts:
- mountPath: /app/shared-files - mountPath: shared-files
name: nfs-files-vol name: nfs-files-vol
volumes: volumes:
- name: nfs-files-vol - name: nfs-files-vol
@@ -2182,7 +2182,7 @@ spec:
image: perl image: perl
name: pi name: pi
volumeMounts: volumeMounts:
- mountPath: /app/shared-files - mountPath: shared-files
name: nfs-files-vol name: nfs-files-vol
restartPolicy: Never restartPolicy: Never
volumes: volumes:

View File

@@ -95,13 +95,6 @@ type fileLoader struct {
// Used to clone repositories. // Used to clone repositories.
cloner git.Cloner cloner git.Cloner
// If this is non-nil, the files were
// obtained from the given resource
rscSpec *remoteTargetSpec
// Used to get resources
getter remoteTargetGetter
// Used to clean up, as needed. // Used to clean up, as needed.
cleaner func() error cleaner func() error
} }
@@ -134,21 +127,20 @@ func newLoaderOrDie(
log.Fatalf("unable to make loader at '%s'; %v", path, err) log.Fatalf("unable to make loader at '%s'; %v", path, err)
} }
return newLoaderAtConfirmedDir( return newLoaderAtConfirmedDir(
lr, root, fSys, nil, git.ClonerUsingGitExec, getRemoteTarget) lr, root, fSys, nil, git.ClonerUsingGitExec)
} }
// newLoaderAtConfirmedDir returns a new fileLoader with given root. // newLoaderAtConfirmedDir returns a new fileLoader with given root.
func newLoaderAtConfirmedDir( func newLoaderAtConfirmedDir(
lr LoadRestrictorFunc, lr LoadRestrictorFunc,
root filesys.ConfirmedDir, fSys filesys.FileSystem, root filesys.ConfirmedDir, fSys filesys.FileSystem,
referrer *fileLoader, cloner git.Cloner, getter remoteTargetGetter) *fileLoader { referrer *fileLoader, cloner git.Cloner) *fileLoader {
return &fileLoader{ return &fileLoader{
loadRestrictor: lr, loadRestrictor: lr,
root: root, root: root,
referrer: referrer, referrer: referrer,
fSys: fSys, fSys: fSys,
cloner: cloner, cloner: cloner,
getter: getter,
cleaner: func() error { return nil }, cleaner: func() error { return nil },
} }
} }
@@ -179,45 +171,38 @@ func (fl *fileLoader) New(path string) (ifc.Loader, error) {
return nil, fmt.Errorf("new root cannot be empty") return nil, fmt.Errorf("new root cannot be empty")
} }
ldr, errGet := newLoaderAtGetter(path, fl.fSys, nil, fl.cloner, fl.getter) repoSpec, err := git.NewRepoSpecFromUrl(path)
if errGet == nil { if err == nil {
return ldr, nil
}
repoSpec, errGit := git.NewRepoSpecFromUrl(path)
if errGit == nil {
// Treat this as git repo clone request. // Treat this as git repo clone request.
if errGit := fl.errIfRepoCycle(repoSpec); errGit != nil { if err = fl.errIfRepoCycle(repoSpec); err != nil {
return nil, errGit return nil, err
} }
return newLoaderAtGitClone( return newLoaderAtGitClone(
repoSpec, fl.fSys, fl, fl.cloner, fl.getter) repoSpec, fl.fSys, fl, fl.cloner)
} }
if filepath.IsAbs(path) { if filepath.IsAbs(path) {
return nil, fmt.Errorf("new root '%s' cannot be absolute", path) return nil, fmt.Errorf("new root '%s' cannot be absolute", path)
} }
root, errDir := demandDirectoryRoot(fl.fSys, fl.root.Join(path)) root, err := demandDirectoryRoot(fl.fSys, fl.root.Join(path))
if errDir != nil { if err != nil {
return nil, fmt.Errorf( return nil, err
"error loading %s with git: %v, dir: %v, get: %v",
path, errGit, errDir, errGet)
} }
if errDir := fl.errIfGitContainmentViolation(root); errDir != nil { if err = fl.errIfGitContainmentViolation(root); err != nil {
return nil, errDir return nil, err
} }
if errDir := fl.errIfArgEqualOrHigher(root); errDir != nil { if err = fl.errIfArgEqualOrHigher(root); err != nil {
return nil, errDir return nil, err
} }
return newLoaderAtConfirmedDir( return newLoaderAtConfirmedDir(
fl.loadRestrictor, root, fl.fSys, fl, fl.cloner, fl.getter), nil fl.loadRestrictor, root, fl.fSys, fl, fl.cloner), nil
} }
// newLoaderAtGitClone returns a new Loader pinned to a temporary // newLoaderAtGitClone returns a new Loader pinned to a temporary
// directory holding a cloned git repo. // directory holding a cloned git repo.
func newLoaderAtGitClone( func newLoaderAtGitClone(
repoSpec *git.RepoSpec, fSys filesys.FileSystem, repoSpec *git.RepoSpec, fSys filesys.FileSystem,
referrer *fileLoader, cloner git.Cloner, getter remoteTargetGetter) (ifc.Loader, error) { referrer *fileLoader, cloner git.Cloner) (ifc.Loader, error) {
cleaner := repoSpec.Cleaner(fSys) cleaner := repoSpec.Cleaner(fSys)
err := cloner(repoSpec) err := cloner(repoSpec)
if err != nil { if err != nil {
@@ -247,7 +232,6 @@ func newLoaderAtGitClone(
repoSpec: repoSpec, repoSpec: repoSpec,
fSys: fSys, fSys: fSys,
cloner: cloner, cloner: cloner,
getter: getter,
cleaner: cleaner, cleaner: cleaner,
}, nil }, nil
} }

View File

@@ -388,7 +388,7 @@ whatever
} }
l, err := newLoaderAtGitClone( l, err := newLoaderAtGitClone(
repoSpec, fSys, nil, repoSpec, fSys, nil,
git.DoNothingCloner(filesys.ConfirmedDir(coRoot)), getNothing) git.DoNothingCloner(filesys.ConfirmedDir(coRoot)))
if err != nil { if err != nil {
t.Fatalf("unexpected err: %v\n", err) t.Fatalf("unexpected err: %v\n", err)
} }
@@ -467,7 +467,7 @@ func TestLoaderDisallowsLocalBaseFromRemoteOverlay(t *testing.T) {
} }
l1, err = newLoaderAtGitClone( l1, err = newLoaderAtGitClone(
repoSpec, fSys, nil, repoSpec, fSys, nil,
git.DoNothingCloner(filesys.ConfirmedDir(cloneRoot)), getNothing) git.DoNothingCloner(filesys.ConfirmedDir(cloneRoot)))
if err != nil { if err != nil {
t.Fatalf("unexpected err: %v\n", err) t.Fatalf("unexpected err: %v\n", err)
} }
@@ -506,7 +506,7 @@ func TestLocalLoaderReferencingGitBase(t *testing.T) {
} }
l1 := newLoaderAtConfirmedDir( l1 := newLoaderAtConfirmedDir(
RestrictionRootOnly, root, fSys, nil, RestrictionRootOnly, root, fSys, nil,
git.DoNothingCloner(filesys.ConfirmedDir(cloneRoot)), getNothing) git.DoNothingCloner(filesys.ConfirmedDir(cloneRoot)))
if l1.Root() != topDir { if l1.Root() != topDir {
t.Fatalf("unexpected root %s", l1.Root()) t.Fatalf("unexpected root %s", l1.Root())
} }
@@ -532,7 +532,7 @@ func TestRepoDirectCycleDetection(t *testing.T) {
} }
l1 := newLoaderAtConfirmedDir( l1 := newLoaderAtConfirmedDir(
RestrictionRootOnly, root, fSys, nil, RestrictionRootOnly, root, fSys, nil,
git.DoNothingCloner(filesys.ConfirmedDir(cloneRoot)), getNothing) git.DoNothingCloner(filesys.ConfirmedDir(cloneRoot)))
p1 := "github.com/someOrg/someRepo/foo" p1 := "github.com/someOrg/someRepo/foo"
rs1, err := git.NewRepoSpecFromUrl(p1) rs1, err := git.NewRepoSpecFromUrl(p1)
if err != nil { if err != nil {
@@ -561,7 +561,7 @@ func TestRepoIndirectCycleDetection(t *testing.T) {
} }
l0 := newLoaderAtConfirmedDir( l0 := newLoaderAtConfirmedDir(
RestrictionRootOnly, root, fSys, nil, RestrictionRootOnly, root, fSys, nil,
git.DoNothingCloner(filesys.ConfirmedDir(cloneRoot)), getNothing) git.DoNothingCloner(filesys.ConfirmedDir(cloneRoot)))
p1 := "github.com/someOrg/someRepo1" p1 := "github.com/someOrg/someRepo1"
p2 := "github.com/someOrg/someRepo2" p2 := "github.com/someOrg/someRepo2"

View File

@@ -1,114 +0,0 @@
// Copyright 2020 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package loader
import (
"context"
"log"
"os"
"time"
"github.com/yujunz/go-getter"
"sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/ifc"
"sigs.k8s.io/kustomize/api/internal/git"
"sigs.k8s.io/kustomize/api/internal/utils"
)
type remoteTargetSpec struct {
// Raw is the original resource in kustomization.yaml
Raw string
// Dir is where the resource is saved
Dir filesys.ConfirmedDir
// TempDir is the directory created to hold all resources, including Dir
TempDir filesys.ConfirmedDir
}
// Getter is a function that can gets resource
type remoteTargetGetter func(rs *remoteTargetSpec) error
func newLoaderAtGetter(
raw string,
fSys filesys.FileSystem,
referrer *fileLoader,
cloner git.Cloner,
getter remoteTargetGetter) (ifc.Loader, error) {
rs := &remoteTargetSpec{
Raw: raw,
}
cleaner := func() error {
return fSys.RemoveAll(rs.TempDir.String())
}
if err := getter(rs); err != nil {
cleaner()
return nil, err
}
return &fileLoader{
loadRestrictor: RestrictionRootOnly,
// TODO(yujunz): limit to getter root
root: rs.Dir,
referrer: referrer,
fSys: fSys,
cloner: cloner,
rscSpec: rs,
getter: getter,
cleaner: cleaner,
}, nil
}
func getRemoteTarget(rs *remoteTargetSpec) error {
var err error
rs.TempDir, err = filesys.NewTmpConfirmedDir()
if err != nil {
return err
}
rs.Dir = filesys.ConfirmedDir(rs.TempDir.Join("repo"))
// Get the pwd
pwd, err := os.Getwd()
if err != nil {
log.Fatalf("Error getting wd: %s", err)
}
opts := []getter.ClientOption{}
client := &getter.Client{
Ctx: context.TODO(),
Src: rs.Raw,
Dst: rs.Dir.String(),
Pwd: pwd,
Mode: getter.ClientModeAny,
Detectors: []getter.Detector{
new(getter.GitHubDetector),
new(getter.GitLabDetector),
new(getter.GitDetector),
new(getter.BitBucketDetector),
},
Options: opts,
}
return utils.TimedCall("go-getter client.Get", 21*time.Second, client.Get)
}
func getNothing(rs *remoteTargetSpec) error {
var err error
rs.Dir, err = filesys.NewTmpConfirmedDir()
if err != nil {
return err
}
// Get the pwd
pwd, err := os.Getwd()
if err != nil {
log.Fatalf("Error getting wd: %s", err)
}
_, err = getter.Detect(rs.Raw, pwd, []getter.Detector{})
return err
}

View File

@@ -5,8 +5,6 @@
package loader package loader
import ( import (
"fmt"
"sigs.k8s.io/kustomize/api/filesys" "sigs.k8s.io/kustomize/api/filesys"
"sigs.k8s.io/kustomize/api/ifc" "sigs.k8s.io/kustomize/api/ifc"
"sigs.k8s.io/kustomize/api/internal/git" "sigs.k8s.io/kustomize/api/internal/git"
@@ -21,23 +19,16 @@ import (
func NewLoader( func NewLoader(
lr LoadRestrictorFunc, lr LoadRestrictorFunc,
target string, fSys filesys.FileSystem) (ifc.Loader, error) { target string, fSys filesys.FileSystem) (ifc.Loader, error) {
ldr, errGet := newLoaderAtGetter( repoSpec, err := git.NewRepoSpecFromUrl(target)
target, fSys, nil, git.ClonerUsingGitExec, getRemoteTarget) if err == nil {
if errGet == nil {
return ldr, nil
}
repoSpec, errGit := git.NewRepoSpecFromUrl(target)
if errGit == nil {
// The target qualifies as a remote git target. // The target qualifies as a remote git target.
return newLoaderAtGitClone( return newLoaderAtGitClone(
repoSpec, fSys, nil, git.ClonerUsingGitExec, getRemoteTarget) repoSpec, fSys, nil, git.ClonerUsingGitExec)
} }
root, errDir := demandDirectoryRoot(fSys, target) root, err := demandDirectoryRoot(fSys, target)
if errDir == nil { if err != nil {
return newLoaderAtConfirmedDir( return nil, err
lr, root, fSys, nil, git.ClonerUsingGitExec, getRemoteTarget), nil
} }
return nil, fmt.Errorf( return newLoaderAtConfirmedDir(
"error creating new loader with git: %v, dir: %v, get: %v", lr, root, fSys, nil, git.ClonerUsingGitExec), nil
errGit, errDir, errGet)
} }

View File

@@ -4,13 +4,12 @@
package provider package provider
import ( import (
"log"
"sigs.k8s.io/kustomize/api/ifc" "sigs.k8s.io/kustomize/api/ifc"
"sigs.k8s.io/kustomize/api/internal/conflict" "sigs.k8s.io/kustomize/api/internal/conflict"
k8sconflict "sigs.k8s.io/kustomize/api/internal/k8sdeps/conflict"
"sigs.k8s.io/kustomize/api/internal/validate" "sigs.k8s.io/kustomize/api/internal/validate"
"sigs.k8s.io/kustomize/api/internal/wrappy" "sigs.k8s.io/kustomize/api/internal/wrappy"
"sigs.k8s.io/kustomize/api/k8sdeps/kunstruct"
"sigs.k8s.io/kustomize/api/k8sdeps/validator"
"sigs.k8s.io/kustomize/api/konfig" "sigs.k8s.io/kustomize/api/konfig"
"sigs.k8s.io/kustomize/api/resource" "sigs.k8s.io/kustomize/api/resource"
) )
@@ -131,18 +130,18 @@ import (
// validator as it's not critical to kustomize function. // validator as it's not critical to kustomize function.
// //
// Proposed plan: // Proposed plan:
// [ ] Ship kustomize with the ability to switch from 1 to 2 via // [x] Ship kustomize with the ability to switch from 1 to 2 via
// an --enable_kyaml flag. // an --enable_kyaml flag.
// [ ] Make --enable_kyaml true by default. // [x] Make --enable_kyaml true by default.
// [ ] When 2 is not noticeably more buggy than 1, delete 1. // [x] When 2 is not noticeably more buggy than 1, delete 1.
// I.e. delete k8sdeps/, transitively deleting all k8s.io/api* deps. // I.e. delete k8sdeps/, transitively deleting all k8s.io/api* deps.
// This DepProvider should be left in place to retain these // This DepProvider should be left in place to retain these
// comments, but it will have only one choice. // comments, but it will have only one choice.
// [ ] The way is now clear to reintegrate into kubectl. // [x] The way is now clear to reintegrate into kubectl.
// This should be done ASAP; the last step is cleanup. // This should be done ASAP; the last step is cleanup.
// [ ] With only one impl of Kunstructure remaining, that interface // [ ] Cleanup. With only one impl of Kunstructure remaining,
// and WNode can be deleted, along with this DepProvider. // that interface and WNode can be deleted, along with this
// The other two interfaces could be dropped too. // DepProvider. The other two interfaces could be dropped too.
// //
// When the above is done, kustomize will use yaml.RNode and/or // When the above is done, kustomize will use yaml.RNode and/or
// KRM Config Functions directly and exclusively. // KRM Config Functions directly and exclusively.
@@ -155,15 +154,12 @@ type DepProvider struct {
fieldValidator ifc.Validator fieldValidator ifc.Validator
} }
// The dependencies this method needs have been deleted -
// see comments above. This method will be deleted
// along with DepProvider in the final step.
func makeK8sdepBasedInstances() *DepProvider { func makeK8sdepBasedInstances() *DepProvider {
kf := kunstruct.NewKunstructuredFactoryImpl() log.Fatal("This binary cannot use k8s.io code; it must use kyaml.")
rf := resource.NewFactory(kf) return nil
return &DepProvider{
kFactory: kf,
resourceFactory: rf,
conflictDectectorFactory: k8sconflict.NewFactory(rf),
fieldValidator: validator.NewKustValidator(),
}
} }
func makeKyamlBasedInstances() *DepProvider { func makeKyamlBasedInstances() *DepProvider {

View File

@@ -489,6 +489,7 @@ func (m *resWrangler) appendReplaceOrMerge(res *resource.Resource) error {
case types.BehaviorMerge: case types.BehaviorMerge:
res.CopyMergeMetaDataFieldsFrom(old) res.CopyMergeMetaDataFieldsFrom(old)
res.MergeDataMapFrom(old) res.MergeDataMapFrom(old)
res.MergeBinaryDataMapFrom(old)
default: default:
return fmt.Errorf( return fmt.Errorf(
"id %#v exists; behavior must be merge or replace", id) "id %#v exists; behavior must be merge or replace", id)

View File

@@ -70,6 +70,10 @@ func (r *Resource) GetDataMap() map[string]string {
return r.kunStr.GetDataMap() return r.kunStr.GetDataMap()
} }
func (r *Resource) GetBinaryDataMap() map[string]string {
return r.kunStr.GetBinaryDataMap()
}
func (r *Resource) GetGvk() resid.Gvk { func (r *Resource) GetGvk() resid.Gvk {
return r.kunStr.GetGvk() return r.kunStr.GetGvk()
} }
@@ -127,6 +131,10 @@ func (r *Resource) SetDataMap(m map[string]string) {
r.kunStr.SetDataMap(m) r.kunStr.SetDataMap(m)
} }
func (r *Resource) SetBinaryDataMap(m map[string]string) {
r.kunStr.SetBinaryDataMap(m)
}
func (r *Resource) SetGvk(gvk resid.Gvk) { func (r *Resource) SetGvk(gvk resid.Gvk) {
r.kunStr.SetGvk(gvk) r.kunStr.SetGvk(gvk)
} }
@@ -196,6 +204,10 @@ func (r *Resource) MergeDataMapFrom(o *Resource) {
r.SetDataMap(mergeStringMaps(o.GetDataMap(), r.GetDataMap())) r.SetDataMap(mergeStringMaps(o.GetDataMap(), r.GetDataMap()))
} }
func (r *Resource) MergeBinaryDataMapFrom(o *Resource) {
r.SetBinaryDataMap(mergeStringMaps(o.GetBinaryDataMap(), r.GetBinaryDataMap()))
}
func (r *Resource) ErrIfNotEquals(o *Resource) error { func (r *Resource) ErrIfNotEquals(o *Resource) error {
meYaml, err := r.AsYAML() meYaml, err := r.AsYAML()
if err != nil { if err != nil {

View File

@@ -93,7 +93,7 @@ func (th Harness) MakeOptionsPluginsEnabled() krusty.Options {
// Run, failing on error. // Run, failing on error.
func (th Harness) Run(path string, o krusty.Options) resmap.ResMap { func (th Harness) Run(path string, o krusty.Options) resmap.ResMap {
m, err := krusty.MakeKustomizer(th.fSys, &o).Run(path) m, err := krusty.MakeKustomizer(&o).Run(th.fSys, path)
if err != nil { if err != nil {
th.t.Fatal(err) th.t.Fatal(err)
} }
@@ -102,7 +102,7 @@ func (th Harness) Run(path string, o krusty.Options) resmap.ResMap {
// Run, failing if there is no error. // Run, failing if there is no error.
func (th Harness) RunWithErr(path string, o krusty.Options) error { func (th Harness) RunWithErr(path string, o krusty.Options) error {
_, err := krusty.MakeKustomizer(th.fSys, &o).Run(path) _, err := krusty.MakeKustomizer(&o).Run(th.fSys, path)
if err == nil { if err == nil {
th.t.Fatalf("expected error") th.t.Fatalf("expected error")
} }

View File

@@ -1,14 +1,48 @@
# Copyright 2019 The Kubernetes Authors. # Copyright 2019 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
.PHONY: generate license fix vet fmt test build tidy .PHONY: generate license fix vet fmt test build tidy clean
GOBIN := $(shell go env GOPATH)/bin GOBIN := $(shell go env GOPATH)/bin
$(GOBIN)/addlicense:
go get github.com/google/addlicense
$(GOBIN)/golangci-lint:
go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.19.1
$(GOBIN)/k8scopy:
( cd ../k8scopy; go install . )
$(GOBIN)/mdtogo:
go get sigs.k8s.io/kustomize/cmd/mdtogo
build: build:
go build -v -o $(GOBIN)/kubectl-krm ./kubectl-krm go build -v -o $(GOBIN)/kubectl-krm ./kubectl-krm
all: generate build license fix vet fmt test lint tidy all: build license fix vet fmt test lint tidy
k8sGenDir := internal/commands/internal/k8sgen/pkg
generate: $(GOBIN)/mdtogo $(GOBIN)/k8scopy
GOBIN=$(GOBIN) go generate ./...
clean:
rm -rf $(k8sGenDir)
lint: $(GOBIN)/golangci-lint
$(GOBIN)/golangci-lint \
--skip-dirs $(k8sGenDir) \
run ./...
license: $(GOBIN)/addlicense
$(GOBIN)/addlicense \
-y 2021 \
-c "The Kubernetes Authors." \
-f LICENSE_TEMPLATE .
test:
go test -v -timeout 45m -cover ./...
fix: fix:
go fix ./... go fix ./...
@@ -16,24 +50,8 @@ fix:
fmt: fmt:
go fmt ./... go fmt ./...
generate:
(which $(GOBIN)/mdtogo || go get sigs.k8s.io/kustomize/cmd/mdtogo)
GOBIN=$(GOBIN) go generate ./...
license:
(which $(GOBIN)/addlicense || go get github.com/google/addlicense)
$(GOBIN)/addlicense -y 2019 -c "The Kubernetes Authors." -f LICENSE_TEMPLATE .
tidy: tidy:
go mod tidy go mod tidy
lint:
(which $(GOBIN)/golangci-lint || go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.19.1)
$(GOBIN)/golangci-lint run ./...
test:
go test -v -timeout 45m -cover ./...
vet: vet:
go vet ./... go vet ./...

View File

@@ -6,14 +6,16 @@ require (
github.com/go-errors/errors v1.0.1 github.com/go-errors/errors v1.0.1
github.com/go-openapi/spec v0.19.5 github.com/go-openapi/spec v0.19.5
github.com/google/go-cmp v0.5.2 // indirect github.com/google/go-cmp v0.5.2 // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/kr/text v0.2.0 // indirect github.com/kr/text v0.2.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/olekukonko/tablewriter v0.0.4 github.com/olekukonko/tablewriter v0.0.4
github.com/spf13/cobra v1.0.0 github.com/spf13/cobra v1.0.0
github.com/stretchr/testify v1.6.1 github.com/stretchr/testify v1.6.1
golang.org/x/net v0.0.0-20200625001655-4c5254603344 // indirect golang.org/x/net v0.0.0-20201110031124-69a78807bb2b // indirect
golang.org/x/text v0.3.4 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
k8s.io/apimachinery v0.18.10 gopkg.in/inf.v0 v0.9.1
sigs.k8s.io/kustomize/kyaml v0.10.7 sigs.k8s.io/kustomize/kyaml v0.10.11
) )

View File

@@ -1,21 +1,15 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/360EntSecGroup-Skylar/excelize v1.4.1/go.mod h1:vnax29X2usfl7HHkBrX5EvSCJcmH3dT9luvxzu8iGAE=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/PuerkitoBio/goquery v1.5.0/go.mod h1:qD2PgZ9lccMbQlc7eEOjaeRlFQON7xY8kdmcsrnKqMg=
github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/andybalholm/cascadia v1.0.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA=
@@ -41,16 +35,7 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg=
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
github.com/dustmop/soup v1.1.2-0.20190516214245-38228baa104e/go.mod h1:CgNC6SGbT+Xb8wGGvzilttZL1mc5sQ/5KkcxsZttMIk=
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
@@ -59,8 +44,6 @@ github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg=
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI=
github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
@@ -71,13 +54,11 @@ github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQH
github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY=
github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94=
github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0=
github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w=
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg=
github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
@@ -93,7 +74,6 @@ github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6
github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64=
github.com/go-openapi/runtime v0.19.4 h1:csnOgcgAiuGoM/Po7PEpKDoNulCcF3FGbSnbHfxgjMI= github.com/go-openapi/runtime v0.19.4 h1:csnOgcgAiuGoM/Po7PEpKDoNulCcF3FGbSnbHfxgjMI=
github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4=
github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc=
github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY=
@@ -106,7 +86,6 @@ github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+Z
github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU=
github.com/go-openapi/strfmt v0.19.5 h1:0utjKrw+BAh8s57XE9Xz8DUBsVvPmRUB6styvl9wWIM= github.com/go-openapi/strfmt v0.19.5 h1:0utjKrw+BAh8s57XE9Xz8DUBsVvPmRUB6styvl9wWIM=
github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk=
github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I=
github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
@@ -121,67 +100,40 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me
github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM= github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk=
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok=
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
@@ -195,34 +147,18 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0=
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4=
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8= github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8=
github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA=
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/paulmach/orb v0.1.3/go.mod h1:VFlX/8C+IQ1p6FTRRKzKoOPJnvEtA5G0Veuqwbu//Vk=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
@@ -234,8 +170,6 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/qri-io/starlib v0.4.2-0.20200213133954-ff2e8cd5ef8d h1:K6eOUihrFLdZjZnA4XlRp864fmWXv9YTIk7VPLhRacA=
github.com/qri-io/starlib v0.4.2-0.20200213133954-ff2e8cd5ef8d/go.mod h1:7DPO4domFU579Ga6E61sB9VFNaniPVwJP5C4bBCu3wA=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
@@ -250,7 +184,6 @@ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU
github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8=
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
@@ -260,9 +193,7 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.3-0.20181224173747-660f15d67dbb/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
@@ -280,14 +211,10 @@ go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qL
go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.mongodb.org/mongo-driver v1.1.2 h1:jxcFYjlkl8xaERsgLo+RNquI0epW6zuy/ZRQs6jnrFA= go.mongodb.org/mongo-driver v1.1.2 h1:jxcFYjlkl8xaERsgLo+RNquI0epW6zuy/ZRQs6jnrFA=
go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
go.starlark.net v0.0.0-20190528202925-30ae18b8564f/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg=
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc=
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o=
go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -297,10 +224,7 @@ golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -310,39 +234,32 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI=
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c h1:Vco5b+cuG5NNfORVxZy6bYZQ7rsigisU1WQFkvQ0L5E=
golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
@@ -358,40 +275,21 @@ google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/apimachinery v0.18.10 h1:Zupk3lPrUfhCF9puTpA8EvEfPsrhNZtrpOqdp66mKVs= sigs.k8s.io/kustomize/kyaml v0.10.11 h1:7KzaMS6TtwhGQW6hkw8umC2zFtSGAQPdAMagfautnkw=
k8s.io/apimachinery v0.18.10/go.mod h1:PF5taHbXgTEJLU+xMypMmYTXTWPJ5LaW8bfsisxnEXk= sigs.k8s.io/kustomize/kyaml v0.10.11/go.mod h1:uD7q6dIrZV02fBV6D7FOgdOBcLfUmhG3ExxDIGbUM3w=
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E=
sigs.k8s.io/kustomize/kyaml v0.10.7 h1:r0r8UEL0bL7X56HKUmhJZ+TP+nvRNGrDHHSLO7izlcQ=
sigs.k8s.io/kustomize/kyaml v0.10.7/go.mod h1:K9yg1k/HB/6xNOf5VH3LhTo1DK9/5ykSZO5uIv+Y/1k=
sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=

View File

@@ -36,7 +36,7 @@ func NewListSettersRunner(parent string) *ListSettersRunner {
"output as github markdown") "output as github markdown")
c.Flags().BoolVar(&r.IncludeSubst, "include-subst", false, c.Flags().BoolVar(&r.IncludeSubst, "include-subst", false,
"include substitutions in the output") "include substitutions in the output")
c.Flags().BoolVarP(&r.RecurseSubPackages, "recurse-subpackages", "R", true, c.Flags().BoolVarP(&r.RecurseSubPackages, "recurse-subpackages", "R", false,
"list setters recursively in all the nested subpackages") "list setters recursively in all the nested subpackages")
runner.FixDocs(parent, c) runner.FixDocs(parent, c)
r.Command = c r.Command = c

View File

@@ -472,7 +472,7 @@ func TestListSettersSubPackages(t *testing.T) {
{ {
name: "list-replicas", name: "list-replicas",
dataset: "dataset-with-setters", dataset: "dataset-with-setters",
args: []string{"--include-subst"}, args: []string{"--include-subst", "-R"},
expected: ` expected: `
test/testdata/dataset-with-setters/mysql/ test/testdata/dataset-with-setters/mysql/
@@ -495,7 +495,6 @@ test/testdata/dataset-with-setters/mysql/storage/
{ {
name: "list-replicas", name: "list-replicas",
dataset: "dataset-with-setters/mysql", dataset: "dataset-with-setters/mysql",
args: []string{"--recurse-subpackages=false"},
expected: ` expected: `
test/testdata/dataset-with-setters/mysql/ test/testdata/dataset-with-setters/mysql/

View File

@@ -10,8 +10,8 @@ import (
"strings" "strings"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/api/resource"
"sigs.k8s.io/kustomize/cmd/config/ext" "sigs.k8s.io/kustomize/cmd/config/ext"
"sigs.k8s.io/kustomize/cmd/config/internal/commands/internal/k8sgen/pkg/api/resource"
"sigs.k8s.io/kustomize/cmd/config/internal/generateddocs/commands" "sigs.k8s.io/kustomize/cmd/config/internal/generateddocs/commands"
"sigs.k8s.io/kustomize/cmd/config/runner" "sigs.k8s.io/kustomize/cmd/config/runner"
"sigs.k8s.io/kustomize/kyaml/kio" "sigs.k8s.io/kustomize/kyaml/kio"

View File

@@ -0,0 +1,7 @@
// Copyright 2020 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
// All code below this directory is generated.
// See {repo}/cmd/k8scopy/main.go for more info.
//go:generate k8scopy k8scopy.yaml internal/commands
package k8sgen

View File

@@ -0,0 +1,15 @@
# Copyright 2020 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0
#
# The files to vendor (copy).
# See {repo}/cmd/k8scopy/main.go for more info.
module: k8s.io/apimachinery
version: v0.18.10
packages:
- name: pkg/api/resource
files:
- amount.go
- math.go
- quantity.go
- scale_int.go
- suffix.go

Some files were not shown because too many files have changed in this diff Show More