diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 58faf3f3f9e1..e428cd798a90 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1679,7 +1679,7 @@ }, { "ImportPath": "github.com/go-sql-driver/mysql", - "Comment": "v1.3.0", + "Comment": "v1.3", "Rev": "a0583e0143b1624142adab07e0e97fe106d99561" }, { @@ -2348,7 +2348,6 @@ }, { "ImportPath": "github.com/inconshreveable/mousetrap", - "Comment": "v1.0", "Rev": "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" }, { @@ -2430,10 +2429,12 @@ }, { "ImportPath": "github.com/lib/pq", + "Comment": "go1.0-cutoff-203-g88edab0803230a", "Rev": "88edab0803230a3898347e77b474f8c1820a1f20" }, { "ImportPath": "github.com/lib/pq/oid", + "Comment": "go1.0-cutoff-203-g88edab0803230a", "Rev": "88edab0803230a3898347e77b474f8c1820a1f20" }, { @@ -2507,7 +2508,7 @@ }, { "ImportPath": "github.com/matttproud/golang_protobuf_extensions/pbutil", - "Comment": "v1.0.1", + "Comment": "v1.0.0-2-gc12348ce28de40", "Rev": "c12348ce28de40eed0136aa2b644d0ee0650e56c" }, { @@ -3369,7 +3370,6 @@ }, { "ImportPath": "github.com/xiang90/probing", - "Comment": "0.0.1", "Rev": "07dd2e8dfe18522e9c447ba95f2fe95262f63bb2" }, { @@ -4159,55 +4159,63 @@ }, { "ImportPath": "k8s.io/utils/buffer", - "Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" + "Rev": "52ad7309af9f9a1a880bb380e9beaea54b4d05b4" }, { "ImportPath": "k8s.io/utils/clock", - "Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" + "Rev": "52ad7309af9f9a1a880bb380e9beaea54b4d05b4" }, { "ImportPath": "k8s.io/utils/exec", - "Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" + "Rev": "52ad7309af9f9a1a880bb380e9beaea54b4d05b4" }, { "ImportPath": "k8s.io/utils/exec/testing", - "Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" + "Rev": "52ad7309af9f9a1a880bb380e9beaea54b4d05b4" }, { "ImportPath": "k8s.io/utils/integer", - "Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" + "Rev": "52ad7309af9f9a1a880bb380e9beaea54b4d05b4" }, { "ImportPath": "k8s.io/utils/io", - "Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" + "Rev": "52ad7309af9f9a1a880bb380e9beaea54b4d05b4" }, { "ImportPath": "k8s.io/utils/keymutex", - "Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" + "Rev": "52ad7309af9f9a1a880bb380e9beaea54b4d05b4" }, { "ImportPath": "k8s.io/utils/net", - "Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" + "Rev": "52ad7309af9f9a1a880bb380e9beaea54b4d05b4" }, { "ImportPath": "k8s.io/utils/nsenter", - "Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" + "Rev": "52ad7309af9f9a1a880bb380e9beaea54b4d05b4" }, { "ImportPath": "k8s.io/utils/path", - "Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" + "Rev": "52ad7309af9f9a1a880bb380e9beaea54b4d05b4" }, { "ImportPath": "k8s.io/utils/pointer", - "Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" + "Rev": "52ad7309af9f9a1a880bb380e9beaea54b4d05b4" + }, + { + "ImportPath": "k8s.io/utils/semantic", + "Rev": "52ad7309af9f9a1a880bb380e9beaea54b4d05b4" }, { "ImportPath": "k8s.io/utils/strings", - "Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" + "Rev": "52ad7309af9f9a1a880bb380e9beaea54b4d05b4" + }, + { + "ImportPath": "k8s.io/utils/third_party/forked/golang/reflect", + "Rev": "52ad7309af9f9a1a880bb380e9beaea54b4d05b4" }, { "ImportPath": "k8s.io/utils/trace", - "Rev": "ed37f7428a91fc2a81070808937195dcd46d320e" + "Rev": "52ad7309af9f9a1a880bb380e9beaea54b4d05b4" }, { "ImportPath": "sigs.k8s.io/structured-merge-diff/fieldpath", diff --git a/Godeps/LICENSES b/Godeps/LICENSES index a44c1afe3f62..eddf1285d572 100644 --- a/Godeps/LICENSES +++ b/Godeps/LICENSES @@ -118661,6 +118661,216 @@ third-party archives. ================================================================================ +================================================================================ += vendor/k8s.io/utils/semantic licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. + += vendor/k8s.io/utils/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + ================================================================================ = vendor/k8s.io/utils/strings licensed under: = @@ -118871,6 +119081,216 @@ third-party archives. ================================================================================ +================================================================================ += vendor/k8s.io/utils/third_party/forked/golang/reflect licensed under: = + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. + += vendor/k8s.io/utils/LICENSE 3b83ef96387f14655fc854ddc3c6bd57 +================================================================================ + + ================================================================================ = vendor/k8s.io/utils/trace licensed under: = diff --git a/build/root/BUILD.root b/build/root/BUILD.root index d4bb831a07d0..e41257a1304e 100644 --- a/build/root/BUILD.root +++ b/build/root/BUILD.root @@ -1,3 +1,5 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + # gazelle:build_file_name BUILD,BUILD.bazel # gazelle:exclude _artifacts @@ -85,3 +87,15 @@ genrule( cmd = "grep ^STABLE_BUILD_SCM_REVISION bazel-out/stable-status.txt | awk '{print $$2}' >$@", stamp = 1, ) + +go_library( + name = "go_default_library", + srcs = ["main.go"], + importpath = "k8s.io/kubernetes", + deps = ["//vendor/github.com/json-iterator/go:go_default_library"], +) + +go_binary( + name = "kubernetes", + embed = [":go_default_library"], +) diff --git a/pkg/apis/core/helper/BUILD b/pkg/apis/core/helper/BUILD index d4fa9fea8631..6ae41bdc5f27 100644 --- a/pkg/apis/core/helper/BUILD +++ b/pkg/apis/core/helper/BUILD @@ -25,12 +25,12 @@ go_library( "//pkg/apis/core:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/selection:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/validation:go_default_library", + "//vendor/k8s.io/utils/semantic:go_default_library", ], ) diff --git a/pkg/apis/core/helper/helpers.go b/pkg/apis/core/helper/helpers.go index f16611d6cba4..d7c6e93587ec 100644 --- a/pkg/apis/core/helper/helpers.go +++ b/pkg/apis/core/helper/helpers.go @@ -23,13 +23,13 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/selection" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation" "k8s.io/kubernetes/pkg/apis/core" + "k8s.io/utils/semantic" ) // IsHugePageResourceName returns true if the resource name has the huge page @@ -76,7 +76,7 @@ func NonConvertibleFields(annotations map[string]string) map[string]string { // Semantic can do semantic deep equality checks for core objects. // Example: apiequality.Semantic.DeepEqual(aPod, aPodWithNonNilButEmptyMaps) == true -var Semantic = conversion.EqualitiesOrDie( +var Semantic = semantic.EqualitiesOrDie( func(a, b resource.Quantity) bool { // Ignore formatting, only care that numeric value stayed the same. // TODO: if we decide it's important, it should be safe to start comparing the format. diff --git a/staging/src/BUILD b/staging/src/BUILD index 730d52d8dde9..e4ae079b2c6c 100644 --- a/staging/src/BUILD +++ b/staging/src/BUILD @@ -65,7 +65,6 @@ filegroup( "//staging/src/k8s.io/apimachinery/pkg/watch:all-srcs", "//staging/src/k8s.io/apimachinery/third_party/forked/golang/json:all-srcs", "//staging/src/k8s.io/apimachinery/third_party/forked/golang/netutil:all-srcs", - "//staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect:all-srcs", "//staging/src/k8s.io/apiserver/pkg/admission:all-srcs", "//staging/src/k8s.io/apiserver/pkg/apis/apiserver:all-srcs", "//staging/src/k8s.io/apiserver/pkg/apis/audit:all-srcs", diff --git a/staging/src/k8s.io/apimachinery/pkg/api/equality/BUILD b/staging/src/k8s.io/apimachinery/pkg/api/equality/BUILD index d526b508acf9..606410c5d33a 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/equality/BUILD +++ b/staging/src/k8s.io/apimachinery/pkg/api/equality/BUILD @@ -13,9 +13,9 @@ go_library( deps = [ "//staging/src/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/fields:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/utils/semantic:go_default_library", ], ) diff --git a/staging/src/k8s.io/apimachinery/pkg/api/equality/semantic.go b/staging/src/k8s.io/apimachinery/pkg/api/equality/semantic.go index f02fa8e4340e..ad0b701a3261 100644 --- a/staging/src/k8s.io/apimachinery/pkg/api/equality/semantic.go +++ b/staging/src/k8s.io/apimachinery/pkg/api/equality/semantic.go @@ -19,14 +19,14 @@ package equality import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" + "k8s.io/utils/semantic" ) // Semantic can do semantic deep equality checks for api objects. // Example: apiequality.Semantic.DeepEqual(aPod, aPodWithNonNilButEmptyMaps) == true -var Semantic = conversion.EqualitiesOrDie( +var Semantic = semantic.EqualitiesOrDie( func(a, b resource.Quantity) bool { // Ignore formatting, only care that numeric value stayed the same. // TODO: if we decide it's important, it should be safe to start comparing the format. diff --git a/staging/src/k8s.io/apimachinery/pkg/conversion/BUILD b/staging/src/k8s.io/apimachinery/pkg/conversion/BUILD index 6b5f68b39c03..2e09519bdbfa 100644 --- a/staging/src/k8s.io/apimachinery/pkg/conversion/BUILD +++ b/staging/src/k8s.io/apimachinery/pkg/conversion/BUILD @@ -30,7 +30,7 @@ go_library( ], importmap = "k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/conversion", importpath = "k8s.io/apimachinery/pkg/conversion", - deps = ["//staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect:go_default_library"], + deps = ["//vendor/k8s.io/utils/third_party/forked/golang/reflect:go_default_library"], ) filegroup( diff --git a/staging/src/k8s.io/apimachinery/pkg/conversion/deep_equal.go b/staging/src/k8s.io/apimachinery/pkg/conversion/deep_equal.go index f21abe1e53a0..144517ef4ade 100644 --- a/staging/src/k8s.io/apimachinery/pkg/conversion/deep_equal.go +++ b/staging/src/k8s.io/apimachinery/pkg/conversion/deep_equal.go @@ -17,7 +17,7 @@ limitations under the License. package conversion import ( - "k8s.io/apimachinery/third_party/forked/golang/reflect" + "k8s.io/utils/third_party/forked/golang/reflect" ) // The code for this type must be located in third_party, since it forks from diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/BUILD b/staging/src/k8s.io/apimachinery/pkg/runtime/BUILD index 1b3350b7f271..ac519a215d4a 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/BUILD +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/BUILD @@ -31,6 +31,7 @@ go_test( "//staging/src/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library", "//vendor/github.com/stretchr/testify/require:go_default_library", + "//vendor/k8s.io/utils/semantic:go_default_library", ], ) @@ -69,6 +70,7 @@ go_library( "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//vendor/github.com/gogo/protobuf/proto:go_default_library", "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/utils/semantic:go_default_library", ], ) diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/converter.go b/staging/src/k8s.io/apimachinery/pkg/runtime/converter.go index dff56e03401a..e8b78ee8e46e 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/converter.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/converter.go @@ -32,6 +32,7 @@ import ( "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/util/json" utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/utils/semantic" "k8s.io/klog" ) @@ -80,7 +81,7 @@ var ( // DefaultUnstructuredConverter performs unstructured to Go typed object conversions. DefaultUnstructuredConverter = &unstructuredConverter{ mismatchDetection: parseBool(os.Getenv("KUBE_PATCH_CONVERSION_DETECTOR")), - comparison: conversion.EqualitiesOrDie( + comparison: semantic.EqualitiesOrDie( func(a, b time.Time) bool { return a.UTC() == b.UTC() }, diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/converter_test.go b/staging/src/k8s.io/apimachinery/pkg/runtime/converter_test.go index 0e0ccfc9a169..6607a4d62e73 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/converter_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/converter_test.go @@ -29,16 +29,16 @@ import ( "time" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apimachinery/pkg/util/json" + "k8s.io/utils/semantic" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) -var simpleEquality = conversion.EqualitiesOrDie( +var simpleEquality = semantic.EqualitiesOrDie( func(a, b time.Time) bool { return a.UTC() == b.UTC() }, diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/BUILD b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/BUILD index e323052f4d46..d21edd3110ac 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/BUILD +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/BUILD @@ -16,13 +16,13 @@ go_test( deps = [ "//staging/src/k8s.io/apimachinery/pkg/api/equality:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/testing:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//vendor/github.com/google/gofuzz:go_default_library", "//vendor/github.com/spf13/pflag:go_default_library", + "//vendor/k8s.io/utils/semantic:go_default_library", "//vendor/sigs.k8s.io/yaml:go_default_library", ], ) diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go index 90a2962bf6fc..d5d30a3e3130 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/codec_test.go @@ -26,11 +26,11 @@ import ( "testing" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" serializertesting "k8s.io/apimachinery/pkg/runtime/serializer/testing" "k8s.io/apimachinery/pkg/util/diff" + utilssemantic "k8s.io/utils/semantic" "github.com/google/gofuzz" flag "github.com/spf13/pflag" @@ -92,7 +92,7 @@ func GetTestScheme() (*runtime.Scheme, runtime.Codec) { return s, codec } -var semantic = conversion.EqualitiesOrDie( +var semantic = utilssemantic.EqualitiesOrDie( func(a, b serializertesting.MyWeirdCustomEmbeddedVersionKindField) bool { a.APIVersion, a.ObjectKind = "", "" b.APIVersion, b.ObjectKind = "", "" diff --git a/staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/BUILD b/staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/BUILD deleted file mode 100644 index 0af6d87dbba3..000000000000 --- a/staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["deep_equal_test.go"], - embed = [":go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = ["deep_equal.go"], - importmap = "k8s.io/kubernetes/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect", - importpath = "k8s.io/apimachinery/third_party/forked/golang/reflect", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go b/staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go deleted file mode 100644 index 7ed1d1cffec7..000000000000 --- a/staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package reflect is a fork of go's standard library reflection package, which -// allows for deep equal with equality functions defined. -package reflect - -import ( - "fmt" - "reflect" - "strings" -) - -// Equalities is a map from type to a function comparing two values of -// that type. -type Equalities map[reflect.Type]reflect.Value - -// For convenience, panics on errrors -func EqualitiesOrDie(funcs ...interface{}) Equalities { - e := Equalities{} - if err := e.AddFuncs(funcs...); err != nil { - panic(err) - } - return e -} - -// AddFuncs is a shortcut for multiple calls to AddFunc. -func (e Equalities) AddFuncs(funcs ...interface{}) error { - for _, f := range funcs { - if err := e.AddFunc(f); err != nil { - return err - } - } - return nil -} - -// AddFunc uses func as an equality function: it must take -// two parameters of the same type, and return a boolean. -func (e Equalities) AddFunc(eqFunc interface{}) error { - fv := reflect.ValueOf(eqFunc) - ft := fv.Type() - if ft.Kind() != reflect.Func { - return fmt.Errorf("expected func, got: %v", ft) - } - if ft.NumIn() != 2 { - return fmt.Errorf("expected two 'in' params, got: %v", ft) - } - if ft.NumOut() != 1 { - return fmt.Errorf("expected one 'out' param, got: %v", ft) - } - if ft.In(0) != ft.In(1) { - return fmt.Errorf("expected arg 1 and 2 to have same type, but got %v", ft) - } - var forReturnType bool - boolType := reflect.TypeOf(forReturnType) - if ft.Out(0) != boolType { - return fmt.Errorf("expected bool return, got: %v", ft) - } - e[ft.In(0)] = fv - return nil -} - -// Below here is forked from go's reflect/deepequal.go - -// During deepValueEqual, must keep track of checks that are -// in progress. The comparison algorithm assumes that all -// checks in progress are true when it reencounters them. -// Visited comparisons are stored in a map indexed by visit. -type visit struct { - a1 uintptr - a2 uintptr - typ reflect.Type -} - -// unexportedTypePanic is thrown when you use this DeepEqual on something that has an -// unexported type. It indicates a programmer error, so should not occur at runtime, -// which is why it's not public and thus impossible to catch. -type unexportedTypePanic []reflect.Type - -func (u unexportedTypePanic) Error() string { return u.String() } -func (u unexportedTypePanic) String() string { - strs := make([]string, len(u)) - for i, t := range u { - strs[i] = fmt.Sprintf("%v", t) - } - return "an unexported field was encountered, nested like this: " + strings.Join(strs, " -> ") -} - -func makeUsefulPanic(v reflect.Value) { - if x := recover(); x != nil { - if u, ok := x.(unexportedTypePanic); ok { - u = append(unexportedTypePanic{v.Type()}, u...) - x = u - } - panic(x) - } -} - -// Tests for deep equality using reflected types. The map argument tracks -// comparisons that have already been seen, which allows short circuiting on -// recursive types. -func (e Equalities) deepValueEqual(v1, v2 reflect.Value, visited map[visit]bool, depth int) bool { - defer makeUsefulPanic(v1) - - if !v1.IsValid() || !v2.IsValid() { - return v1.IsValid() == v2.IsValid() - } - if v1.Type() != v2.Type() { - return false - } - if fv, ok := e[v1.Type()]; ok { - return fv.Call([]reflect.Value{v1, v2})[0].Bool() - } - - hard := func(k reflect.Kind) bool { - switch k { - case reflect.Array, reflect.Map, reflect.Slice, reflect.Struct: - return true - } - return false - } - - if v1.CanAddr() && v2.CanAddr() && hard(v1.Kind()) { - addr1 := v1.UnsafeAddr() - addr2 := v2.UnsafeAddr() - if addr1 > addr2 { - // Canonicalize order to reduce number of entries in visited. - addr1, addr2 = addr2, addr1 - } - - // Short circuit if references are identical ... - if addr1 == addr2 { - return true - } - - // ... or already seen - typ := v1.Type() - v := visit{addr1, addr2, typ} - if visited[v] { - return true - } - - // Remember for later. - visited[v] = true - } - - switch v1.Kind() { - case reflect.Array: - // We don't need to check length here because length is part of - // an array's type, which has already been filtered for. - for i := 0; i < v1.Len(); i++ { - if !e.deepValueEqual(v1.Index(i), v2.Index(i), visited, depth+1) { - return false - } - } - return true - case reflect.Slice: - if (v1.IsNil() || v1.Len() == 0) != (v2.IsNil() || v2.Len() == 0) { - return false - } - if v1.IsNil() || v1.Len() == 0 { - return true - } - if v1.Len() != v2.Len() { - return false - } - if v1.Pointer() == v2.Pointer() { - return true - } - for i := 0; i < v1.Len(); i++ { - if !e.deepValueEqual(v1.Index(i), v2.Index(i), visited, depth+1) { - return false - } - } - return true - case reflect.Interface: - if v1.IsNil() || v2.IsNil() { - return v1.IsNil() == v2.IsNil() - } - return e.deepValueEqual(v1.Elem(), v2.Elem(), visited, depth+1) - case reflect.Ptr: - return e.deepValueEqual(v1.Elem(), v2.Elem(), visited, depth+1) - case reflect.Struct: - for i, n := 0, v1.NumField(); i < n; i++ { - if !e.deepValueEqual(v1.Field(i), v2.Field(i), visited, depth+1) { - return false - } - } - return true - case reflect.Map: - if (v1.IsNil() || v1.Len() == 0) != (v2.IsNil() || v2.Len() == 0) { - return false - } - if v1.IsNil() || v1.Len() == 0 { - return true - } - if v1.Len() != v2.Len() { - return false - } - if v1.Pointer() == v2.Pointer() { - return true - } - for _, k := range v1.MapKeys() { - if !e.deepValueEqual(v1.MapIndex(k), v2.MapIndex(k), visited, depth+1) { - return false - } - } - return true - case reflect.Func: - if v1.IsNil() && v2.IsNil() { - return true - } - // Can't do better than this: - return false - default: - // Normal equality suffices - if !v1.CanInterface() || !v2.CanInterface() { - panic(unexportedTypePanic{}) - } - return v1.Interface() == v2.Interface() - } -} - -// DeepEqual is like reflect.DeepEqual, but focused on semantic equality -// instead of memory equality. -// -// It will use e's equality functions if it finds types that match. -// -// An empty slice *is* equal to a nil slice for our purposes; same for maps. -// -// Unexported field members cannot be compared and will cause an imformative panic; you must add an Equality -// function for these types. -func (e Equalities) DeepEqual(a1, a2 interface{}) bool { - if a1 == nil || a2 == nil { - return a1 == a2 - } - v1 := reflect.ValueOf(a1) - v2 := reflect.ValueOf(a2) - if v1.Type() != v2.Type() { - return false - } - return e.deepValueEqual(v1, v2, make(map[visit]bool), 0) -} - -func (e Equalities) deepValueDerive(v1, v2 reflect.Value, visited map[visit]bool, depth int) bool { - defer makeUsefulPanic(v1) - - if !v1.IsValid() || !v2.IsValid() { - return v1.IsValid() == v2.IsValid() - } - if v1.Type() != v2.Type() { - return false - } - if fv, ok := e[v1.Type()]; ok { - return fv.Call([]reflect.Value{v1, v2})[0].Bool() - } - - hard := func(k reflect.Kind) bool { - switch k { - case reflect.Array, reflect.Map, reflect.Slice, reflect.Struct: - return true - } - return false - } - - if v1.CanAddr() && v2.CanAddr() && hard(v1.Kind()) { - addr1 := v1.UnsafeAddr() - addr2 := v2.UnsafeAddr() - if addr1 > addr2 { - // Canonicalize order to reduce number of entries in visited. - addr1, addr2 = addr2, addr1 - } - - // Short circuit if references are identical ... - if addr1 == addr2 { - return true - } - - // ... or already seen - typ := v1.Type() - v := visit{addr1, addr2, typ} - if visited[v] { - return true - } - - // Remember for later. - visited[v] = true - } - - switch v1.Kind() { - case reflect.Array: - // We don't need to check length here because length is part of - // an array's type, which has already been filtered for. - for i := 0; i < v1.Len(); i++ { - if !e.deepValueDerive(v1.Index(i), v2.Index(i), visited, depth+1) { - return false - } - } - return true - case reflect.Slice: - if v1.IsNil() || v1.Len() == 0 { - return true - } - if v1.Len() > v2.Len() { - return false - } - if v1.Pointer() == v2.Pointer() { - return true - } - for i := 0; i < v1.Len(); i++ { - if !e.deepValueDerive(v1.Index(i), v2.Index(i), visited, depth+1) { - return false - } - } - return true - case reflect.String: - if v1.Len() == 0 { - return true - } - if v1.Len() > v2.Len() { - return false - } - return v1.String() == v2.String() - case reflect.Interface: - if v1.IsNil() { - return true - } - return e.deepValueDerive(v1.Elem(), v2.Elem(), visited, depth+1) - case reflect.Ptr: - if v1.IsNil() { - return true - } - return e.deepValueDerive(v1.Elem(), v2.Elem(), visited, depth+1) - case reflect.Struct: - for i, n := 0, v1.NumField(); i < n; i++ { - if !e.deepValueDerive(v1.Field(i), v2.Field(i), visited, depth+1) { - return false - } - } - return true - case reflect.Map: - if v1.IsNil() || v1.Len() == 0 { - return true - } - if v1.Len() > v2.Len() { - return false - } - if v1.Pointer() == v2.Pointer() { - return true - } - for _, k := range v1.MapKeys() { - if !e.deepValueDerive(v1.MapIndex(k), v2.MapIndex(k), visited, depth+1) { - return false - } - } - return true - case reflect.Func: - if v1.IsNil() && v2.IsNil() { - return true - } - // Can't do better than this: - return false - default: - // Normal equality suffices - if !v1.CanInterface() || !v2.CanInterface() { - panic(unexportedTypePanic{}) - } - return v1.Interface() == v2.Interface() - } -} - -// DeepDerivative is similar to DeepEqual except that unset fields in a1 are -// ignored (not compared). This allows us to focus on the fields that matter to -// the semantic comparison. -// -// The unset fields include a nil pointer and an empty string. -func (e Equalities) DeepDerivative(a1, a2 interface{}) bool { - if a1 == nil { - return true - } - v1 := reflect.ValueOf(a1) - v2 := reflect.ValueOf(a2) - if v1.Type() != v2.Type() { - return false - } - return e.deepValueDerive(v1, v2, make(map[visit]bool), 0) -} diff --git a/staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal_test.go b/staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal_test.go deleted file mode 100644 index 4a062993096c..000000000000 --- a/staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal_test.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package reflect - -import ( - "testing" -) - -func TestEqualities(t *testing.T) { - e := Equalities{} - type Bar struct { - X int - } - type Baz struct { - Y Bar - } - err := e.AddFuncs( - func(a, b int) bool { - return a+1 == b - }, - func(a, b Bar) bool { - return a.X*10 == b.X - }, - ) - if err != nil { - t.Fatalf("Unexpected: %v", err) - } - - type Foo struct { - X int - } - - table := []struct { - a, b interface{} - equal bool - }{ - {1, 2, true}, - {2, 1, false}, - {"foo", "fo", false}, - {"foo", "foo", true}, - {"foo", "foobar", false}, - {Foo{1}, Foo{2}, true}, - {Foo{2}, Foo{1}, false}, - {Bar{1}, Bar{10}, true}, - {&Bar{1}, &Bar{10}, true}, - {Baz{Bar{1}}, Baz{Bar{10}}, true}, - {[...]string{}, [...]string{"1", "2", "3"}, false}, - {[...]string{"1"}, [...]string{"1", "2", "3"}, false}, - {[...]string{"1", "2", "3"}, [...]string{}, false}, - {[...]string{"1", "2", "3"}, [...]string{"1", "2", "3"}, true}, - {map[string]int{"foo": 1}, map[string]int{}, false}, - {map[string]int{"foo": 1}, map[string]int{"foo": 2}, true}, - {map[string]int{"foo": 2}, map[string]int{"foo": 1}, false}, - {map[string]int{"foo": 1}, map[string]int{"foo": 2, "bar": 6}, false}, - {map[string]int{"foo": 1, "bar": 6}, map[string]int{"foo": 2}, false}, - {map[string]int{}, map[string]int(nil), true}, - {[]string(nil), []string(nil), true}, - {[]string{}, []string(nil), true}, - {[]string(nil), []string{}, true}, - {[]string{"1"}, []string(nil), false}, - {[]string{}, []string{"1", "2", "3"}, false}, - {[]string{"1"}, []string{"1", "2", "3"}, false}, - {[]string{"1", "2", "3"}, []string{}, false}, - } - - for _, item := range table { - if e, a := item.equal, e.DeepEqual(item.a, item.b); e != a { - t.Errorf("Expected (%+v == %+v) == %v, but got %v", item.a, item.b, e, a) - } - } -} - -func TestDerivates(t *testing.T) { - e := Equalities{} - type Bar struct { - X int - } - type Baz struct { - Y Bar - } - err := e.AddFuncs( - func(a, b int) bool { - return a+1 == b - }, - func(a, b Bar) bool { - return a.X*10 == b.X - }, - ) - if err != nil { - t.Fatalf("Unexpected: %v", err) - } - - type Foo struct { - X int - } - - table := []struct { - a, b interface{} - equal bool - }{ - {1, 2, true}, - {2, 1, false}, - {"foo", "fo", false}, - {"foo", "foo", true}, - {"foo", "foobar", false}, - {Foo{1}, Foo{2}, true}, - {Foo{2}, Foo{1}, false}, - {Bar{1}, Bar{10}, true}, - {&Bar{1}, &Bar{10}, true}, - {Baz{Bar{1}}, Baz{Bar{10}}, true}, - {[...]string{}, [...]string{"1", "2", "3"}, false}, - {[...]string{"1"}, [...]string{"1", "2", "3"}, false}, - {[...]string{"1", "2", "3"}, [...]string{}, false}, - {[...]string{"1", "2", "3"}, [...]string{"1", "2", "3"}, true}, - {map[string]int{"foo": 1}, map[string]int{}, false}, - {map[string]int{"foo": 1}, map[string]int{"foo": 2}, true}, - {map[string]int{"foo": 2}, map[string]int{"foo": 1}, false}, - {map[string]int{"foo": 1}, map[string]int{"foo": 2, "bar": 6}, true}, - {map[string]int{"foo": 1, "bar": 6}, map[string]int{"foo": 2}, false}, - {map[string]int{}, map[string]int(nil), true}, - {[]string(nil), []string(nil), true}, - {[]string{}, []string(nil), true}, - {[]string(nil), []string{}, true}, - {[]string{"1"}, []string(nil), false}, - {[]string{}, []string{"1", "2", "3"}, true}, - {[]string{"1"}, []string{"1", "2", "3"}, true}, - {[]string{"1", "2", "3"}, []string{}, false}, - } - - for _, item := range table { - if e, a := item.equal, e.DeepDerivative(item.a, item.b); e != a { - t.Errorf("Expected (%+v ~ %+v) == %v, but got %v", item.a, item.b, e, a) - } - } -} diff --git a/third_party/BUILD b/third_party/BUILD index 3650e5acd400..5ac201f18db0 100644 --- a/third_party/BUILD +++ b/third_party/BUILD @@ -24,7 +24,6 @@ filegroup( "//third_party/forked/etcd237/wal:all-srcs", "//third_party/forked/godep:all-srcs", "//third_party/forked/golang/expansion:all-srcs", - "//third_party/forked/golang/reflect:all-srcs", "//third_party/forked/golang/template:all-srcs", "//third_party/forked/gonum/graph:all-srcs", "//third_party/go-srcimporter:all-srcs", diff --git a/third_party/forked/golang/reflect/.readonly b/third_party/forked/golang/reflect/.readonly deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/third_party/forked/golang/reflect/BUILD b/third_party/forked/golang/reflect/BUILD deleted file mode 100644 index e7c5271fd25a..000000000000 --- a/third_party/forked/golang/reflect/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "deep_equal.go", - "type.go", - ], - importpath = "k8s.io/kubernetes/third_party/forked/golang/reflect", -) - -go_test( - name = "go_default_test", - srcs = ["deep_equal_test.go"], - embed = [":go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/third_party/forked/golang/reflect/deep_equal.go b/third_party/forked/golang/reflect/deep_equal.go deleted file mode 100644 index 7ed1d1cffec7..000000000000 --- a/third_party/forked/golang/reflect/deep_equal.go +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package reflect is a fork of go's standard library reflection package, which -// allows for deep equal with equality functions defined. -package reflect - -import ( - "fmt" - "reflect" - "strings" -) - -// Equalities is a map from type to a function comparing two values of -// that type. -type Equalities map[reflect.Type]reflect.Value - -// For convenience, panics on errrors -func EqualitiesOrDie(funcs ...interface{}) Equalities { - e := Equalities{} - if err := e.AddFuncs(funcs...); err != nil { - panic(err) - } - return e -} - -// AddFuncs is a shortcut for multiple calls to AddFunc. -func (e Equalities) AddFuncs(funcs ...interface{}) error { - for _, f := range funcs { - if err := e.AddFunc(f); err != nil { - return err - } - } - return nil -} - -// AddFunc uses func as an equality function: it must take -// two parameters of the same type, and return a boolean. -func (e Equalities) AddFunc(eqFunc interface{}) error { - fv := reflect.ValueOf(eqFunc) - ft := fv.Type() - if ft.Kind() != reflect.Func { - return fmt.Errorf("expected func, got: %v", ft) - } - if ft.NumIn() != 2 { - return fmt.Errorf("expected two 'in' params, got: %v", ft) - } - if ft.NumOut() != 1 { - return fmt.Errorf("expected one 'out' param, got: %v", ft) - } - if ft.In(0) != ft.In(1) { - return fmt.Errorf("expected arg 1 and 2 to have same type, but got %v", ft) - } - var forReturnType bool - boolType := reflect.TypeOf(forReturnType) - if ft.Out(0) != boolType { - return fmt.Errorf("expected bool return, got: %v", ft) - } - e[ft.In(0)] = fv - return nil -} - -// Below here is forked from go's reflect/deepequal.go - -// During deepValueEqual, must keep track of checks that are -// in progress. The comparison algorithm assumes that all -// checks in progress are true when it reencounters them. -// Visited comparisons are stored in a map indexed by visit. -type visit struct { - a1 uintptr - a2 uintptr - typ reflect.Type -} - -// unexportedTypePanic is thrown when you use this DeepEqual on something that has an -// unexported type. It indicates a programmer error, so should not occur at runtime, -// which is why it's not public and thus impossible to catch. -type unexportedTypePanic []reflect.Type - -func (u unexportedTypePanic) Error() string { return u.String() } -func (u unexportedTypePanic) String() string { - strs := make([]string, len(u)) - for i, t := range u { - strs[i] = fmt.Sprintf("%v", t) - } - return "an unexported field was encountered, nested like this: " + strings.Join(strs, " -> ") -} - -func makeUsefulPanic(v reflect.Value) { - if x := recover(); x != nil { - if u, ok := x.(unexportedTypePanic); ok { - u = append(unexportedTypePanic{v.Type()}, u...) - x = u - } - panic(x) - } -} - -// Tests for deep equality using reflected types. The map argument tracks -// comparisons that have already been seen, which allows short circuiting on -// recursive types. -func (e Equalities) deepValueEqual(v1, v2 reflect.Value, visited map[visit]bool, depth int) bool { - defer makeUsefulPanic(v1) - - if !v1.IsValid() || !v2.IsValid() { - return v1.IsValid() == v2.IsValid() - } - if v1.Type() != v2.Type() { - return false - } - if fv, ok := e[v1.Type()]; ok { - return fv.Call([]reflect.Value{v1, v2})[0].Bool() - } - - hard := func(k reflect.Kind) bool { - switch k { - case reflect.Array, reflect.Map, reflect.Slice, reflect.Struct: - return true - } - return false - } - - if v1.CanAddr() && v2.CanAddr() && hard(v1.Kind()) { - addr1 := v1.UnsafeAddr() - addr2 := v2.UnsafeAddr() - if addr1 > addr2 { - // Canonicalize order to reduce number of entries in visited. - addr1, addr2 = addr2, addr1 - } - - // Short circuit if references are identical ... - if addr1 == addr2 { - return true - } - - // ... or already seen - typ := v1.Type() - v := visit{addr1, addr2, typ} - if visited[v] { - return true - } - - // Remember for later. - visited[v] = true - } - - switch v1.Kind() { - case reflect.Array: - // We don't need to check length here because length is part of - // an array's type, which has already been filtered for. - for i := 0; i < v1.Len(); i++ { - if !e.deepValueEqual(v1.Index(i), v2.Index(i), visited, depth+1) { - return false - } - } - return true - case reflect.Slice: - if (v1.IsNil() || v1.Len() == 0) != (v2.IsNil() || v2.Len() == 0) { - return false - } - if v1.IsNil() || v1.Len() == 0 { - return true - } - if v1.Len() != v2.Len() { - return false - } - if v1.Pointer() == v2.Pointer() { - return true - } - for i := 0; i < v1.Len(); i++ { - if !e.deepValueEqual(v1.Index(i), v2.Index(i), visited, depth+1) { - return false - } - } - return true - case reflect.Interface: - if v1.IsNil() || v2.IsNil() { - return v1.IsNil() == v2.IsNil() - } - return e.deepValueEqual(v1.Elem(), v2.Elem(), visited, depth+1) - case reflect.Ptr: - return e.deepValueEqual(v1.Elem(), v2.Elem(), visited, depth+1) - case reflect.Struct: - for i, n := 0, v1.NumField(); i < n; i++ { - if !e.deepValueEqual(v1.Field(i), v2.Field(i), visited, depth+1) { - return false - } - } - return true - case reflect.Map: - if (v1.IsNil() || v1.Len() == 0) != (v2.IsNil() || v2.Len() == 0) { - return false - } - if v1.IsNil() || v1.Len() == 0 { - return true - } - if v1.Len() != v2.Len() { - return false - } - if v1.Pointer() == v2.Pointer() { - return true - } - for _, k := range v1.MapKeys() { - if !e.deepValueEqual(v1.MapIndex(k), v2.MapIndex(k), visited, depth+1) { - return false - } - } - return true - case reflect.Func: - if v1.IsNil() && v2.IsNil() { - return true - } - // Can't do better than this: - return false - default: - // Normal equality suffices - if !v1.CanInterface() || !v2.CanInterface() { - panic(unexportedTypePanic{}) - } - return v1.Interface() == v2.Interface() - } -} - -// DeepEqual is like reflect.DeepEqual, but focused on semantic equality -// instead of memory equality. -// -// It will use e's equality functions if it finds types that match. -// -// An empty slice *is* equal to a nil slice for our purposes; same for maps. -// -// Unexported field members cannot be compared and will cause an imformative panic; you must add an Equality -// function for these types. -func (e Equalities) DeepEqual(a1, a2 interface{}) bool { - if a1 == nil || a2 == nil { - return a1 == a2 - } - v1 := reflect.ValueOf(a1) - v2 := reflect.ValueOf(a2) - if v1.Type() != v2.Type() { - return false - } - return e.deepValueEqual(v1, v2, make(map[visit]bool), 0) -} - -func (e Equalities) deepValueDerive(v1, v2 reflect.Value, visited map[visit]bool, depth int) bool { - defer makeUsefulPanic(v1) - - if !v1.IsValid() || !v2.IsValid() { - return v1.IsValid() == v2.IsValid() - } - if v1.Type() != v2.Type() { - return false - } - if fv, ok := e[v1.Type()]; ok { - return fv.Call([]reflect.Value{v1, v2})[0].Bool() - } - - hard := func(k reflect.Kind) bool { - switch k { - case reflect.Array, reflect.Map, reflect.Slice, reflect.Struct: - return true - } - return false - } - - if v1.CanAddr() && v2.CanAddr() && hard(v1.Kind()) { - addr1 := v1.UnsafeAddr() - addr2 := v2.UnsafeAddr() - if addr1 > addr2 { - // Canonicalize order to reduce number of entries in visited. - addr1, addr2 = addr2, addr1 - } - - // Short circuit if references are identical ... - if addr1 == addr2 { - return true - } - - // ... or already seen - typ := v1.Type() - v := visit{addr1, addr2, typ} - if visited[v] { - return true - } - - // Remember for later. - visited[v] = true - } - - switch v1.Kind() { - case reflect.Array: - // We don't need to check length here because length is part of - // an array's type, which has already been filtered for. - for i := 0; i < v1.Len(); i++ { - if !e.deepValueDerive(v1.Index(i), v2.Index(i), visited, depth+1) { - return false - } - } - return true - case reflect.Slice: - if v1.IsNil() || v1.Len() == 0 { - return true - } - if v1.Len() > v2.Len() { - return false - } - if v1.Pointer() == v2.Pointer() { - return true - } - for i := 0; i < v1.Len(); i++ { - if !e.deepValueDerive(v1.Index(i), v2.Index(i), visited, depth+1) { - return false - } - } - return true - case reflect.String: - if v1.Len() == 0 { - return true - } - if v1.Len() > v2.Len() { - return false - } - return v1.String() == v2.String() - case reflect.Interface: - if v1.IsNil() { - return true - } - return e.deepValueDerive(v1.Elem(), v2.Elem(), visited, depth+1) - case reflect.Ptr: - if v1.IsNil() { - return true - } - return e.deepValueDerive(v1.Elem(), v2.Elem(), visited, depth+1) - case reflect.Struct: - for i, n := 0, v1.NumField(); i < n; i++ { - if !e.deepValueDerive(v1.Field(i), v2.Field(i), visited, depth+1) { - return false - } - } - return true - case reflect.Map: - if v1.IsNil() || v1.Len() == 0 { - return true - } - if v1.Len() > v2.Len() { - return false - } - if v1.Pointer() == v2.Pointer() { - return true - } - for _, k := range v1.MapKeys() { - if !e.deepValueDerive(v1.MapIndex(k), v2.MapIndex(k), visited, depth+1) { - return false - } - } - return true - case reflect.Func: - if v1.IsNil() && v2.IsNil() { - return true - } - // Can't do better than this: - return false - default: - // Normal equality suffices - if !v1.CanInterface() || !v2.CanInterface() { - panic(unexportedTypePanic{}) - } - return v1.Interface() == v2.Interface() - } -} - -// DeepDerivative is similar to DeepEqual except that unset fields in a1 are -// ignored (not compared). This allows us to focus on the fields that matter to -// the semantic comparison. -// -// The unset fields include a nil pointer and an empty string. -func (e Equalities) DeepDerivative(a1, a2 interface{}) bool { - if a1 == nil { - return true - } - v1 := reflect.ValueOf(a1) - v2 := reflect.ValueOf(a2) - if v1.Type() != v2.Type() { - return false - } - return e.deepValueDerive(v1, v2, make(map[visit]bool), 0) -} diff --git a/third_party/forked/golang/reflect/deep_equal_test.go b/third_party/forked/golang/reflect/deep_equal_test.go deleted file mode 100644 index 4a062993096c..000000000000 --- a/third_party/forked/golang/reflect/deep_equal_test.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package reflect - -import ( - "testing" -) - -func TestEqualities(t *testing.T) { - e := Equalities{} - type Bar struct { - X int - } - type Baz struct { - Y Bar - } - err := e.AddFuncs( - func(a, b int) bool { - return a+1 == b - }, - func(a, b Bar) bool { - return a.X*10 == b.X - }, - ) - if err != nil { - t.Fatalf("Unexpected: %v", err) - } - - type Foo struct { - X int - } - - table := []struct { - a, b interface{} - equal bool - }{ - {1, 2, true}, - {2, 1, false}, - {"foo", "fo", false}, - {"foo", "foo", true}, - {"foo", "foobar", false}, - {Foo{1}, Foo{2}, true}, - {Foo{2}, Foo{1}, false}, - {Bar{1}, Bar{10}, true}, - {&Bar{1}, &Bar{10}, true}, - {Baz{Bar{1}}, Baz{Bar{10}}, true}, - {[...]string{}, [...]string{"1", "2", "3"}, false}, - {[...]string{"1"}, [...]string{"1", "2", "3"}, false}, - {[...]string{"1", "2", "3"}, [...]string{}, false}, - {[...]string{"1", "2", "3"}, [...]string{"1", "2", "3"}, true}, - {map[string]int{"foo": 1}, map[string]int{}, false}, - {map[string]int{"foo": 1}, map[string]int{"foo": 2}, true}, - {map[string]int{"foo": 2}, map[string]int{"foo": 1}, false}, - {map[string]int{"foo": 1}, map[string]int{"foo": 2, "bar": 6}, false}, - {map[string]int{"foo": 1, "bar": 6}, map[string]int{"foo": 2}, false}, - {map[string]int{}, map[string]int(nil), true}, - {[]string(nil), []string(nil), true}, - {[]string{}, []string(nil), true}, - {[]string(nil), []string{}, true}, - {[]string{"1"}, []string(nil), false}, - {[]string{}, []string{"1", "2", "3"}, false}, - {[]string{"1"}, []string{"1", "2", "3"}, false}, - {[]string{"1", "2", "3"}, []string{}, false}, - } - - for _, item := range table { - if e, a := item.equal, e.DeepEqual(item.a, item.b); e != a { - t.Errorf("Expected (%+v == %+v) == %v, but got %v", item.a, item.b, e, a) - } - } -} - -func TestDerivates(t *testing.T) { - e := Equalities{} - type Bar struct { - X int - } - type Baz struct { - Y Bar - } - err := e.AddFuncs( - func(a, b int) bool { - return a+1 == b - }, - func(a, b Bar) bool { - return a.X*10 == b.X - }, - ) - if err != nil { - t.Fatalf("Unexpected: %v", err) - } - - type Foo struct { - X int - } - - table := []struct { - a, b interface{} - equal bool - }{ - {1, 2, true}, - {2, 1, false}, - {"foo", "fo", false}, - {"foo", "foo", true}, - {"foo", "foobar", false}, - {Foo{1}, Foo{2}, true}, - {Foo{2}, Foo{1}, false}, - {Bar{1}, Bar{10}, true}, - {&Bar{1}, &Bar{10}, true}, - {Baz{Bar{1}}, Baz{Bar{10}}, true}, - {[...]string{}, [...]string{"1", "2", "3"}, false}, - {[...]string{"1"}, [...]string{"1", "2", "3"}, false}, - {[...]string{"1", "2", "3"}, [...]string{}, false}, - {[...]string{"1", "2", "3"}, [...]string{"1", "2", "3"}, true}, - {map[string]int{"foo": 1}, map[string]int{}, false}, - {map[string]int{"foo": 1}, map[string]int{"foo": 2}, true}, - {map[string]int{"foo": 2}, map[string]int{"foo": 1}, false}, - {map[string]int{"foo": 1}, map[string]int{"foo": 2, "bar": 6}, true}, - {map[string]int{"foo": 1, "bar": 6}, map[string]int{"foo": 2}, false}, - {map[string]int{}, map[string]int(nil), true}, - {[]string(nil), []string(nil), true}, - {[]string{}, []string(nil), true}, - {[]string(nil), []string{}, true}, - {[]string{"1"}, []string(nil), false}, - {[]string{}, []string{"1", "2", "3"}, true}, - {[]string{"1"}, []string{"1", "2", "3"}, true}, - {[]string{"1", "2", "3"}, []string{}, false}, - } - - for _, item := range table { - if e, a := item.equal, e.DeepDerivative(item.a, item.b); e != a { - t.Errorf("Expected (%+v ~ %+v) == %v, but got %v", item.a, item.b, e, a) - } - } -} diff --git a/third_party/forked/golang/reflect/type.go b/third_party/forked/golang/reflect/type.go deleted file mode 100644 index 67957ee33e9c..000000000000 --- a/third_party/forked/golang/reflect/type.go +++ /dev/null @@ -1,91 +0,0 @@ -//This package is copied from Go library reflect/type.go. -//The struct tag library provides no way to extract the list of struct tags, only -//a specific tag -package reflect - -import ( - "fmt" - - "strconv" - "strings" -) - -type StructTag struct { - Name string - Value string -} - -func (t StructTag) String() string { - return fmt.Sprintf("%s:%q", t.Name, t.Value) -} - -type StructTags []StructTag - -func (tags StructTags) String() string { - s := make([]string, 0, len(tags)) - for _, tag := range tags { - s = append(s, tag.String()) - } - return "`" + strings.Join(s, " ") + "`" -} - -func (tags StructTags) Has(name string) bool { - for i := range tags { - if tags[i].Name == name { - return true - } - } - return false -} - -// ParseStructTags returns the full set of fields in a struct tag in the order they appear in -// the struct tag. -func ParseStructTags(tag string) (StructTags, error) { - tags := StructTags{} - for tag != "" { - // Skip leading space. - i := 0 - for i < len(tag) && tag[i] == ' ' { - i++ - } - tag = tag[i:] - if tag == "" { - break - } - - // Scan to colon. A space, a quote or a control character is a syntax error. - // Strictly speaking, control chars include the range [0x7f, 0x9f], not just - // [0x00, 0x1f], but in practice, we ignore the multi-byte control characters - // as it is simpler to inspect the tag's bytes than the tag's runes. - i = 0 - for i < len(tag) && tag[i] > ' ' && tag[i] != ':' && tag[i] != '"' && tag[i] != 0x7f { - i++ - } - if i == 0 || i+1 >= len(tag) || tag[i] != ':' || tag[i+1] != '"' { - break - } - name := string(tag[:i]) - tag = tag[i+1:] - - // Scan quoted string to find value. - i = 1 - for i < len(tag) && tag[i] != '"' { - if tag[i] == '\\' { - i++ - } - i++ - } - if i >= len(tag) { - break - } - qvalue := string(tag[:i+1]) - tag = tag[i+1:] - - value, err := strconv.Unquote(qvalue) - if err != nil { - return nil, err - } - tags = append(tags, StructTag{Name: name, Value: value}) - } - return tags, nil -} diff --git a/vendor/BUILD b/vendor/BUILD index 1cc078453dc0..fbbf158fb026 100644 --- a/vendor/BUILD +++ b/vendor/BUILD @@ -489,7 +489,9 @@ filegroup( "//vendor/k8s.io/utils/nsenter:all-srcs", "//vendor/k8s.io/utils/path:all-srcs", "//vendor/k8s.io/utils/pointer:all-srcs", + "//vendor/k8s.io/utils/semantic:all-srcs", "//vendor/k8s.io/utils/strings:all-srcs", + "//vendor/k8s.io/utils/third_party/forked/golang/reflect:all-srcs", "//vendor/k8s.io/utils/trace:all-srcs", "//vendor/sigs.k8s.io/structured-merge-diff/fieldpath:all-srcs", "//vendor/sigs.k8s.io/structured-merge-diff/merge:all-srcs", diff --git a/vendor/k8s.io/utils/nsenter/OWNERS b/vendor/k8s.io/utils/nsenter/OWNERS index c4f27cb43817..46895cbda832 100644 --- a/vendor/k8s.io/utils/nsenter/OWNERS +++ b/vendor/k8s.io/utils/nsenter/OWNERS @@ -1,3 +1,5 @@ +# See the OWNERS docs at https://go.k8s.io/owners + reviewers: - jsafrane - msau42 diff --git a/vendor/k8s.io/utils/pointer/OWNERS b/vendor/k8s.io/utils/pointer/OWNERS index 2f328f4c905d..0d6392752af2 100644 --- a/vendor/k8s.io/utils/pointer/OWNERS +++ b/vendor/k8s.io/utils/pointer/OWNERS @@ -1,4 +1,5 @@ # See the OWNERS docs at https://go.k8s.io/owners + approvers: - apelisse - stewart-yu