From f0178e92e27bb4d4e5bcfd0e00324e0c44925b2a Mon Sep 17 00:00:00 2001 From: ravisantoshgudimetla Date: Thu, 11 Jul 2019 14:31:28 -0400 Subject: [PATCH 1/2] bump(*) --- glide.lock | 41 +++-- glide.yaml | 4 + .../gorilla/context/.circleci/config.yml | 63 ++++++++ vendor/github.com/gorilla/context/README.md | 20 ++- .../gorilla/securecookie/.circleci/config.yml | 65 ++++++++ .../gorilla/securecookie/.travis.yml | 19 --- .../gorilla/securecookie/securecookie.go | 2 +- .../github.com/mitchellh/go-wordwrap/go.mod | 1 - vendor/github.com/openshift/api/OWNERS | 2 + .../api/config/v1/types_apiserver.go | 16 +- .../api/config/v1/types_authentication.go | 1 + .../openshift/api/config/v1/types_build.go | 1 + .../api/config/v1/types_cluster_operator.go | 1 + .../api/config/v1/types_cluster_version.go | 1 + .../openshift/api/config/v1/types_console.go | 1 + .../openshift/api/config/v1/types_dns.go | 1 + .../openshift/api/config/v1/types_feature.go | 30 +++- .../openshift/api/config/v1/types_image.go | 1 + .../api/config/v1/types_infrastructure.go | 54 ++++++- .../openshift/api/config/v1/types_ingress.go | 1 + .../openshift/api/config/v1/types_network.go | 1 + .../openshift/api/config/v1/types_oauth.go | 1 + .../openshift/api/config/v1/types_project.go | 1 + .../openshift/api/config/v1/types_proxy.go | 5 + .../api/config/v1/types_scheduling.go | 11 ++ .../api/config/v1/zz_generated.deepcopy.go | 130 ++++++++++++++- .../v1/zz_generated.swagger_doc_generated.go | 75 +++++++-- .../api/console/v1/types_console_link.go | 16 ++ .../api/console/v1/zz_generated.deepcopy.go | 23 ++- .../v1/zz_generated.swagger_doc_generated.go | 15 +- .../openshift/api/operator/v1/doc.go | 1 + .../openshift/api/operator/v1/types.go | 1 + .../api/operator/v1/types_authentication.go | 1 + .../api/operator/v1/types_console.go | 1 + .../openshift/api/operator/v1/types_etcd.go | 1 + .../api/operator/v1/types_kubeapiserver.go | 1 + .../v1/types_kubecontrollermanager.go | 1 + .../api/operator/v1/types_network.go | 5 +- .../operator/v1/types_openshiftapiserver.go | 1 + .../v1/types_openshiftcontrollermanager.go | 1 + .../api/operator/v1/types_scheduler.go | 1 + .../api/operator/v1/types_serviceca.go | 1 + .../v1/types_servicecatalogapiserver.go | 1 + .../types_servicecatalogcontrollermanager.go | 1 + .../api/operator/v1/zz_generated.deepcopy.go | 24 ++- .../api/operator/v1alpha1/register.go | 2 + .../types_image_content_source_policy.go | 55 +++++++ .../v1alpha1/zz_generated.deepcopy.go | 104 ++++++++++++ .../zz_generated.swagger_doc_generated.go | 37 +++++ .../github.com/openshift/client-go/glide.lock | 4 +- .../client-go/hack/update-codegen.sh | 11 +- .../operator/clientset/versioned/clientset.go | 16 +- .../versioned/fake/clientset_generated.go | 7 + .../clientset/versioned/fake/register.go | 2 + .../clientset/versioned/scheme/register.go | 2 + .../versioned/typed/operator/v1alpha1/doc.go | 4 + .../typed/operator/v1alpha1/fake/doc.go | 4 + .../fake/fake_imagecontentsourcepolicy.go | 104 ++++++++++++ .../v1alpha1/fake/fake_operator_client.go | 24 +++ .../operator/v1alpha1/generated_expansion.go | 5 + .../v1alpha1/imagecontentsourcepolicy.go | 148 +++++++++++++++++ .../operator/v1alpha1/operator_client.go | 74 +++++++++ .../informers/externalversions/generic.go | 5 + .../externalversions/operator/interface.go | 8 + .../v1alpha1/imagecontentsourcepolicy.go | 72 +++++++++ .../operator/v1alpha1/interface.go | 29 ++++ .../operator/v1alpha1/expansion_generated.go | 7 + .../v1alpha1/imagecontentsourcepolicy.go | 49 ++++++ .../make/targets/openshift/bindata.mk | 2 +- .../openshift/library-go/glide.lock | 20 +-- .../openshift/library-go/glide.yaml | 5 + .../configobserver/network/observe_network.go | 88 ++++++++-- vendor/golang.org/x/time/CONTRIBUTING.md | 15 +- vendor/golang.org/x/time/README | 1 + vendor/golang.org/x/time/README.md | 17 -- vendor/golang.org/x/time/go.mod | 1 - vendor/golang.org/x/time/rate/rate.go | 11 +- vendor/golang.org/x/time/rate/rate_test.go | 18 +-- .../kubernetes/api/openapi-spec/swagger.json | 2 +- .../apiserver/validation_wrapper.go | 6 +- .../customresourcevalidator.go | 2 +- .../generated/openapi/zz_generated.openapi.go | 2 +- .../pkg/kubelet/kubelet_node_status_test.go | 153 ++++++++++++++++++ vendor/k8s.io/kubernetes/pkg/util/node/BUILD | 1 + .../k8s.io/kubernetes/pkg/util/node/node.go | 72 ++++++++- .../src/k8s.io/api/core/v1/generated.proto | 3 + .../staging/src/k8s.io/api/core/v1/types.go | 3 + .../core/v1/types_swagger_doc_generated.go | 2 +- .../e2e/storage/testsuites/provisioning.go | 22 ++- vendor/sigs.k8s.io/yaml/.travis.yml | 11 +- vendor/sigs.k8s.io/yaml/OWNERS | 2 - vendor/sigs.k8s.io/yaml/README.md | 12 +- vendor/sigs.k8s.io/yaml/go.mod | 5 - vendor/sigs.k8s.io/yaml/go.sum | 3 - vendor/sigs.k8s.io/yaml/yaml.go | 61 ------- vendor/sigs.k8s.io/yaml/yaml_test.go | 122 -------------- 96 files changed, 1712 insertions(+), 368 deletions(-) create mode 100644 vendor/github.com/gorilla/context/.circleci/config.yml create mode 100644 vendor/github.com/gorilla/securecookie/.circleci/config.yml delete mode 100644 vendor/github.com/gorilla/securecookie/.travis.yml delete mode 100644 vendor/github.com/mitchellh/go-wordwrap/go.mod create mode 100644 vendor/github.com/openshift/api/operator/v1alpha1/types_image_content_source_policy.go create mode 100644 vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/doc.go create mode 100644 vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/doc.go create mode 100644 vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go create mode 100644 vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go create mode 100644 vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go create mode 100644 vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/imagecontentsourcepolicy.go create mode 100644 vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go create mode 100644 vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1alpha1/imagecontentsourcepolicy.go create mode 100644 vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1alpha1/interface.go create mode 100644 vendor/github.com/openshift/client-go/operator/listers/operator/v1alpha1/expansion_generated.go create mode 100644 vendor/github.com/openshift/client-go/operator/listers/operator/v1alpha1/imagecontentsourcepolicy.go create mode 100644 vendor/golang.org/x/time/README delete mode 100644 vendor/golang.org/x/time/README.md delete mode 100644 vendor/golang.org/x/time/go.mod delete mode 100644 vendor/sigs.k8s.io/yaml/go.mod delete mode 100644 vendor/sigs.k8s.io/yaml/go.sum diff --git a/glide.lock b/glide.lock index 3976b6a50fa3..c769a80d4a66 100644 --- a/glide.lock +++ b/glide.lock @@ -1,8 +1,9 @@ -hash: 6ac9405b255415ef35dd7b6f27dec6c29bded8f5eadec61513a01951bb03717e -updated: 2019-06-26T10:20:32.992441982-04:00 +hash: be94bb65657fe48fe29847201633aad194628b0df0de694cbf77fb6d9a078bb1 +updated: 2019-07-15T11:53:22.185343325-04:00 imports: - name: bitbucket.org/ww/goautoneg version: 75cd24fc2f2c2a2088577d12123ddee5f54e0675 + vcs: hg - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 subpackages: @@ -668,11 +669,11 @@ imports: - pagination - testhelper - name: github.com/gorilla/context - version: 51ce91d2eaddeca0ef29a71d766bb3634dadf729 + version: 8559d4a6b87e4f517ec1846eb90a192b8748cc89 - name: github.com/gorilla/mux version: 08e7f807d38d6a870193019bb439056118661505 - name: github.com/gorilla/securecookie - version: e65cf8c5df817c89aeb47ecb46064e802e2de943 + version: 86450627d8e6b88e00ea41f228489b89d08a40de - name: github.com/gorilla/sessions version: a3acf13e802c358d65f249324d14ed24aac11370 - name: github.com/gorilla/websocket @@ -825,7 +826,7 @@ imports: - name: github.com/mistifyio/go-zfs version: 1b4ae6fb4e77b095934d4430860ff202060169f8 - name: github.com/mitchellh/go-wordwrap - version: 9e67c67572bc5dd02aef930e2b0ae3c02a4b5a5c + version: ad45545899c7b13c020ea92b2072220eefad42b8 - name: github.com/mitchellh/mapstructure version: 53818660ed4955e899c0bcafa97299a388bd7c8e - name: github.com/moby/buildkit @@ -927,7 +928,7 @@ imports: - go-selinux - go-selinux/label - name: github.com/openshift/api - version: 64d243ed05c5e2e1c779db0810323571d5674ccc + version: f15120709e0ac8de84e11616d8f0cac54e8f52e3 subpackages: - annotations - apps @@ -977,7 +978,7 @@ imports: - webconsole - webconsole/v1 - name: github.com/openshift/client-go - version: 8892c0adc000741c33af70e05f4ede47725d0773 + version: c44a8b61b9f46cd9e802384dfeda0bc9942db68a subpackages: - apps/clientset/versioned - apps/clientset/versioned/fake @@ -1050,6 +1051,7 @@ imports: - operator/clientset/versioned - operator/clientset/versioned/scheme - operator/clientset/versioned/typed/operator/v1 + - operator/clientset/versioned/typed/operator/v1alpha1 - project/clientset/versioned - project/clientset/versioned/fake - project/clientset/versioned/scheme @@ -1106,7 +1108,7 @@ imports: - user/informers/externalversions/user/v1 - user/listers/user/v1 - name: github.com/openshift/library-go - version: 16a370625b52c7958783b8f74de58317236da6b4 + version: f8abdcd57c468b7f49a91caa77212c12bd05fa9f subpackages: - pkg/apiserver/admission/admissionregistrationtesting - pkg/apiserver/admission/admissionrestconfig @@ -1148,6 +1150,7 @@ imports: - pkg/operator/events - pkg/operator/resource/resourceapply - pkg/operator/resource/resourcemerge + - pkg/operator/resource/resourceread - pkg/operator/resource/retry - pkg/quota/clusterquotamapping - pkg/quota/quotautil @@ -1210,7 +1213,7 @@ imports: - pkg/userregistry/identitymapper - pkg/version - name: github.com/openshift/oc - version: eb81f141d29f07073dcc8cbe9be77e3703f3e451 + version: 3b476e3d5a3ca778f0021ce7b4d36b66199ea362 subpackages: - pkg/cli - pkg/cli/admin @@ -1373,7 +1376,7 @@ imports: - pkg/helpers/tokencmd - pkg/version - name: github.com/openshift/openshift-apiserver - version: a48daecd8d8f22de33be3c7ea8127672f84d46e0 + version: 0dc06f303d4c897df389a7ed73dc391ea5ba6feb subpackages: - pkg/api - pkg/api/apihelpers @@ -1555,7 +1558,7 @@ imports: - pkg/user/apiserver/registry/useridentitymapping - pkg/version - name: github.com/openshift/openshift-controller-manager - version: 2e855b437b1d4fcbbd5fee46a64fe31d0f9128af + version: 30c45bc4557c6c0aa812cb1e663f944a71035fd3 subpackages: - pkg/apps/appstest - pkg/apps/deployer @@ -1937,7 +1940,7 @@ imports: - unicode/norm - width - name: golang.org/x/time - version: 9d24e82272b4f38b78bc8cff74fa936d31ccd8ef + version: f51c12702a4d776e4c1fa9b0fabab841babae631 subpackages: - rate - name: golang.org/x/tools @@ -2071,7 +2074,7 @@ imports: - name: gopkg.in/yaml.v2 version: 5420a8b6744d3b0345ab293f6fcba19c978f1183 - name: k8s.io/api - version: ad7a9273e344ff5e5c1da8dabbaa092268ac9d63 + version: 5b6d4ec96213966713b65f5d4aa1ee1b765f2c7c repo: https://github.com/openshift/kubernetes-api.git subpackages: - admission/v1beta1 @@ -2362,7 +2365,7 @@ imports: - pkg/printers - pkg/resource - name: k8s.io/client-go - version: 63fdf1d9468152856e26300fe2b793e8f2ff5f1a + version: 70952d66b5d131aa0142ceaebfe6d6da51178878 repo: https://github.com/openshift/kubernetes-client-go.git subpackages: - discovery @@ -2692,7 +2695,7 @@ imports: subpackages: - config/v1beta1 - name: k8s.io/kubernetes - version: 3a0658d1a4c171ade6984b845232cdb10a23e168 + version: 27fa9266ffd422a0fc068b6d67b0ce59b16ef685 repo: https://github.com/openshift/kubernetes.git subpackages: - cmd/cloud-controller-manager/app/apis/config @@ -2724,6 +2727,7 @@ imports: - openshift-kube-apiserver/admission/autoscaling/clusterresourceoverride - openshift-kube-apiserver/admission/autoscaling/runonceduration - openshift-kube-apiserver/admission/customresourcevalidation + - openshift-kube-apiserver/admission/customresourcevalidation/apiserver - openshift-kube-apiserver/admission/customresourcevalidation/authentication - openshift-kube-apiserver/admission/customresourcevalidation/clusterresourcequota - openshift-kube-apiserver/admission/customresourcevalidation/clusterresourcequota/validation @@ -3533,6 +3537,7 @@ imports: - plugin/pkg/auth/authorizer/rbac - plugin/pkg/auth/authorizer/rbac/bootstrappolicy - staging/src/k8s.io/apimachinery/pkg/api/apitesting + - staging/src/k8s.io/apimachinery/pkg/util/wait - test/e2e - test/e2e/apimachinery - test/e2e/apps @@ -3541,6 +3546,7 @@ imports: - test/e2e/chaosmonkey - test/e2e/common - test/e2e/framework + - test/e2e/framework/config - test/e2e/framework/ginkgowrapper - test/e2e/framework/ingress - test/e2e/framework/metrics @@ -3553,6 +3559,7 @@ imports: - test/e2e/framework/providers/vsphere - test/e2e/framework/testfiles - test/e2e/framework/timer + - test/e2e/framework/viperconfig - test/e2e/generated - test/e2e/instrumentation - test/e2e/instrumentation/common @@ -3562,6 +3569,7 @@ imports: - test/e2e/instrumentation/logging/utils - test/e2e/instrumentation/monitoring - test/e2e/kubectl + - test/e2e/lifecycle - test/e2e/manifest - test/e2e/network - test/e2e/network/scale @@ -3578,6 +3586,7 @@ imports: - test/e2e/storage/vsphere - test/e2e/upgrades - test/e2e/upgrades/apps + - test/e2e/upgrades/storage - test/images/net/common - test/images/net/nat - test/integration @@ -3675,7 +3684,7 @@ imports: - typed - value - name: sigs.k8s.io/yaml - version: 4e761d0940e599a9569b441f02025fc5981ec2a5 + version: fd68e9863619f6ec2fdd8625fe1f02e7c877e480 - name: vbom.ml/util version: db5cfe13f5cc80a4990d98e2e1b0707a4d1a5394 subpackages: diff --git a/glide.yaml b/glide.yaml index 158aecb9f0ca..fc49645093fe 100644 --- a/glide.yaml +++ b/glide.yaml @@ -264,3 +264,7 @@ import: - package: gonum.org/v1/gonum repo: https://github.com/gonum/gonum.git version: cebdade430ccb61c1feba4878085f6cf8cb3320e + +# VCS resolution +- package: bitbucket.org/ww/goautoneg + vcs: hg diff --git a/vendor/github.com/gorilla/context/.circleci/config.yml b/vendor/github.com/gorilla/context/.circleci/config.yml new file mode 100644 index 000000000000..a5863ce25959 --- /dev/null +++ b/vendor/github.com/gorilla/context/.circleci/config.yml @@ -0,0 +1,63 @@ +version: 2.0 + +jobs: + # Base test configuration for Go library tests Each distinct version should + # inherit this base, and override (at least) the container image used. + "test": &test + docker: + - image: circleci/golang:latest + working_directory: /go/src/github.com/gorilla/csrf + steps: &steps + - checkout + - run: go version + - run: go get -t -v ./... + - run: diff -u <(echo -n) <(gofmt -d .) + - run: if [[ "$LATEST" = true ]]; then go vet -v .; fi + - run: go test -v -race ./... + + "latest": + <<: *test + environment: + LATEST: true + + "1.12": + <<: *test + docker: + - image: circleci/golang:1.12 + + "1.11": + <<: *test + docker: + - image: circleci/golang:1.11 + + "1.10": + <<: *test + docker: + - image: circleci/golang:1.10 + + "1.9": + <<: *test + docker: + - image: circleci/golang:1.9 + + "1.8": + <<: *test + docker: + - image: circleci/golang:1.8 + + "1.7": + <<: *test + docker: + - image: circleci/golang:1.7 + +workflows: + version: 2 + build: + jobs: + - "latest" + - "1.12" + - "1.11" + - "1.10" + - "1.9" + - "1.8" + - "1.7" diff --git a/vendor/github.com/gorilla/context/README.md b/vendor/github.com/gorilla/context/README.md index d31f2bad49f3..926c653f05b6 100644 --- a/vendor/github.com/gorilla/context/README.md +++ b/vendor/github.com/gorilla/context/README.md @@ -1,10 +1,22 @@ context ======= -[![Build Status](https://travis-ci.org/gorilla/context.png?branch=master)](https://travis-ci.org/gorilla/context) +[![GoDoc](https://godoc.org/github.com/gorilla/context?status.svg)](https://godoc.org/github.com/gorilla/context) +[![CircleCI](https://circleci.com/gh/gorilla/context.svg?style=svg)](https://circleci.com/gh/gorilla/context) + +> 👷 **This library is in maintenance mode.** + +> ⚠⚠⚠ **Note** ⚠⚠⚠ gorilla/context, having been born well before `context.Context` existed, does not play well +> with the shallow copying of the request that [`http.Request.WithContext`](https://golang.org/pkg/net/http/#Request.WithContext) (added to net/http Go 1.7 onwards) performs. +> +> Using gorilla/context may lead to memory leaks under those conditions, as the pointers to each `http.Request` become "islanded" and will not be cleaned up when the response is sent. +> +> You should use the `http.Request.Context()` feature in Go 1.7. gorilla/context is a general purpose registry for global request variables. -> Note: gorilla/context, having been born well before `context.Context` existed, does not play well -> with the shallow copying of the request that [`http.Request.WithContext`](https://golang.org/pkg/net/http/#Request.WithContext) (added to net/http Go 1.7 onwards) performs. You should either use *just* gorilla/context, or moving forward, the new `http.Request.Context()`. +* It stores a `map[*http.Request]map[interface{}]interface{}` as a global singleton, and thus tracks variables by their HTTP request. +* Read the full documentation here: https://www.gorillatoolkit.org/pkg/context + +### License -Read the full documentation here: https://www.gorillatoolkit.org/pkg/context +See the LICENSE file for details. diff --git a/vendor/github.com/gorilla/securecookie/.circleci/config.yml b/vendor/github.com/gorilla/securecookie/.circleci/config.yml new file mode 100644 index 000000000000..c2f13d492720 --- /dev/null +++ b/vendor/github.com/gorilla/securecookie/.circleci/config.yml @@ -0,0 +1,65 @@ +version: 2.0 + +jobs: + # Base test configuration for Go library tests Each distinct version should + # inherit this base, and override (at least) the container image used. + "test": &test + docker: + - image: circleci/golang:latest + working_directory: /go/src/github.com/gorilla/securecookie + steps: &steps + - checkout + - run: go version + - run: go get -t -v ./... + - run: diff -u <(echo -n) <(gofmt -d .) + - run: if [[ "$LATEST" = true ]]; then go vet -v .; fi + - run: go test -v -race ./... + + "latest": + <<: *test + environment: + LATEST: true + + + "1.12": + <<: *test + docker: + - image: circleci/golang:1.12 + + "1.11": + <<: *test + docker: + - image: circleci/golang:1.11 + + "1.10": + <<: *test + docker: + - image: circleci/golang:1.10 + + "1.9": + <<: *test + docker: + - image: circleci/golang:1.9 + + "1.8": + <<: *test + docker: + - image: circleci/golang:1.8 + + "1.7": + <<: *test + docker: + - image: circleci/golang:1.7 + + +workflows: + version: 2 + build: + jobs: + - "latest" + - "1.12" + - "1.11" + - "1.10" + - "1.9" + - "1.8" + - "1.7" diff --git a/vendor/github.com/gorilla/securecookie/.travis.yml b/vendor/github.com/gorilla/securecookie/.travis.yml deleted file mode 100644 index 6f440f1e42d3..000000000000 --- a/vendor/github.com/gorilla/securecookie/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: go -sudo: false - -matrix: - include: - - go: 1.3 - - go: 1.4 - - go: 1.5 - - go: 1.6 - - go: 1.7 - - go: tip - allow_failures: - - go: tip - -script: - - go get -t -v ./... - - diff -u <(echo -n) <(gofmt -d .) - - go vet $(go list ./... | grep -v /vendor/) - - go test -v -race ./... diff --git a/vendor/github.com/gorilla/securecookie/securecookie.go b/vendor/github.com/gorilla/securecookie/securecookie.go index a34f85128484..b718ce98f882 100644 --- a/vendor/github.com/gorilla/securecookie/securecookie.go +++ b/vendor/github.com/gorilla/securecookie/securecookie.go @@ -124,7 +124,7 @@ type Codec interface { // GenerateRandomKey(). It is recommended to use a key with 32 or 64 bytes. // // blockKey is optional, used to encrypt values. Create it using -// GenerateRandomKey(). The key length must correspond to the block size +// GenerateRandomKey(). The key length must correspond to the key size // of the encryption algorithm. For AES, used by default, valid lengths are // 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256. // The default encoder used for cookie serialization is encoding/gob. diff --git a/vendor/github.com/mitchellh/go-wordwrap/go.mod b/vendor/github.com/mitchellh/go-wordwrap/go.mod deleted file mode 100644 index 2ae411b20123..000000000000 --- a/vendor/github.com/mitchellh/go-wordwrap/go.mod +++ /dev/null @@ -1 +0,0 @@ -module github.com/mitchellh/go-wordwrap diff --git a/vendor/github.com/openshift/api/OWNERS b/vendor/github.com/openshift/api/OWNERS index 70b782d9e576..ff955ddc8ebb 100644 --- a/vendor/github.com/openshift/api/OWNERS +++ b/vendor/github.com/openshift/api/OWNERS @@ -9,5 +9,7 @@ approvers: - jwforres - knobunc - sjenning + - mfojtik - soltysh + - sttts - bparees diff --git a/vendor/github.com/openshift/api/config/v1/types_apiserver.go b/vendor/github.com/openshift/api/config/v1/types_apiserver.go index 9a13b85274d1..fc430d69f5a6 100644 --- a/vendor/github.com/openshift/api/config/v1/types_apiserver.go +++ b/vendor/github.com/openshift/api/config/v1/types_apiserver.go @@ -12,6 +12,7 @@ import ( type APIServer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:Required // +required Spec APIServerSpec `json:"spec"` // +optional @@ -30,18 +31,15 @@ type APIServerSpec struct { // - ConfigMap.Data["ca-bundle.crt"] - CA bundle. // +optional ClientCA ConfigMapNameReference `json:"clientCA"` + // additionalCORSAllowedOrigins lists additional, user-defined regular expressions describing hosts for which the + // API server allows access using the CORS headers. This may be needed to access the API and the integrated OAuth + // server from JavaScript applications. + // The values are regular expressions that correspond to the Golang regular expression language. + // +optional + AdditionalCORSAllowedOrigins []string `json:"additionalCORSAllowedOrigins,omitempty"` } type APIServerServingCerts struct { - // defaultServingCertificate references a kubernetes.io/tls type secret containing the default TLS cert info for - // serving secure traffic. If no named certificates match the server name as understood by a client, this default - // certificate will be used. If defaultServingCertificate is not specified, then a operator managed certificate will - // be used. - // The secret must exist in the openshift-config namespace and contain the following required fields: - // - Secret.Data["tls.key"] - TLS private key. - // - Secret.Data["tls.crt"] - TLS certificate. - // +optional - DefaultServingCertificate SecretNameReference `json:"defaultServingCertificate"` // namedCertificates references secrets containing the TLS cert info for serving secure traffic to specific hostnames. // If no named certificates are provided, or no named certificates match the server name as understood by a client, // the defaultServingCertificate will be used. diff --git a/vendor/github.com/openshift/api/config/v1/types_authentication.go b/vendor/github.com/openshift/api/config/v1/types_authentication.go index d712b920f2e2..508469d0ff52 100644 --- a/vendor/github.com/openshift/api/config/v1/types_authentication.go +++ b/vendor/github.com/openshift/api/config/v1/types_authentication.go @@ -13,6 +13,7 @@ type Authentication struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +kubebuilder:validation:Required // +required Spec AuthenticationSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. diff --git a/vendor/github.com/openshift/api/config/v1/types_build.go b/vendor/github.com/openshift/api/config/v1/types_build.go index ca65b3ba3618..c7ed7e958b1a 100644 --- a/vendor/github.com/openshift/api/config/v1/types_build.go +++ b/vendor/github.com/openshift/api/config/v1/types_build.go @@ -14,6 +14,7 @@ type Build struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds user-settable values for the build controller configuration + // +kubebuilder:validation:Required // +required Spec BuildSpec `json:"spec"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go b/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go index 8508b5cd07ba..af2ce846cab0 100644 --- a/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go +++ b/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go @@ -17,6 +17,7 @@ type ClusterOperator struct { metav1.ObjectMeta `json:"metadata"` // spec hold the intent of how this operator should behave. + // +kubebuilder:validation:Required // +required Spec ClusterOperatorSpec `json:"spec"` diff --git a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go index 6ab92365b99c..c6c2e7e43017 100644 --- a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go +++ b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go @@ -16,6 +16,7 @@ type ClusterVersion struct { // spec is the desired state of the cluster version - the operator will work // to ensure that the desired version is applied to the cluster. + // +kubebuilder:validation:Required // +required Spec ClusterVersionSpec `json:"spec"` // status contains information about the available updates and any in-progress diff --git a/vendor/github.com/openshift/api/config/v1/types_console.go b/vendor/github.com/openshift/api/config/v1/types_console.go index 40ad0015142a..b137c26e08ba 100644 --- a/vendor/github.com/openshift/api/config/v1/types_console.go +++ b/vendor/github.com/openshift/api/config/v1/types_console.go @@ -13,6 +13,7 @@ type Console struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +kubebuilder:validation:Required // +required Spec ConsoleSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. diff --git a/vendor/github.com/openshift/api/config/v1/types_dns.go b/vendor/github.com/openshift/api/config/v1/types_dns.go index c1fa820428e0..dac8cb6f8418 100644 --- a/vendor/github.com/openshift/api/config/v1/types_dns.go +++ b/vendor/github.com/openshift/api/config/v1/types_dns.go @@ -14,6 +14,7 @@ type DNS struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +kubebuilder:validation:Required // +required Spec DNSSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. diff --git a/vendor/github.com/openshift/api/config/v1/types_feature.go b/vendor/github.com/openshift/api/config/v1/types_feature.go index a072f1382453..536bad191f85 100644 --- a/vendor/github.com/openshift/api/config/v1/types_feature.go +++ b/vendor/github.com/openshift/api/config/v1/types_feature.go @@ -13,6 +13,7 @@ type FeatureGate struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +kubebuilder:validation:Required // +required Spec FeatureGateSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. @@ -29,12 +30,40 @@ var ( // TechPreviewNoUpgrade turns on tech preview features that are not part of the normal supported platform. Turning // this feature set on CANNOT BE UNDONE and PREVENTS UPGRADES. TechPreviewNoUpgrade FeatureSet = "TechPreviewNoUpgrade" + + // CustomNoUpgrade allows the enabling or disabling of any feature. Turning this feature set on IS NOT SUPPORTED, CANNOT BE UNDONE, and PREVENTS UPGRADES. + // Because of its nature, this setting cannot be validated. If you have any typos or accidentally apply invalid combinations + // your cluster may fail in an unrecoverable way. + CustomNoUpgrade FeatureSet = "CustomNoUpgrade" ) type FeatureGateSpec struct { + FeatureGateSelection `json:",inline"` +} + +// +union +type FeatureGateSelection struct { // featureSet changes the list of features in the cluster. The default is empty. Be very careful adjusting this setting. // Turning on or off features may cause irreversible changes in your cluster which cannot be undone. + // +unionDiscriminator + // +optional FeatureSet FeatureSet `json:"featureSet,omitempty"` + + // customNoUpgrade allows the enabling or disabling of any feature. Turning this feature set on IS NOT SUPPORTED, CANNOT BE UNDONE, and PREVENTS UPGRADES. + // Because of its nature, this setting cannot be validated. If you have any typos or accidentally apply invalid combinations + // your cluster may fail in an unrecoverable way. featureSet must equal "CustomNoUpgrade" must be set to use this field. + // +optional + // +nullable + CustomNoUpgrade *CustomFeatureGates `json:"customNoUpgrade,omitempty"` +} + +type CustomFeatureGates struct { + // enabled is a list of all feature gates that you want to force on + // +optional + Enabled []string `json:"enabled,omitempty"` + // disabled is a list of all feature gates that you want to force off + // +optional + Disabled []string `json:"disabled,omitempty"` } type FeatureGateStatus struct { @@ -81,7 +110,6 @@ var FeatureSets = map[FeatureSet]*FeatureGateEnabledDisabled{ "ExperimentalCriticalPodAnnotation", // sig-pod, sjenning "RotateKubeletServerCertificate", // sig-pod, sjenning "SupportPodPidsLimit", // sig-pod, sjenning - "CSIBlockVolume", // sig-storage, j-griffith }, Disabled: []string{ "LocalStorageCapacityIsolation", // sig-pod, sjenning diff --git a/vendor/github.com/openshift/api/config/v1/types_image.go b/vendor/github.com/openshift/api/config/v1/types_image.go index d9e54b633ead..f0cf220d3a8a 100644 --- a/vendor/github.com/openshift/api/config/v1/types_image.go +++ b/vendor/github.com/openshift/api/config/v1/types_image.go @@ -13,6 +13,7 @@ type Image struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +kubebuilder:validation:Required // +required Spec ImageSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. diff --git a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go index c59dc39c1ec2..314dd83ba8b9 100644 --- a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go +++ b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go @@ -13,6 +13,7 @@ type Infrastructure struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +kubebuilder:validation:Required // +required Spec InfrastructureSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. @@ -91,6 +92,9 @@ const ( // VSpherePlatformType represents VMWare vSphere infrastructure. VSpherePlatformType PlatformType = "VSphere" + + // OvirtPlatformType represents oVirt/RHV infrastructure. + OvirtPlatformType PlatformType = "oVirt" ) // PlatformStatus holds the current status specific to the underlying infrastructure provider @@ -102,7 +106,7 @@ type PlatformStatus struct { // balancers, dynamic volume provisioning, machine creation and deletion, and // other integrations are enabled. If None, no infrastructure automation is // enabled. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", - // "OpenStack", "VSphere", and "None". Individual components may not support + // "OpenStack", "VSphere", "oVirt", and "None". Individual components may not support // all platforms, and must handle unrecognized platforms as None if they do // not support that platform. Type PlatformType `json:"type"` @@ -110,6 +114,18 @@ type PlatformStatus struct { // AWS contains settings specific to the Amazon Web Services infrastructure provider. // +optional AWS *AWSPlatformStatus `json:"aws,omitempty"` + + // Azure contains settings specific to the Azure infrastructure provider. + // +optional + Azure *AzurePlatformStatus `json:"azure,omitempty"` + + // GCP contains settings specific to the Google Cloud Platform infrastructure provider. + // +optional + GCP *GCPPlatformStatus `json:"gcp,omitempty"` + + // BareMetal contains settings specific to the BareMetal platform. + // +optional + BareMetal *BareMetalPlatformStatus `json:"baremetal,omitempty"` } // AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider. @@ -118,6 +134,42 @@ type AWSPlatformStatus struct { Region string `json:"region"` } +// AzurePlatformStatus holds the current status of the Azure infrastructure provider. +type AzurePlatformStatus struct { + // resourceGroupName is the Resource Group for new Azure resources created for the cluster. + ResourceGroupName string `json:"resourceGroupName"` +} + +// GCPPlatformStatus holds the current status of the Google Cloud Platform infrastructure provider. +type GCPPlatformStatus struct { + // resourceGroupName is the Project ID for new GCP resources created for the cluster. + ProjectID string `json:"projectID"` + + // region holds the region for new GCP resources created for the cluster. + Region string `json:"region"` +} + +// BareMetalPlatformStatus holds the current status of the BareMetal infrastructure provider. +type BareMetalPlatformStatus struct { + // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used + // by components inside the cluster, like kubelets using the infrastructure rather + // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI + // points to. It is the IP for a self-hosted load balancer in front of the API servers. + APIServerInternalIP string `json:"apiServerInternalIP,omitempty"` + + // ingressIP is an external IP which routes to the default ingress controller. + // The IP is a suitable target of a wildcard DNS record used to resolve default route host names. + IngressIP string `json:"ingressIP,omitempty"` + + // nodeDNSIP is the IP address for the internal DNS used by the + // nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` + // provides name resolution for the nodes themselves. There is no DNS-as-a-service for + // BareMetal deployments. In order to minimize necessary changes to the + // datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames + // to the nodes in the cluster. + NodeDNSIP string `json:"nodeDNSIP,omitempty"` +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // InfrastructureList is diff --git a/vendor/github.com/openshift/api/config/v1/types_ingress.go b/vendor/github.com/openshift/api/config/v1/types_ingress.go index 4cbefc91b3e0..484a1af0bc24 100644 --- a/vendor/github.com/openshift/api/config/v1/types_ingress.go +++ b/vendor/github.com/openshift/api/config/v1/types_ingress.go @@ -14,6 +14,7 @@ type Ingress struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +kubebuilder:validation:Required // +required Spec IngressSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. diff --git a/vendor/github.com/openshift/api/config/v1/types_network.go b/vendor/github.com/openshift/api/config/v1/types_network.go index 40ba5e493a41..a60c5f7dcc9a 100644 --- a/vendor/github.com/openshift/api/config/v1/types_network.go +++ b/vendor/github.com/openshift/api/config/v1/types_network.go @@ -14,6 +14,7 @@ type Network struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration. + // +kubebuilder:validation:Required // +required Spec NetworkSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. diff --git a/vendor/github.com/openshift/api/config/v1/types_oauth.go b/vendor/github.com/openshift/api/config/v1/types_oauth.go index 7aa0133e7320..15bc5b1c1a4f 100644 --- a/vendor/github.com/openshift/api/config/v1/types_oauth.go +++ b/vendor/github.com/openshift/api/config/v1/types_oauth.go @@ -15,6 +15,7 @@ type OAuth struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +kubebuilder:validation:Required // +required Spec OAuthSpec `json:"spec"` // +optional diff --git a/vendor/github.com/openshift/api/config/v1/types_project.go b/vendor/github.com/openshift/api/config/v1/types_project.go index e64808459bd4..72203d983a74 100644 --- a/vendor/github.com/openshift/api/config/v1/types_project.go +++ b/vendor/github.com/openshift/api/config/v1/types_project.go @@ -13,6 +13,7 @@ type Project struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +kubebuilder:validation:Required // +required Spec ProjectSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. diff --git a/vendor/github.com/openshift/api/config/v1/types_proxy.go b/vendor/github.com/openshift/api/config/v1/types_proxy.go index b869785f0cce..1f01f961d803 100644 --- a/vendor/github.com/openshift/api/config/v1/types_proxy.go +++ b/vendor/github.com/openshift/api/config/v1/types_proxy.go @@ -13,6 +13,7 @@ type Proxy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds user-settable values for the proxy configuration + // +kubebuilder:validation:Required // +required Spec ProxySpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. @@ -34,6 +35,10 @@ type ProxySpec struct { // Empty means unset and will not result in an env var. // +optional NoProxy string `json:"noProxy,omitempty"` + + // readinessEndpoints is a list of endpoints used to verify readiness of the proxy. + // +optional + ReadinessEndpoints []string `json:"readinessEndpoints,omitempty"` } // ProxyStatus shows current known state of the cluster proxy. diff --git a/vendor/github.com/openshift/api/config/v1/types_scheduling.go b/vendor/github.com/openshift/api/config/v1/types_scheduling.go index 48195e8b2faf..4a6bfba6fcbb 100644 --- a/vendor/github.com/openshift/api/config/v1/types_scheduling.go +++ b/vendor/github.com/openshift/api/config/v1/types_scheduling.go @@ -13,6 +13,7 @@ type Scheduler struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +kubebuilder:validation:Required // +required Spec SchedulerSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. @@ -48,6 +49,16 @@ type SchedulerSpec struct { // would not be applied. // +optional DefaultNodeSelector string `json:"defaultNodeSelector,omitempty"` + // MastersSchedulable allows masters nodes to be schedulable. When this flag is + // turned on, all the master nodes in the cluster will be made schedulable, + // so that workload pods can run on them. The default value for this field is false, + // meaning none of the master nodes are schedulable. + // Important Note: Once the workload pods start running on the master nodes, + // extreme care must be taken to ensure that cluster-critical control plane components + // are not impacted. + // Please turn on this field after doing due diligence. + // +optional + MastersSchedulable bool `json:"mastersSchedulable"` } type SchedulerStatus struct { diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go index 1300ced88ddd..764c1efe5f62 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go @@ -95,7 +95,6 @@ func (in *APIServerNamedServingCert) DeepCopy() *APIServerNamedServingCert { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *APIServerServingCerts) DeepCopyInto(out *APIServerServingCerts) { *out = *in - out.DefaultServingCertificate = in.DefaultServingCertificate if in.NamedCertificates != nil { in, out := &in.NamedCertificates, &out.NamedCertificates *out = make([]APIServerNamedServingCert, len(*in)) @@ -121,6 +120,11 @@ func (in *APIServerSpec) DeepCopyInto(out *APIServerSpec) { *out = *in in.ServingCerts.DeepCopyInto(&out.ServingCerts) out.ClientCA = in.ClientCA + if in.AdditionalCORSAllowedOrigins != nil { + in, out := &in.AdditionalCORSAllowedOrigins, &out.AdditionalCORSAllowedOrigins + *out = make([]string, len(*in)) + copy(*out, *in) + } return } @@ -333,6 +337,38 @@ func (in *AuthenticationStatus) DeepCopy() *AuthenticationStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzurePlatformStatus) DeepCopyInto(out *AzurePlatformStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzurePlatformStatus. +func (in *AzurePlatformStatus) DeepCopy() *AzurePlatformStatus { + if in == nil { + return nil + } + out := new(AzurePlatformStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BareMetalPlatformStatus) DeepCopyInto(out *BareMetalPlatformStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BareMetalPlatformStatus. +func (in *BareMetalPlatformStatus) DeepCopy() *BareMetalPlatformStatus { + if in == nil { + return nil + } + out := new(BareMetalPlatformStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BasicAuthIdentityProvider) DeepCopyInto(out *BasicAuthIdentityProvider) { *out = *in @@ -383,12 +419,12 @@ func (in *BuildDefaults) DeepCopyInto(out *BuildDefaults) { if in.DefaultProxy != nil { in, out := &in.DefaultProxy, &out.DefaultProxy *out = new(ProxySpec) - **out = **in + (*in).DeepCopyInto(*out) } if in.GitProxy != nil { in, out := &in.GitProxy, &out.GitProxy *out = new(ProxySpec) - **out = **in + (*in).DeepCopyInto(*out) } if in.Env != nil { in, out := &in.Env, &out.Env @@ -960,6 +996,32 @@ func (in *ConsoleStatus) DeepCopy() *ConsoleStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomFeatureGates) DeepCopyInto(out *CustomFeatureGates) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Disabled != nil { + in, out := &in.Disabled, &out.Disabled + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomFeatureGates. +func (in *CustomFeatureGates) DeepCopy() *CustomFeatureGates { + if in == nil { + return nil + } + out := new(CustomFeatureGates) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DNS) DeepCopyInto(out *DNS) { *out = *in @@ -1214,7 +1276,7 @@ func (in *FeatureGate) DeepCopyInto(out *FeatureGate) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) out.Status = in.Status return } @@ -1296,9 +1358,31 @@ func (in *FeatureGateList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FeatureGateSelection) DeepCopyInto(out *FeatureGateSelection) { + *out = *in + if in.CustomNoUpgrade != nil { + in, out := &in.CustomNoUpgrade, &out.CustomNoUpgrade + *out = new(CustomFeatureGates) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateSelection. +func (in *FeatureGateSelection) DeepCopy() *FeatureGateSelection { + if in == nil { + return nil + } + out := new(FeatureGateSelection) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FeatureGateSpec) DeepCopyInto(out *FeatureGateSpec) { *out = *in + in.FeatureGateSelection.DeepCopyInto(&out.FeatureGateSelection) return } @@ -1328,6 +1412,22 @@ func (in *FeatureGateStatus) DeepCopy() *FeatureGateStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GCPPlatformStatus) DeepCopyInto(out *GCPPlatformStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPPlatformStatus. +func (in *GCPPlatformStatus) DeepCopy() *GCPPlatformStatus { + if in == nil { + return nil + } + out := new(GCPPlatformStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GenericAPIServerConfig) DeepCopyInto(out *GenericAPIServerConfig) { *out = *in @@ -2357,6 +2457,21 @@ func (in *PlatformStatus) DeepCopyInto(out *PlatformStatus) { *out = new(AWSPlatformStatus) **out = **in } + if in.Azure != nil { + in, out := &in.Azure, &out.Azure + *out = new(AzurePlatformStatus) + **out = **in + } + if in.GCP != nil { + in, out := &in.GCP, &out.GCP + *out = new(GCPPlatformStatus) + **out = **in + } + if in.BareMetal != nil { + in, out := &in.BareMetal, &out.BareMetal + *out = new(BareMetalPlatformStatus) + **out = **in + } return } @@ -2469,7 +2584,7 @@ func (in *Proxy) DeepCopyInto(out *Proxy) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) out.Status = in.Status return } @@ -2528,6 +2643,11 @@ func (in *ProxyList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ProxySpec) DeepCopyInto(out *ProxySpec) { *out = *in + if in.ReadinessEndpoints != nil { + in, out := &in.ReadinessEndpoints, &out.ReadinessEndpoints + *out = make([]string, len(*in)) + copy(*out, *in) + } return } diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go index 730cffc41779..8f144e71990f 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go @@ -262,8 +262,7 @@ func (APIServerNamedServingCert) SwaggerDoc() map[string]string { } var map_APIServerServingCerts = map[string]string{ - "defaultServingCertificate": "defaultServingCertificate references a kubernetes.io/tls type secret containing the default TLS cert info for serving secure traffic. If no named certificates match the server name as understood by a client, this default certificate will be used. If defaultServingCertificate is not specified, then a operator managed certificate will be used. The secret must exist in the openshift-config namespace and contain the following required fields: - Secret.Data[\"tls.key\"] - TLS private key. - Secret.Data[\"tls.crt\"] - TLS certificate.", - "namedCertificates": "namedCertificates references secrets containing the TLS cert info for serving secure traffic to specific hostnames. If no named certificates are provided, or no named certificates match the server name as understood by a client, the defaultServingCertificate will be used.", + "namedCertificates": "namedCertificates references secrets containing the TLS cert info for serving secure traffic to specific hostnames. If no named certificates are provided, or no named certificates match the server name as understood by a client, the defaultServingCertificate will be used.", } func (APIServerServingCerts) SwaggerDoc() map[string]string { @@ -271,8 +270,9 @@ func (APIServerServingCerts) SwaggerDoc() map[string]string { } var map_APIServerSpec = map[string]string{ - "servingCerts": "servingCert is the TLS cert info for serving secure traffic. If not specified, operator managed certificates will be used for serving secure traffic.", - "clientCA": "clientCA references a ConfigMap containing a certificate bundle for the signers that will be recognized for incoming client certificates in addition to the operator managed signers. If this is empty, then only operator managed signers are valid. You usually only have to set this if you have your own PKI you wish to honor client certificates from. The ConfigMap must exist in the openshift-config namespace and contain the following required fields: - ConfigMap.Data[\"ca-bundle.crt\"] - CA bundle.", + "servingCerts": "servingCert is the TLS cert info for serving secure traffic. If not specified, operator managed certificates will be used for serving secure traffic.", + "clientCA": "clientCA references a ConfigMap containing a certificate bundle for the signers that will be recognized for incoming client certificates in addition to the operator managed signers. If this is empty, then only operator managed signers are valid. You usually only have to set this if you have your own PKI you wish to honor client certificates from. The ConfigMap must exist in the openshift-config namespace and contain the following required fields: - ConfigMap.Data[\"ca-bundle.crt\"] - CA bundle.", + "additionalCORSAllowedOrigins": "additionalCORSAllowedOrigins lists additional, user-defined regular expressions describing hosts for which the API server allows access using the CORS headers. This may be needed to access the API and the integrated OAuth server from JavaScript applications. The values are regular expressions that correspond to the Golang regular expression language.", } func (APIServerSpec) SwaggerDoc() map[string]string { @@ -622,6 +622,15 @@ func (DNSZone) SwaggerDoc() map[string]string { return map_DNSZone } +var map_CustomFeatureGates = map[string]string{ + "enabled": "enabled is a list of all feature gates that you want to force on", + "disabled": "disabled is a list of all feature gates that you want to force off", +} + +func (CustomFeatureGates) SwaggerDoc() map[string]string { + return map_CustomFeatureGates +} + var map_FeatureGate = map[string]string{ "": "Feature holds cluster-wide information about feature gates. The canonical name is `cluster`", "metadata": "Standard object's metadata.", @@ -641,12 +650,13 @@ func (FeatureGateList) SwaggerDoc() map[string]string { return map_FeatureGateList } -var map_FeatureGateSpec = map[string]string{ - "featureSet": "featureSet changes the list of features in the cluster. The default is empty. Be very careful adjusting this setting. Turning on or off features may cause irreversible changes in your cluster which cannot be undone.", +var map_FeatureGateSelection = map[string]string{ + "featureSet": "featureSet changes the list of features in the cluster. The default is empty. Be very careful adjusting this setting. Turning on or off features may cause irreversible changes in your cluster which cannot be undone.", + "customNoUpgrade": "customNoUpgrade allows the enabling or disabling of any feature. Turning this feature set on IS NOT SUPPORTED, CANNOT BE UNDONE, and PREVENTS UPGRADES. Because of its nature, this setting cannot be validated. If you have any typos or accidentally apply invalid combinations your cluster may fail in an unrecoverable way. featureSet must equal \"CustomNoUpgrade\" must be set to use this field.", } -func (FeatureGateSpec) SwaggerDoc() map[string]string { - return map_FeatureGateSpec +func (FeatureGateSelection) SwaggerDoc() map[string]string { + return map_FeatureGateSelection } var map_Image = map[string]string{ @@ -718,6 +728,36 @@ func (AWSPlatformStatus) SwaggerDoc() map[string]string { return map_AWSPlatformStatus } +var map_AzurePlatformStatus = map[string]string{ + "": "AzurePlatformStatus holds the current status of the Azure infrastructure provider.", + "resourceGroupName": "resourceGroupName is the Resource Group for new Azure resources created for the cluster.", +} + +func (AzurePlatformStatus) SwaggerDoc() map[string]string { + return map_AzurePlatformStatus +} + +var map_BareMetalPlatformStatus = map[string]string{ + "": "BareMetalPlatformStatus holds the current status of the BareMetal infrastructure provider.", + "apiServerInternalIP": "apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used by components inside the cluster, like kubelets using the infrastructure rather than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI points to. It is the IP for a self-hosted load balancer in front of the API servers.", + "ingressIP": "ingressIP is an external IP which routes to the default ingress controller. The IP is a suitable target of a wildcard DNS record used to resolve default route host names.", + "nodeDNSIP": "nodeDNSIP is the IP address for the internal DNS used by the nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` provides name resolution for the nodes themselves. There is no DNS-as-a-service for BareMetal deployments. In order to minimize necessary changes to the datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames to the nodes in the cluster.", +} + +func (BareMetalPlatformStatus) SwaggerDoc() map[string]string { + return map_BareMetalPlatformStatus +} + +var map_GCPPlatformStatus = map[string]string{ + "": "GCPPlatformStatus holds the current status of the Google Cloud Platform infrastructure provider.", + "projectID": "resourceGroupName is the Project ID for new GCP resources created for the cluster.", + "region": "region holds the region for new GCP resources created for the cluster.", +} + +func (GCPPlatformStatus) SwaggerDoc() map[string]string { + return map_GCPPlatformStatus +} + var map_Infrastructure = map[string]string{ "": "Infrastructure holds cluster-wide information about Infrastructure. The canonical name is `cluster`", "metadata": "Standard object's metadata.", @@ -762,9 +802,12 @@ func (InfrastructureStatus) SwaggerDoc() map[string]string { } var map_PlatformStatus = map[string]string{ - "": "PlatformStatus holds the current status specific to the underlying infrastructure provider of the current cluster. Since these are used at status-level for the underlying cluster, it is supposed that only one of the status structs is set.", - "type": "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.", - "aws": "AWS contains settings specific to the Amazon Web Services infrastructure provider.", + "": "PlatformStatus holds the current status specific to the underlying infrastructure provider of the current cluster. Since these are used at status-level for the underlying cluster, it is supposed that only one of the status structs is set.", + "type": "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.", + "aws": "AWS contains settings specific to the Amazon Web Services infrastructure provider.", + "azure": "Azure contains settings specific to the Azure infrastructure provider.", + "gcp": "GCP contains settings specific to the Google Cloud Platform infrastructure provider.", + "baremetal": "BareMetal contains settings specific to the BareMetal platform.", } func (PlatformStatus) SwaggerDoc() map[string]string { @@ -1147,10 +1190,11 @@ func (ProxyList) SwaggerDoc() map[string]string { } var map_ProxySpec = map[string]string{ - "": "ProxySpec contains cluster proxy creation configuration.", - "httpProxy": "httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var.", - "httpsProxy": "httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var.", - "noProxy": "noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. Empty means unset and will not result in an env var.", + "": "ProxySpec contains cluster proxy creation configuration.", + "httpProxy": "httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var.", + "httpsProxy": "httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var.", + "noProxy": "noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. Empty means unset and will not result in an env var.", + "readinessEndpoints": "readinessEndpoints is a list of endpoints used to verify readiness of the proxy.", } func (ProxySpec) SwaggerDoc() map[string]string { @@ -1190,6 +1234,7 @@ func (SchedulerList) SwaggerDoc() map[string]string { var map_SchedulerSpec = map[string]string{ "policy": "policy is a reference to a ConfigMap containing scheduler policy which has user specified predicates and priorities. If this ConfigMap is not available scheduler will default to use DefaultAlgorithmProvider. The namespace for this configmap is openshift-config.", "defaultNodeSelector": "defaultNodeSelector helps set the cluster-wide default node selector to restrict pod placement to specific nodes. This is applied to the pods created in all namespaces without a specified nodeSelector value. For example, defaultNodeSelector: \"type=user-node,region=east\" would set nodeSelector field in pod spec to \"type=user-node,region=east\" to all pods created in all namespaces. Namespaces having project-wide node selectors won't be impacted even if this field is set. This adds an annotation section to the namespace. For example, if a new namespace is created with node-selector='type=user-node,region=east', the annotation openshift.io/node-selector: type=user-node,region=east gets added to the project. When the openshift.io/node-selector annotation is set on the project the value is used in preference to the value we are setting for defaultNodeSelector field. For instance, openshift.io/node-selector: \"type=user-node,region=west\" means that the default of \"type=user-node,region=east\" set in defaultNodeSelector would not be applied.", + "mastersSchedulable": "MastersSchedulable allows masters nodes to be schedulable. When this flag is turned on, all the master nodes in the cluster will be made schedulable, so that workload pods can run on them. The default value for this field is false, meaning none of the master nodes are schedulable. Important Note: Once the workload pods start running on the master nodes, extreme care must be taken to ensure that cluster-critical control plane components are not impacted. Please turn on this field after doing due diligence.", } func (SchedulerSpec) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/console/v1/types_console_link.go b/vendor/github.com/openshift/api/console/v1/types_console_link.go index 11cd6b2d67b4..ac878d02332d 100644 --- a/vendor/github.com/openshift/api/console/v1/types_console_link.go +++ b/vendor/github.com/openshift/api/console/v1/types_console_link.go @@ -19,6 +19,20 @@ type ConsoleLinkSpec struct { Link `json:",inline"` // location determines which location in the console the link will be appended to. Location ConsoleLinkLocation `json:"location"` + // applicationMenu holds information about section and icon used for the link in the + // application menu, and it is applicable only when location is set to ApplicationMenu. + // + // +optional + ApplicationMenu *ApplicationMenuSpec `json:"applicationMenu,omitempty"` +} + +// ApplicationMenuSpec is the specification of the desired section and icon used for the link in the application menu. +type ApplicationMenuSpec struct { + // section is the section of the application menu in which the link should appear. + Section string `json:"section"` + // imageUrl is the URL for the icon used in front of the link in the application menu. + // The URL must be an HTTPS URL or a Data URI. The image should be square and will be shown at 24x24 pixels. + ImageURL string `json:"imageURL"` } // ConsoleLinkLocationSelector is a set of possible menu targets to which a link may be appended. @@ -29,6 +43,8 @@ const ( HelpMenu ConsoleLinkLocation = "HelpMenu" // UserMenu indicates that the link should appear in the user menu in the console. UserMenu ConsoleLinkLocation = "UserMenu" + // ApplicationMenu indicates that the link should appear inside the application menu of the console. + ApplicationMenu ConsoleLinkLocation = "ApplicationMenu" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/github.com/openshift/api/console/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/console/v1/zz_generated.deepcopy.go index df09edd21e26..6265432228b5 100644 --- a/vendor/github.com/openshift/api/console/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/console/v1/zz_generated.deepcopy.go @@ -8,6 +8,22 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApplicationMenuSpec) DeepCopyInto(out *ApplicationMenuSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationMenuSpec. +func (in *ApplicationMenuSpec) DeepCopy() *ApplicationMenuSpec { + if in == nil { + return nil + } + out := new(ApplicationMenuSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConsoleCLIDownload) DeepCopyInto(out *ConsoleCLIDownload) { *out = *in @@ -94,7 +110,7 @@ func (in *ConsoleLink) DeepCopyInto(out *ConsoleLink) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) return } @@ -153,6 +169,11 @@ func (in *ConsoleLinkList) DeepCopyObject() runtime.Object { func (in *ConsoleLinkSpec) DeepCopyInto(out *ConsoleLinkSpec) { *out = *in out.Link = in.Link + if in.ApplicationMenu != nil { + in, out := &in.ApplicationMenu, &out.ApplicationMenu + *out = new(ApplicationMenuSpec) + **out = **in + } return } diff --git a/vendor/github.com/openshift/api/console/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/console/v1/zz_generated.swagger_doc_generated.go index c81196a9a86b..996137af099a 100644 --- a/vendor/github.com/openshift/api/console/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/console/v1/zz_generated.swagger_doc_generated.go @@ -49,6 +49,16 @@ func (ConsoleCLIDownloadSpec) SwaggerDoc() map[string]string { return map_ConsoleCLIDownloadSpec } +var map_ApplicationMenuSpec = map[string]string{ + "": "ApplicationMenuSpec is the specification of the desired section and icon used for the link in the application menu.", + "section": "section is the section of the application menu in which the link should appear.", + "imageURL": "imageUrl is the URL for the icon used in front of the link in the application menu. The URL must be an HTTPS URL or a Data URI. The image should be square and will be shown at 24x24 pixels.", +} + +func (ApplicationMenuSpec) SwaggerDoc() map[string]string { + return map_ApplicationMenuSpec +} + var map_ConsoleLink = map[string]string{ "": "ConsoleLink is an extension for customizing OpenShift web console links.", "metadata": "Standard object's metadata.", @@ -67,8 +77,9 @@ func (ConsoleLinkList) SwaggerDoc() map[string]string { } var map_ConsoleLinkSpec = map[string]string{ - "": "ConsoleLinkSpec is the desired console link configuration.", - "location": "location determines which location in the console the link will be appended to.", + "": "ConsoleLinkSpec is the desired console link configuration.", + "location": "location determines which location in the console the link will be appended to.", + "applicationMenu": "applicationMenu holds information about section and icon used for the link in the application menu, and it is applicable only when location is set to ApplicationMenu.", } func (ConsoleLinkSpec) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/operator/v1/doc.go b/vendor/github.com/openshift/api/operator/v1/doc.go index 349ba71e0a58..3de961a7fc27 100644 --- a/vendor/github.com/openshift/api/operator/v1/doc.go +++ b/vendor/github.com/openshift/api/operator/v1/doc.go @@ -2,5 +2,6 @@ // +k8s:defaulter-gen=TypeMeta // +k8s:openapi-gen=true +// +kubebuilder:validation:Optional // +groupName=operator.openshift.io package v1 diff --git a/vendor/github.com/openshift/api/operator/v1/types.go b/vendor/github.com/openshift/api/operator/v1/types.go index 48bdb385b379..179c476c63ab 100644 --- a/vendor/github.com/openshift/api/operator/v1/types.go +++ b/vendor/github.com/openshift/api/operator/v1/types.go @@ -10,6 +10,7 @@ type MyOperatorResource struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +kubebuilder:validation:Required // +required Spec MyOperatorResourceSpec `json:"spec"` Status MyOperatorResourceStatus `json:"status"` diff --git a/vendor/github.com/openshift/api/operator/v1/types_authentication.go b/vendor/github.com/openshift/api/operator/v1/types_authentication.go index 1dee7ca27ace..f27154117a4d 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_authentication.go +++ b/vendor/github.com/openshift/api/operator/v1/types_authentication.go @@ -13,6 +13,7 @@ type Authentication struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:Required // +required Spec AuthenticationSpec `json:"spec,omitempty"` // +optional diff --git a/vendor/github.com/openshift/api/operator/v1/types_console.go b/vendor/github.com/openshift/api/operator/v1/types_console.go index ed0a0f9b511e..6688d21e7e92 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_console.go +++ b/vendor/github.com/openshift/api/operator/v1/types_console.go @@ -15,6 +15,7 @@ type Console struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:Required // +required Spec ConsoleSpec `json:"spec,omitempty"` // +optional diff --git a/vendor/github.com/openshift/api/operator/v1/types_etcd.go b/vendor/github.com/openshift/api/operator/v1/types_etcd.go index 83376ba4f955..ad75154bd3c9 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_etcd.go +++ b/vendor/github.com/openshift/api/operator/v1/types_etcd.go @@ -13,6 +13,7 @@ type Etcd struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +kubebuilder:validation:Required // +required Spec EtcdSpec `json:"spec"` // +optional diff --git a/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go b/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go index 6b79a8e0c617..71292438fbd4 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go +++ b/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go @@ -13,6 +13,7 @@ type KubeAPIServer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +kubebuilder:validation:Required // +required Spec KubeAPIServerSpec `json:"spec"` // +optional diff --git a/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go b/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go index 36ecc5edadeb..664b3b6d7fb1 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go +++ b/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go @@ -13,6 +13,7 @@ type KubeControllerManager struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +kubebuilder:validation:Required // +required Spec KubeControllerManagerSpec `json:"spec"` // +optional diff --git a/vendor/github.com/openshift/api/operator/v1/types_network.go b/vendor/github.com/openshift/api/operator/v1/types_network.go index 37188d4e5fa5..93b0564d77f0 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_network.go +++ b/vendor/github.com/openshift/api/operator/v1/types_network.go @@ -164,6 +164,9 @@ type OVNKubernetesConfig struct { // NetworkType describes the network plugin type to configure type NetworkType string +// ProxyArgumentList is a list of arguments to pass to the kubeproxy process +type ProxyArgumentList []string + // ProxyConfig defines the configuration knobs for kubeproxy // All of these are optional and have sensible defaults type ProxyConfig struct { @@ -176,7 +179,7 @@ type ProxyConfig struct { BindAddress string `json:"bindAddress,omitempty"` // Any additional arguments to pass to the kubeproxy process - ProxyArguments map[string][]string `json:"proxyArguments,omitempty"` + ProxyArguments map[string]ProxyArgumentList `json:"proxyArguments,omitempty"` } const ( diff --git a/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go b/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go index ec0487ccfcf0..63c552c7a82c 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go +++ b/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go @@ -13,6 +13,7 @@ type OpenShiftAPIServer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +kubebuilder:validation:Required // +required Spec OpenShiftAPIServerSpec `json:"spec"` // +optional diff --git a/vendor/github.com/openshift/api/operator/v1/types_openshiftcontrollermanager.go b/vendor/github.com/openshift/api/operator/v1/types_openshiftcontrollermanager.go index 57ebe8e3a602..0d3f1e5c34f8 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_openshiftcontrollermanager.go +++ b/vendor/github.com/openshift/api/operator/v1/types_openshiftcontrollermanager.go @@ -13,6 +13,7 @@ type OpenShiftControllerManager struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +kubebuilder:validation:Required // +required Spec OpenShiftControllerManagerSpec `json:"spec"` // +optional diff --git a/vendor/github.com/openshift/api/operator/v1/types_scheduler.go b/vendor/github.com/openshift/api/operator/v1/types_scheduler.go index 69fa5fbe4cee..f9e4e74acac3 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_scheduler.go +++ b/vendor/github.com/openshift/api/operator/v1/types_scheduler.go @@ -13,6 +13,7 @@ type KubeScheduler struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +kubebuilder:validation:Required // +required Spec KubeSchedulerSpec `json:"spec"` // +optional diff --git a/vendor/github.com/openshift/api/operator/v1/types_serviceca.go b/vendor/github.com/openshift/api/operator/v1/types_serviceca.go index 6d7f7dd45316..3859d9d5e638 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_serviceca.go +++ b/vendor/github.com/openshift/api/operator/v1/types_serviceca.go @@ -14,6 +14,7 @@ type ServiceCA struct { metav1.ObjectMeta `json:"metadata"` //spec holds user settable values for configuration + // +kubebuilder:validation:Required // +required Spec ServiceCASpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. diff --git a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go index aa480d732278..5526b66f5bcb 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go +++ b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go @@ -13,6 +13,7 @@ type ServiceCatalogAPIServer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:Required // +required Spec ServiceCatalogAPIServerSpec `json:"spec"` // +optional diff --git a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go index b57e2d6e8beb..4378c0a3f176 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go +++ b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go @@ -13,6 +13,7 @@ type ServiceCatalogControllerManager struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +kubebuilder:validation:Required // +required Spec ServiceCatalogControllerManagerSpec `json:"spec"` // +optional diff --git a/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go index 5d9c9a864ea4..01319569b422 100644 --- a/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go @@ -1571,19 +1571,39 @@ func (in *PrivateStrategy) DeepCopy() *PrivateStrategy { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in ProxyArgumentList) DeepCopyInto(out *ProxyArgumentList) { + { + in := &in + *out = make(ProxyArgumentList, len(*in)) + copy(*out, *in) + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyArgumentList. +func (in ProxyArgumentList) DeepCopy() ProxyArgumentList { + if in == nil { + return nil + } + out := new(ProxyArgumentList) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ProxyConfig) DeepCopyInto(out *ProxyConfig) { *out = *in if in.ProxyArguments != nil { in, out := &in.ProxyArguments, &out.ProxyArguments - *out = make(map[string][]string, len(*in)) + *out = make(map[string]ProxyArgumentList, len(*in)) for key, val := range *in { var outVal []string if val == nil { (*out)[key] = nil } else { in, out := &val, &outVal - *out = make([]string, len(*in)) + *out = make(ProxyArgumentList, len(*in)) copy(*out, *in) } (*out)[key] = outVal diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/register.go b/vendor/github.com/openshift/api/operator/v1alpha1/register.go index 5ddbdeb0e649..3c731f61871f 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/register.go +++ b/vendor/github.com/openshift/api/operator/v1alpha1/register.go @@ -33,6 +33,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(GroupVersion, &GenericOperatorConfig{}, + &ImageContentSourcePolicy{}, + &ImageContentSourcePolicyList{}, ) return nil diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/types_image_content_source_policy.go b/vendor/github.com/openshift/api/operator/v1alpha1/types_image_content_source_policy.go new file mode 100644 index 000000000000..26eeef841ae5 --- /dev/null +++ b/vendor/github.com/openshift/api/operator/v1alpha1/types_image_content_source_policy.go @@ -0,0 +1,55 @@ +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ImageContentSourcePolicy holds cluster-wide information about how to handle registry mirror rules. +// When multple policies are defined, the outcome of the behavior is defined on each field. +type ImageContentSourcePolicy struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec holds user settable values for configuration + // +kubebuilder:validation:Required + // +required + Spec ImageContentSourcePolicySpec `json:"spec"` +} + +// ImageContentSourcePolicySpec is the specification of the ImageContentSourcePolicy CRD. +type ImageContentSourcePolicySpec struct { + // repositoryDigestMirrors allows images referenced by image digests in pods to be + // pulled from alternative mirrored repository locations. The image pull specification + // provided to the pod will be compared to the source locations described in RepositoryDigestMirrors + // and the image may be pulled down from any of the repositories in the list instead of the + // specified repository allowing administrators to choose a potentially faster mirror. + // Only image pull specifications that have an image disgest will have this behavior applied + // to them - tags will continue to be pulled from the specified repository in the pull spec. + // When multiple policies are defined, any overlaps found will be merged together when the mirror + // rules are written to `/etc/containers/registries.conf`. For example, if policy A has sources `a, b, c` + // and policy B has sources `c, d, e`. Then the mirror rule written to `registries.conf` will be `a, b, c, d, e` + // where the duplicate `c` is removed. + // +optional + RepositoryDigestMirrors []RepositoryDigestMirrors `json:"repositoryDigestMirrors"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ImageContentSourcePolicyList lists the items in the ImageContentSourcePolicy CRD. +type ImageContentSourcePolicyList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + metav1.ListMeta `json:"metadata"` + Items []ImageContentSourcePolicy `json:"items"` +} + +// RepositoryDigestMirrors holds cluster-wide information about how to handle mirros in the registries config. +// Note: the mirrors only work when pulling the images that are reference by their digests. +type RepositoryDigestMirrors struct { + // sources are repositories that are mirrors of each other. + // +optional + Sources []string `json:"sources,omitempty"` +} diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go index 72ae4b3db099..36a17cff8bc7 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go @@ -85,6 +85,89 @@ func (in *GenericOperatorConfig) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageContentSourcePolicy) DeepCopyInto(out *ImageContentSourcePolicy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContentSourcePolicy. +func (in *ImageContentSourcePolicy) DeepCopy() *ImageContentSourcePolicy { + if in == nil { + return nil + } + out := new(ImageContentSourcePolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ImageContentSourcePolicy) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageContentSourcePolicyList) DeepCopyInto(out *ImageContentSourcePolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ImageContentSourcePolicy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContentSourcePolicyList. +func (in *ImageContentSourcePolicyList) DeepCopy() *ImageContentSourcePolicyList { + if in == nil { + return nil + } + out := new(ImageContentSourcePolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ImageContentSourcePolicyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageContentSourcePolicySpec) DeepCopyInto(out *ImageContentSourcePolicySpec) { + *out = *in + if in.RepositoryDigestMirrors != nil { + in, out := &in.RepositoryDigestMirrors, &out.RepositoryDigestMirrors + *out = make([]RepositoryDigestMirrors, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContentSourcePolicySpec. +func (in *ImageContentSourcePolicySpec) DeepCopy() *ImageContentSourcePolicySpec { + if in == nil { + return nil + } + out := new(ImageContentSourcePolicySpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LoggingConfig) DeepCopyInto(out *LoggingConfig) { *out = *in @@ -189,6 +272,27 @@ func (in *OperatorStatus) DeepCopy() *OperatorStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RepositoryDigestMirrors) DeepCopyInto(out *RepositoryDigestMirrors) { + *out = *in + if in.Sources != nil { + in, out := &in.Sources, &out.Sources + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryDigestMirrors. +func (in *RepositoryDigestMirrors) DeepCopy() *RepositoryDigestMirrors { + if in == nil { + return nil + } + out := new(RepositoryDigestMirrors) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StaticPodOperatorStatus) DeepCopyInto(out *StaticPodOperatorStatus) { *out = *in diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go index 59a145211eb4..fc80a126b8f1 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go @@ -135,4 +135,41 @@ func (VersionAvailability) SwaggerDoc() map[string]string { return map_VersionAvailability } +var map_ImageContentSourcePolicy = map[string]string{ + "": "ImageContentSourcePolicy holds cluster-wide information about how to handle registry mirror rules. When multple policies are defined, the outcome of the behavior is defined on each field.", + "metadata": "Standard object's metadata.", + "spec": "spec holds user settable values for configuration", +} + +func (ImageContentSourcePolicy) SwaggerDoc() map[string]string { + return map_ImageContentSourcePolicy +} + +var map_ImageContentSourcePolicyList = map[string]string{ + "": "ImageContentSourcePolicyList lists the items in the ImageContentSourcePolicy CRD.", + "metadata": "Standard object's metadata.", +} + +func (ImageContentSourcePolicyList) SwaggerDoc() map[string]string { + return map_ImageContentSourcePolicyList +} + +var map_ImageContentSourcePolicySpec = map[string]string{ + "": "ImageContentSourcePolicySpec is the specification of the ImageContentSourcePolicy CRD.", + "repositoryDigestMirrors": "repositoryDigestMirrors allows images referenced by image digests in pods to be pulled from alternative mirrored repository locations. The image pull specification provided to the pod will be compared to the source locations described in RepositoryDigestMirrors and the image may be pulled down from any of the repositories in the list instead of the specified repository allowing administrators to choose a potentially faster mirror. Only image pull specifications that have an image disgest will have this behavior applied to them - tags will continue to be pulled from the specified repository in the pull spec. When multiple policies are defined, any overlaps found will be merged together when the mirror rules are written to `/etc/containers/registries.conf`. For example, if policy A has sources `a, b, c` and policy B has sources `c, d, e`. Then the mirror rule written to `registries.conf` will be `a, b, c, d, e` where the duplicate `c` is removed.", +} + +func (ImageContentSourcePolicySpec) SwaggerDoc() map[string]string { + return map_ImageContentSourcePolicySpec +} + +var map_RepositoryDigestMirrors = map[string]string{ + "": "RepositoryDigestMirrors holds cluster-wide information about how to handle mirros in the registries config. Note: the mirrors only work when pulling the images that are reference by their digests.", + "sources": "sources are repositories that are mirrors of each other.", +} + +func (RepositoryDigestMirrors) SwaggerDoc() map[string]string { + return map_RepositoryDigestMirrors +} + // AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/client-go/glide.lock b/vendor/github.com/openshift/client-go/glide.lock index 9364e353125c..ba9a44800143 100644 --- a/vendor/github.com/openshift/client-go/glide.lock +++ b/vendor/github.com/openshift/client-go/glide.lock @@ -1,5 +1,5 @@ hash: 595563cffda70c75833adcf07415011d115db7218cbbddc4c14f1684ad39638a -updated: 2019-06-12T12:57:01.408584637-04:00 +updated: 2019-06-27T10:15:52.43135905-04:00 imports: - name: github.com/davecgh/go-spew version: 782f4967f2dc4564575ca782fe2d04090b5faca8 @@ -41,7 +41,7 @@ imports: - name: github.com/modern-go/reflect2 version: 94122c33edd36123c84d5368cfb2b69df93a0ec8 - name: github.com/openshift/api - version: fa9befef991415fa1117f69eec05bfa0d1344732 + version: de5ca909c7322bb8d06fa5a9e5604491b373da52 subpackages: - apps/v1 - authorization/v1 diff --git a/vendor/github.com/openshift/client-go/hack/update-codegen.sh b/vendor/github.com/openshift/client-go/hack/update-codegen.sh index ff57fad7225c..7bf6bda5c1bd 100755 --- a/vendor/github.com/openshift/client-go/hack/update-codegen.sh +++ b/vendor/github.com/openshift/client-go/hack/update-codegen.sh @@ -9,7 +9,7 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-ge verify="${VERIFY:-}" -for group in apps authorization build config image network oauth operator project quota route security template user; do +for group in apps authorization build config image network oauth project quota route security template user; do ${CODEGEN_PKG}/generate-groups.sh "client,lister,informer" \ github.com/openshift/client-go/${group} \ github.com/openshift/api \ @@ -26,3 +26,12 @@ for group in servicecertsigner; do --go-header-file ${SCRIPT_ROOT}/hack/boilerplate.txt \ ${verify} done + +for group in operator; do + ${CODEGEN_PKG}/generate-groups.sh "client,lister,informer" \ + github.com/openshift/client-go/${group} \ + github.com/openshift/api \ + "${group}:v1,v1alpha1" \ + --go-header-file ${SCRIPT_ROOT}/hack/boilerplate.txt \ + ${verify} +done \ No newline at end of file diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/clientset.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/clientset.go index 31213e147a74..e5e6911f4e7f 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/clientset.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/clientset.go @@ -4,6 +4,7 @@ package versioned import ( operatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + operatorv1alpha1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -12,13 +13,15 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface OperatorV1() operatorv1.OperatorV1Interface + OperatorV1alpha1() operatorv1alpha1.OperatorV1alpha1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - operatorV1 *operatorv1.OperatorV1Client + operatorV1 *operatorv1.OperatorV1Client + operatorV1alpha1 *operatorv1alpha1.OperatorV1alpha1Client } // OperatorV1 retrieves the OperatorV1Client @@ -26,6 +29,11 @@ func (c *Clientset) OperatorV1() operatorv1.OperatorV1Interface { return c.operatorV1 } +// OperatorV1alpha1 retrieves the OperatorV1alpha1Client +func (c *Clientset) OperatorV1alpha1() operatorv1alpha1.OperatorV1alpha1Interface { + return c.operatorV1alpha1 +} + // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -46,6 +54,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } + cs.operatorV1alpha1, err = operatorv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { @@ -59,6 +71,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.operatorV1 = operatorv1.NewForConfigOrDie(c) + cs.operatorV1alpha1 = operatorv1alpha1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -68,6 +81,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { func New(c rest.Interface) *Clientset { var cs Clientset cs.operatorV1 = operatorv1.New(c) + cs.operatorV1alpha1 = operatorv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/fake/clientset_generated.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/fake/clientset_generated.go index e412511f69d4..80966b15a4a4 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/fake/clientset_generated.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/fake/clientset_generated.go @@ -6,6 +6,8 @@ import ( clientset "github.com/openshift/client-go/operator/clientset/versioned" operatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" fakeoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake" + operatorv1alpha1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1" + fakeoperatorv1alpha1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -59,3 +61,8 @@ var _ clientset.Interface = &Clientset{} func (c *Clientset) OperatorV1() operatorv1.OperatorV1Interface { return &fakeoperatorv1.FakeOperatorV1{Fake: &c.Fake} } + +// OperatorV1alpha1 retrieves the OperatorV1alpha1Client +func (c *Clientset) OperatorV1alpha1() operatorv1alpha1.OperatorV1alpha1Interface { + return &fakeoperatorv1alpha1.FakeOperatorV1alpha1{Fake: &c.Fake} +} diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/fake/register.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/fake/register.go index 972715a37f6b..20d540bc0d94 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/fake/register.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/fake/register.go @@ -4,6 +4,7 @@ package fake import ( operatorv1 "github.com/openshift/api/operator/v1" + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -16,6 +17,7 @@ var codecs = serializer.NewCodecFactory(scheme) var parameterCodec = runtime.NewParameterCodec(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ operatorv1.AddToScheme, + operatorv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/scheme/register.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/scheme/register.go index 9ee6ed21d929..0a99d662e972 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/scheme/register.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/scheme/register.go @@ -4,6 +4,7 @@ package scheme import ( operatorv1 "github.com/openshift/api/operator/v1" + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -16,6 +17,7 @@ var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ operatorv1.AddToScheme, + operatorv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/doc.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/doc.go new file mode 100644 index 000000000000..93a7ca4e0e2b --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/doc.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/doc.go new file mode 100644 index 000000000000..2b5ba4c8e442 --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go new file mode 100644 index 000000000000..5ff47ad54f68 --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go @@ -0,0 +1,104 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "github.com/openshift/api/operator/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeImageContentSourcePolicies implements ImageContentSourcePolicyInterface +type FakeImageContentSourcePolicies struct { + Fake *FakeOperatorV1alpha1 +} + +var imagecontentsourcepoliciesResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1alpha1", Resource: "imagecontentsourcepolicies"} + +var imagecontentsourcepoliciesKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1alpha1", Kind: "ImageContentSourcePolicy"} + +// Get takes name of the imageContentSourcePolicy, and returns the corresponding imageContentSourcePolicy object, and an error if there is any. +func (c *FakeImageContentSourcePolicies) Get(name string, options v1.GetOptions) (result *v1alpha1.ImageContentSourcePolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(imagecontentsourcepoliciesResource, name), &v1alpha1.ImageContentSourcePolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ImageContentSourcePolicy), err +} + +// List takes label and field selectors, and returns the list of ImageContentSourcePolicies that match those selectors. +func (c *FakeImageContentSourcePolicies) List(opts v1.ListOptions) (result *v1alpha1.ImageContentSourcePolicyList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(imagecontentsourcepoliciesResource, imagecontentsourcepoliciesKind, opts), &v1alpha1.ImageContentSourcePolicyList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ImageContentSourcePolicyList{ListMeta: obj.(*v1alpha1.ImageContentSourcePolicyList).ListMeta} + for _, item := range obj.(*v1alpha1.ImageContentSourcePolicyList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested imageContentSourcePolicies. +func (c *FakeImageContentSourcePolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(imagecontentsourcepoliciesResource, opts)) +} + +// Create takes the representation of a imageContentSourcePolicy and creates it. Returns the server's representation of the imageContentSourcePolicy, and an error, if there is any. +func (c *FakeImageContentSourcePolicies) Create(imageContentSourcePolicy *v1alpha1.ImageContentSourcePolicy) (result *v1alpha1.ImageContentSourcePolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(imagecontentsourcepoliciesResource, imageContentSourcePolicy), &v1alpha1.ImageContentSourcePolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ImageContentSourcePolicy), err +} + +// Update takes the representation of a imageContentSourcePolicy and updates it. Returns the server's representation of the imageContentSourcePolicy, and an error, if there is any. +func (c *FakeImageContentSourcePolicies) Update(imageContentSourcePolicy *v1alpha1.ImageContentSourcePolicy) (result *v1alpha1.ImageContentSourcePolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(imagecontentsourcepoliciesResource, imageContentSourcePolicy), &v1alpha1.ImageContentSourcePolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ImageContentSourcePolicy), err +} + +// Delete takes name of the imageContentSourcePolicy and deletes it. Returns an error if one occurs. +func (c *FakeImageContentSourcePolicies) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(imagecontentsourcepoliciesResource, name), &v1alpha1.ImageContentSourcePolicy{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeImageContentSourcePolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(imagecontentsourcepoliciesResource, listOptions) + + _, err := c.Fake.Invokes(action, &v1alpha1.ImageContentSourcePolicyList{}) + return err +} + +// Patch applies the patch and returns the patched imageContentSourcePolicy. +func (c *FakeImageContentSourcePolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ImageContentSourcePolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(imagecontentsourcepoliciesResource, name, pt, data, subresources...), &v1alpha1.ImageContentSourcePolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ImageContentSourcePolicy), err +} diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go new file mode 100644 index 000000000000..4759c1283219 --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go @@ -0,0 +1,24 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeOperatorV1alpha1 struct { + *testing.Fake +} + +func (c *FakeOperatorV1alpha1) ImageContentSourcePolicies() v1alpha1.ImageContentSourcePolicyInterface { + return &FakeImageContentSourcePolicies{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeOperatorV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go new file mode 100644 index 000000000000..42ec352cf63e --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go @@ -0,0 +1,5 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type ImageContentSourcePolicyExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/imagecontentsourcepolicy.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/imagecontentsourcepolicy.go new file mode 100644 index 000000000000..bac2a4e76f61 --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/imagecontentsourcepolicy.go @@ -0,0 +1,148 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "time" + + v1alpha1 "github.com/openshift/api/operator/v1alpha1" + scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// ImageContentSourcePoliciesGetter has a method to return a ImageContentSourcePolicyInterface. +// A group's client should implement this interface. +type ImageContentSourcePoliciesGetter interface { + ImageContentSourcePolicies() ImageContentSourcePolicyInterface +} + +// ImageContentSourcePolicyInterface has methods to work with ImageContentSourcePolicy resources. +type ImageContentSourcePolicyInterface interface { + Create(*v1alpha1.ImageContentSourcePolicy) (*v1alpha1.ImageContentSourcePolicy, error) + Update(*v1alpha1.ImageContentSourcePolicy) (*v1alpha1.ImageContentSourcePolicy, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1alpha1.ImageContentSourcePolicy, error) + List(opts v1.ListOptions) (*v1alpha1.ImageContentSourcePolicyList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ImageContentSourcePolicy, err error) + ImageContentSourcePolicyExpansion +} + +// imageContentSourcePolicies implements ImageContentSourcePolicyInterface +type imageContentSourcePolicies struct { + client rest.Interface +} + +// newImageContentSourcePolicies returns a ImageContentSourcePolicies +func newImageContentSourcePolicies(c *OperatorV1alpha1Client) *imageContentSourcePolicies { + return &imageContentSourcePolicies{ + client: c.RESTClient(), + } +} + +// Get takes name of the imageContentSourcePolicy, and returns the corresponding imageContentSourcePolicy object, and an error if there is any. +func (c *imageContentSourcePolicies) Get(name string, options v1.GetOptions) (result *v1alpha1.ImageContentSourcePolicy, err error) { + result = &v1alpha1.ImageContentSourcePolicy{} + err = c.client.Get(). + Resource("imagecontentsourcepolicies"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ImageContentSourcePolicies that match those selectors. +func (c *imageContentSourcePolicies) List(opts v1.ListOptions) (result *v1alpha1.ImageContentSourcePolicyList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.ImageContentSourcePolicyList{} + err = c.client.Get(). + Resource("imagecontentsourcepolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested imageContentSourcePolicies. +func (c *imageContentSourcePolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("imagecontentsourcepolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a imageContentSourcePolicy and creates it. Returns the server's representation of the imageContentSourcePolicy, and an error, if there is any. +func (c *imageContentSourcePolicies) Create(imageContentSourcePolicy *v1alpha1.ImageContentSourcePolicy) (result *v1alpha1.ImageContentSourcePolicy, err error) { + result = &v1alpha1.ImageContentSourcePolicy{} + err = c.client.Post(). + Resource("imagecontentsourcepolicies"). + Body(imageContentSourcePolicy). + Do(). + Into(result) + return +} + +// Update takes the representation of a imageContentSourcePolicy and updates it. Returns the server's representation of the imageContentSourcePolicy, and an error, if there is any. +func (c *imageContentSourcePolicies) Update(imageContentSourcePolicy *v1alpha1.ImageContentSourcePolicy) (result *v1alpha1.ImageContentSourcePolicy, err error) { + result = &v1alpha1.ImageContentSourcePolicy{} + err = c.client.Put(). + Resource("imagecontentsourcepolicies"). + Name(imageContentSourcePolicy.Name). + Body(imageContentSourcePolicy). + Do(). + Into(result) + return +} + +// Delete takes name of the imageContentSourcePolicy and deletes it. Returns an error if one occurs. +func (c *imageContentSourcePolicies) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("imagecontentsourcepolicies"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *imageContentSourcePolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("imagecontentsourcepolicies"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched imageContentSourcePolicy. +func (c *imageContentSourcePolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ImageContentSourcePolicy, err error) { + result = &v1alpha1.ImageContentSourcePolicy{} + err = c.client.Patch(pt). + Resource("imagecontentsourcepolicies"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go new file mode 100644 index 000000000000..ac87877f7509 --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go @@ -0,0 +1,74 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/openshift/api/operator/v1alpha1" + "github.com/openshift/client-go/operator/clientset/versioned/scheme" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" +) + +type OperatorV1alpha1Interface interface { + RESTClient() rest.Interface + ImageContentSourcePoliciesGetter +} + +// OperatorV1alpha1Client is used to interact with features provided by the operator.openshift.io group. +type OperatorV1alpha1Client struct { + restClient rest.Interface +} + +func (c *OperatorV1alpha1Client) ImageContentSourcePolicies() ImageContentSourcePolicyInterface { + return newImageContentSourcePolicies(c) +} + +// NewForConfig creates a new OperatorV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*OperatorV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &OperatorV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new OperatorV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *OperatorV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new OperatorV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *OperatorV1alpha1Client { + return &OperatorV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *OperatorV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/github.com/openshift/client-go/operator/informers/externalversions/generic.go b/vendor/github.com/openshift/client-go/operator/informers/externalversions/generic.go index e5f2145855b3..8795ae8a09ea 100644 --- a/vendor/github.com/openshift/client-go/operator/informers/externalversions/generic.go +++ b/vendor/github.com/openshift/client-go/operator/informers/externalversions/generic.go @@ -6,6 +6,7 @@ import ( "fmt" v1 "github.com/openshift/api/operator/v1" + v1alpha1 "github.com/openshift/api/operator/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -66,6 +67,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case v1.SchemeGroupVersion.WithResource("servicecatalogcontrollermanagers"): return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1().ServiceCatalogControllerManagers().Informer()}, nil + // Group=operator.openshift.io, Version=v1alpha1 + case v1alpha1.SchemeGroupVersion.WithResource("imagecontentsourcepolicies"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1alpha1().ImageContentSourcePolicies().Informer()}, nil + } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/interface.go b/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/interface.go index f636a83d500e..4da3da158049 100644 --- a/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/interface.go +++ b/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/interface.go @@ -5,12 +5,15 @@ package operator import ( internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" v1 "github.com/openshift/client-go/operator/informers/externalversions/operator/v1" + v1alpha1 "github.com/openshift/client-go/operator/informers/externalversions/operator/v1alpha1" ) // Interface provides access to each of this group's versions. type Interface interface { // V1 provides access to shared informers for resources in V1. V1() v1.Interface + // V1alpha1 provides access to shared informers for resources in V1alpha1. + V1alpha1() v1alpha1.Interface } type group struct { @@ -28,3 +31,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (g *group) V1() v1.Interface { return v1.New(g.factory, g.namespace, g.tweakListOptions) } + +// V1alpha1 returns a new v1alpha1.Interface. +func (g *group) V1alpha1() v1alpha1.Interface { + return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1alpha1/imagecontentsourcepolicy.go b/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1alpha1/imagecontentsourcepolicy.go new file mode 100644 index 000000000000..4136c3c89776 --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1alpha1/imagecontentsourcepolicy.go @@ -0,0 +1,72 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + time "time" + + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" + versioned "github.com/openshift/client-go/operator/clientset/versioned" + internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/openshift/client-go/operator/listers/operator/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// ImageContentSourcePolicyInformer provides access to a shared informer and lister for +// ImageContentSourcePolicies. +type ImageContentSourcePolicyInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.ImageContentSourcePolicyLister +} + +type imageContentSourcePolicyInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewImageContentSourcePolicyInformer constructs a new informer for ImageContentSourcePolicy type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewImageContentSourcePolicyInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredImageContentSourcePolicyInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredImageContentSourcePolicyInformer constructs a new informer for ImageContentSourcePolicy type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredImageContentSourcePolicyInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.OperatorV1alpha1().ImageContentSourcePolicies().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.OperatorV1alpha1().ImageContentSourcePolicies().Watch(options) + }, + }, + &operatorv1alpha1.ImageContentSourcePolicy{}, + resyncPeriod, + indexers, + ) +} + +func (f *imageContentSourcePolicyInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredImageContentSourcePolicyInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *imageContentSourcePolicyInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&operatorv1alpha1.ImageContentSourcePolicy{}, f.defaultInformer) +} + +func (f *imageContentSourcePolicyInformer) Lister() v1alpha1.ImageContentSourcePolicyLister { + return v1alpha1.NewImageContentSourcePolicyLister(f.Informer().GetIndexer()) +} diff --git a/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1alpha1/interface.go b/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1alpha1/interface.go new file mode 100644 index 000000000000..43069d459cce --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/informers/externalversions/operator/v1alpha1/interface.go @@ -0,0 +1,29 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // ImageContentSourcePolicies returns a ImageContentSourcePolicyInformer. + ImageContentSourcePolicies() ImageContentSourcePolicyInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// ImageContentSourcePolicies returns a ImageContentSourcePolicyInformer. +func (v *version) ImageContentSourcePolicies() ImageContentSourcePolicyInformer { + return &imageContentSourcePolicyInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/vendor/github.com/openshift/client-go/operator/listers/operator/v1alpha1/expansion_generated.go b/vendor/github.com/openshift/client-go/operator/listers/operator/v1alpha1/expansion_generated.go new file mode 100644 index 000000000000..4cd9e28ac36f --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/listers/operator/v1alpha1/expansion_generated.go @@ -0,0 +1,7 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +// ImageContentSourcePolicyListerExpansion allows custom methods to be added to +// ImageContentSourcePolicyLister. +type ImageContentSourcePolicyListerExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/operator/listers/operator/v1alpha1/imagecontentsourcepolicy.go b/vendor/github.com/openshift/client-go/operator/listers/operator/v1alpha1/imagecontentsourcepolicy.go new file mode 100644 index 000000000000..5565ccf689b9 --- /dev/null +++ b/vendor/github.com/openshift/client-go/operator/listers/operator/v1alpha1/imagecontentsourcepolicy.go @@ -0,0 +1,49 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/openshift/api/operator/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ImageContentSourcePolicyLister helps list ImageContentSourcePolicies. +type ImageContentSourcePolicyLister interface { + // List lists all ImageContentSourcePolicies in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.ImageContentSourcePolicy, err error) + // Get retrieves the ImageContentSourcePolicy from the index for a given name. + Get(name string) (*v1alpha1.ImageContentSourcePolicy, error) + ImageContentSourcePolicyListerExpansion +} + +// imageContentSourcePolicyLister implements the ImageContentSourcePolicyLister interface. +type imageContentSourcePolicyLister struct { + indexer cache.Indexer +} + +// NewImageContentSourcePolicyLister returns a new ImageContentSourcePolicyLister. +func NewImageContentSourcePolicyLister(indexer cache.Indexer) ImageContentSourcePolicyLister { + return &imageContentSourcePolicyLister{indexer: indexer} +} + +// List lists all ImageContentSourcePolicies in the indexer. +func (s *imageContentSourcePolicyLister) List(selector labels.Selector) (ret []*v1alpha1.ImageContentSourcePolicy, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ImageContentSourcePolicy)) + }) + return ret, err +} + +// Get retrieves the ImageContentSourcePolicy from the index for a given name. +func (s *imageContentSourcePolicyLister) Get(name string) (*v1alpha1.ImageContentSourcePolicy, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("imagecontentsourcepolicy"), name) + } + return obj.(*v1alpha1.ImageContentSourcePolicy), nil +} diff --git a/vendor/github.com/openshift/library-go/alpha-build-machinery/make/targets/openshift/bindata.mk b/vendor/github.com/openshift/library-go/alpha-build-machinery/make/targets/openshift/bindata.mk index 07b9a3228288..0e78cb927424 100644 --- a/vendor/github.com/openshift/library-go/alpha-build-machinery/make/targets/openshift/bindata.mk +++ b/vendor/github.com/openshift/library-go/alpha-build-machinery/make/targets/openshift/bindata.mk @@ -3,7 +3,7 @@ TMP_GOPATH :=$(shell mktemp -d) .ensure-go-bindata: ln -s $(abspath ./vendor) "$(TMP_GOPATH)/src" - export GOPATH=$(TMP_GOPATH) && go install "./vendor/github.com/jteeuwen/go-bindata/..." + export GOPATH=$(TMP_GOPATH) && export GOBIN=$(TMP_GOPATH)/bin && go install "./vendor/github.com/jteeuwen/go-bindata/..." # $1 - input dirs # $2 - prefix diff --git a/vendor/github.com/openshift/library-go/glide.lock b/vendor/github.com/openshift/library-go/glide.lock index 55aa18308107..c5a2c0619bb0 100644 --- a/vendor/github.com/openshift/library-go/glide.lock +++ b/vendor/github.com/openshift/library-go/glide.lock @@ -1,8 +1,9 @@ hash: f8c9db6d1671d547982414b3645690d9b3c007aa8a50fdaf62b81cee9768f0fa -updated: 2019-06-07T14:38:33.770236434-04:00 +updated: 2019-06-25T17:09:36.178129217+02:00 imports: - name: bitbucket.org/ww/goautoneg version: 75cd24fc2f2c2a2088577d12123ddee5f54e0675 + vcs: hg - name: github.com/Azure/go-ansiterm version: d6e3b3328b783f23731bc4d058875b0371ff8109 subpackages: @@ -150,7 +151,7 @@ imports: - pkg/term - pkg/term/windows - name: github.com/docker/go-connections - version: 2a820fca5f4346badd2e3db516dd911f361eec3d + version: fd1b1942c4d55f7f210a8387e612dc6ffee78ff6 subpackages: - nat - name: github.com/docker/go-metrics @@ -158,7 +159,7 @@ imports: - name: github.com/docker/go-units version: 519db1ee28dcc9fd2474ae59fca29a810482bfb1 - name: github.com/docker/libnetwork - version: ce86291472a965c5cd6adaf2c83acaee6bab630a + version: 62a13ae87c6058bdc000fcccbf7e0f9f7525e2a9 subpackages: - ipamutils - name: github.com/docker/libtrust @@ -168,7 +169,7 @@ imports: subpackages: - log - name: github.com/evanphx/json-patch - version: aad56889c1abf591875aed4f81df25e920bf0f4d + version: 5858425f75500d40c52783dce87d085a483ce135 - name: github.com/fsouza/go-dockerclient version: da3951ba2e9e02bc0e7642150b3e265aed7e1df3 - name: github.com/getsentry/raven-go @@ -250,7 +251,7 @@ imports: - compiler - extensions - name: github.com/gorilla/mux - version: ed099d42384823742bba0bf9a72b53b55c9e2e38 + version: 212aa90d7cec051ab29930d5c56f758f6f69a789 - name: github.com/grpc-ecosystem/go-grpc-prometheus version: 2500245aa6110c562d17020fb31a2c133d737799 - name: github.com/hashicorp/golang-lru @@ -301,12 +302,12 @@ imports: - specs-go - specs-go/v1 - name: github.com/opencontainers/runc - version: b4a0b1d7378808d73dfd7edf9a8d30eebefaf7b5 + version: f4982d86f7fde0b6f953cc62ccc4022c519a10a9 subpackages: - libcontainer/system - libcontainer/user - name: github.com/openshift/api - version: 3ca714bc5b1b13c4e9381147d9994c0384b20e23 + version: 64d243ed05c5e2e1c779db0810323571d5674ccc subpackages: - apps - apps/v1 @@ -353,7 +354,7 @@ imports: - webconsole - webconsole/v1 - name: github.com/openshift/client-go - version: f4b242dfe08529a11803996e325ab6dc127d4e1d + version: 8892c0adc000741c33af70e05f4ede47725d0773 subpackages: - apps/clientset/versioned/scheme - apps/clientset/versioned/typed/apps/v1 @@ -531,7 +532,7 @@ imports: - name: gopkg.in/natefinch/lumberjack.v2 version: 20b71e5b60d756d3d2f80def009790325acc2b23 - name: gopkg.in/yaml.v2 - version: 51d6538a90f86fe93ac480b35f37b2be17fef232 + version: 5420a8b6744d3b0345ab293f6fcba19c978f1183 - name: k8s.io/api version: 40a48860b5abbba9aa891b02b32da429b08d96a0 subpackages: @@ -926,6 +927,7 @@ imports: - tools/record - tools/record/util - tools/reference + - tools/watch - transport - util/cert - util/connrotation diff --git a/vendor/github.com/openshift/library-go/glide.yaml b/vendor/github.com/openshift/library-go/glide.yaml index bf4684ce5a60..920b7ca6e8e7 100644 --- a/vendor/github.com/openshift/library-go/glide.yaml +++ b/vendor/github.com/openshift/library-go/glide.yaml @@ -62,3 +62,8 @@ import: version: da3951ba2e9e02bc0e7642150b3e265aed7e1df3 # matching origin 4.2 level - package: github.com/docker/distribution version: 16128bbac47f75050e82f7e91b04df33775e0c23 # level currently used in origin to base the origin patches on. See https://github.com/openshift/image-registry/pull/126/commits/eb32acef7827ac2227c3aeaddc444880ed98edb3 leading to https://github.com/openshift/docker-distribution/commits/image-registry-3.11 + +# VCS issues +- package: bitbucket.org/ww/goautoneg + vcs: hg + diff --git a/vendor/github.com/openshift/library-go/pkg/operator/configobserver/network/observe_network.go b/vendor/github.com/openshift/library-go/pkg/operator/configobserver/network/observe_network.go index 5a3f937dd5b1..8d4676558355 100644 --- a/vendor/github.com/openshift/library-go/pkg/operator/configobserver/network/observe_network.go +++ b/vendor/github.com/openshift/library-go/pkg/operator/configobserver/network/observe_network.go @@ -2,8 +2,9 @@ package network import ( "fmt" + "net" - configv1 "github.com/openshift/api/config" + configv1 "github.com/openshift/api/config/v1" configlistersv1 "github.com/openshift/client-go/config/listers/config/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -14,28 +15,28 @@ import ( func GetClusterCIDRs(lister configlistersv1.NetworkLister, recorder events.Recorder) ([]string, error) { network, err := lister.Get("cluster") if errors.IsNotFound(err) { - recorder.Warningf("ObserveRestrictedCIDRFailed", "Required networks.%s/cluster not found", configv1.GroupName) + recorder.Warningf("GetClusterCIDRsFailed", "Required networks.%s/cluster not found", configv1.GroupName) return nil, nil } if err != nil { - recorder.Warningf("ObserveRestrictedCIDRFailed", "error getting networks.%s/cluster: %v", configv1.GroupName, err) + recorder.Warningf("GetClusterCIDRsFailed", "error getting networks.%s/cluster: %v", configv1.GroupName, err) return nil, err } if len(network.Status.ClusterNetwork) == 0 { - recorder.Warningf("ObserveClusterCIDRFailed", "Required status.clusterNetwork field is not set in networks.%s/cluster", configv1.GroupName) + recorder.Warningf("GetClusterCIDRsFailed", "Required status.clusterNetwork field is not set in networks.%s/cluster", configv1.GroupName) return nil, fmt.Errorf("networks.%s/cluster: status.clusterNetwork not found", configv1.GroupName) } var clusterCIDRs []string for i, clusterNetwork := range network.Status.ClusterNetwork { if len(clusterNetwork.CIDR) == 0 { - recorder.Warningf("ObserveRestrictedCIDRFailed", "Required status.clusterNetwork[%d].cidr field is not set in networks.%s/cluster", i, configv1.GroupName) + recorder.Warningf("GetClusterCIDRsFailed", "Required status.clusterNetwork[%d].cidr field is not set in networks.%s/cluster", i, configv1.GroupName) return nil, fmt.Errorf("networks.%s/cluster: status.clusterNetwork[%d].cidr not found", configv1.GroupName, i) } clusterCIDRs = append(clusterCIDRs, clusterNetwork.CIDR) } - // TODO fallback to podCIDR? is that still a thing? + return clusterCIDRs, nil } @@ -43,17 +44,86 @@ func GetClusterCIDRs(lister configlistersv1.NetworkLister, recorder events.Recor func GetServiceCIDR(lister configlistersv1.NetworkLister, recorder events.Recorder) (string, error) { network, err := lister.Get("cluster") if errors.IsNotFound(err) { - recorder.Warningf("ObserveServiceClusterIPRangesFailed", "Required networks.%s/cluster not found", configv1.GroupName) + recorder.Warningf("GetServiceCIDRFailed", "Required networks.%s/cluster not found", configv1.GroupName) return "", nil } if err != nil { - recorder.Warningf("ObserveServiceClusterIPRangesFailed", "error getting networks.%s/cluster: %v", configv1.GroupName, err) + recorder.Warningf("GetServiceCIDRFailed", "error getting networks.%s/cluster: %v", configv1.GroupName, err) return "", err } if len(network.Status.ServiceNetwork) == 0 || len(network.Status.ServiceNetwork[0]) == 0 { - recorder.Warningf("ObserveServiceClusterIPRangesFailed", "Required status.serviceNetwork field is not set in networks.%s/cluster", configv1.GroupName) + recorder.Warningf("GetServiceCIDRFailed", "Required status.serviceNetwork field is not set in networks.%s/cluster", configv1.GroupName) return "", fmt.Errorf("networks.%s/cluster: status.serviceNetwork not found", configv1.GroupName) } + return network.Status.ServiceNetwork[0], nil } + +// GetExternalIPPolicy retrieves the ExternalIPPolicy for the cluster. +// The policy may be null. +func GetExternalIPPolicy(lister configlistersv1.NetworkLister, recorder events.Recorder) (*configv1.ExternalIPPolicy, error) { + network, err := lister.Get("cluster") + if errors.IsNotFound(err) { + recorder.Warningf("GetExternalIPPolicyFailed", "Required networks.%s/cluster not found", configv1.GroupName) + return nil, nil + } + if err != nil { + recorder.Warningf("GetExternalIPPolicyFailed", "error getting networks.%s/cluster: %v", configv1.GroupName, err) + return nil, err + } + + if network.Spec.ExternalIP == nil { + return nil, nil + } + + pol := network.Spec.ExternalIP.Policy + if pol != nil { + if err := validateCIDRs(pol.AllowedCIDRs); err != nil { + recorder.Warningf("GetExternalIPPolicyFailed", "error parsing networks.%s/cluster Spec.ExternalIP.Policy.AllowedCIDRs: invalid cidr: %v", configv1.GroupName, err) + return nil, err + } + if err := validateCIDRs(pol.RejectedCIDRs); err != nil { + recorder.Warningf("GetExternalIPPolicyFailed", "error parsing networks.%s/cluster Spec.ExternalIP.Policy.RejectedCIDRs: invalid cidr: %v", configv1.GroupName, err) + return nil, err + } + } + + return network.Spec.ExternalIP.Policy, nil +} + +// GetExternalIPAutoAssignCIDRs retrieves the ExternalIPAutoAssignCIDRs, if configured. +func GetExternalIPAutoAssignCIDRs(lister configlistersv1.NetworkLister, recorder events.Recorder) ([]string, error) { + network, err := lister.Get("cluster") + if errors.IsNotFound(err) { + recorder.Warningf("GetExternalIPAutoAssignCIDRsFailed", "Required networks.%s/cluster not found", configv1.GroupName) + return nil, nil + } + if err != nil { + recorder.Warningf("GetExternalIPAutoAssignCIDRsFailed", "error getting networks.%s/cluster: %v", configv1.GroupName, err) + return nil, err + } + + if network.Spec.ExternalIP == nil { + return nil, nil + } + + // ensure all ips are valid + if err := validateCIDRs(network.Spec.ExternalIP.AutoAssignCIDRs); err != nil { + recorder.Warningf("GetExternalIPAutoAssignCIDRsFailed", "error parsing networks.%s/cluster Spec.ExternalIP.AutoAssignCIDRs: invalid cidr: %v", configv1.GroupName, err) + return nil, err + } + + return network.Spec.ExternalIP.AutoAssignCIDRs, nil +} + +// validateCIDRs returns an err if any cidr in the list is invalid +func validateCIDRs(in []string) error { + for _, cidr := range in { + _, _, err := net.ParseCIDR(cidr) + if err != nil { + return err + } + } + return nil +} diff --git a/vendor/golang.org/x/time/CONTRIBUTING.md b/vendor/golang.org/x/time/CONTRIBUTING.md index d0485e887a2b..88dff59bc7d2 100644 --- a/vendor/golang.org/x/time/CONTRIBUTING.md +++ b/vendor/golang.org/x/time/CONTRIBUTING.md @@ -4,15 +4,16 @@ Go is an open source project. It is the work of hundreds of contributors. We appreciate your help! + ## Filing issues When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: -1. What version of Go are you using (`go version`)? -2. What operating system and processor architecture are you using? -3. What did you do? -4. What did you expect to see? -5. What did you see instead? +1. What version of Go are you using (`go version`)? +2. What operating system and processor architecture are you using? +3. What did you do? +4. What did you expect to see? +5. What did you see instead? General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. The gophers there will answer or ask you to file an issue if you've tripped over a bug. @@ -22,5 +23,9 @@ The gophers there will answer or ask you to file an issue if you've tripped over Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) before sending patches. +**We do not accept GitHub pull requests** +(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review). + Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file. + diff --git a/vendor/golang.org/x/time/README b/vendor/golang.org/x/time/README new file mode 100644 index 000000000000..144e347b4666 --- /dev/null +++ b/vendor/golang.org/x/time/README @@ -0,0 +1 @@ +This repository provides supplementary Go time packages. diff --git a/vendor/golang.org/x/time/README.md b/vendor/golang.org/x/time/README.md deleted file mode 100644 index ce9becdded47..000000000000 --- a/vendor/golang.org/x/time/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Go Time - -This repository provides supplementary Go time packages. - -## Download/Install - -The easiest way to install is to run `go get -u golang.org/x/time`. You can -also manually git clone the repository to `$GOPATH/src/golang.org/x/time`. - -## Report Issues / Send Patches - -This repository uses Gerrit for code changes. To learn how to submit changes to -this repository, see https://golang.org/doc/contribute.html. - -The main issue tracker for the time repository is located at -https://github.com/golang/go/issues. Prefix your issue with "x/time:" in the -subject line, so it is easy to find. diff --git a/vendor/golang.org/x/time/go.mod b/vendor/golang.org/x/time/go.mod deleted file mode 100644 index 46ac9176a927..000000000000 --- a/vendor/golang.org/x/time/go.mod +++ /dev/null @@ -1 +0,0 @@ -module golang.org/x/time diff --git a/vendor/golang.org/x/time/rate/rate.go b/vendor/golang.org/x/time/rate/rate.go index ae93e2471974..938feaffe9b2 100644 --- a/vendor/golang.org/x/time/rate/rate.go +++ b/vendor/golang.org/x/time/rate/rate.go @@ -6,11 +6,12 @@ package rate import ( - "context" "fmt" "math" "sync" "time" + + "golang.org/x/net/context" ) // Limit defines the maximum frequency of some events. @@ -243,12 +244,8 @@ func (lim *Limiter) WaitN(ctx context.Context, n int) (err error) { if !r.ok { return fmt.Errorf("rate: Wait(n=%d) would exceed context deadline", n) } - // Wait if necessary - delay := r.DelayFrom(now) - if delay == 0 { - return nil - } - t := time.NewTimer(delay) + // Wait + t := time.NewTimer(r.DelayFrom(now)) defer t.Stop() select { case <-t.C: diff --git a/vendor/golang.org/x/time/rate/rate_test.go b/vendor/golang.org/x/time/rate/rate_test.go index ec8c66ddfb92..cf45d92efc14 100644 --- a/vendor/golang.org/x/time/rate/rate_test.go +++ b/vendor/golang.org/x/time/rate/rate_test.go @@ -2,18 +2,17 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.7 - package rate import ( - "context" "math" "runtime" "sync" "sync/atomic" "testing" "time" + + "golang.org/x/net/context" ) func TestLimit(t *testing.T) { @@ -165,9 +164,6 @@ func TestSimultaneousRequests(t *testing.T) { } func TestLongRunningQPS(t *testing.T) { - if testing.Short() { - t.Skip("skipping in short mode") - } if runtime.GOOS == "openbsd" { t.Skip("low resolution time.Sleep invalidates test (golang.org/issue/14183)") return @@ -447,13 +443,3 @@ func BenchmarkAllowN(b *testing.B) { } }) } - -func BenchmarkWaitNNoDelay(b *testing.B) { - lim := NewLimiter(Limit(b.N), b.N) - ctx := context.Background() - b.ReportAllocs() - b.ResetTimer() - for i := 0; i < b.N; i++ { - lim.WaitN(ctx, 1) - } -} diff --git a/vendor/k8s.io/kubernetes/api/openapi-spec/swagger.json b/vendor/k8s.io/kubernetes/api/openapi-spec/swagger.json index 2de9fa5235a7..755857951869 100644 --- a/vendor/k8s.io/kubernetes/api/openapi-spec/swagger.json +++ b/vendor/k8s.io/kubernetes/api/openapi-spec/swagger.json @@ -8347,7 +8347,7 @@ "description": "NodeStatus is information about the current status of a node.", "properties": { "addresses": { - "description": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses", + "description": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See http://pr.k8s.io/79391 for an example.", "items": { "$ref": "#/definitions/io.k8s.api.core.v1.NodeAddress" }, diff --git a/vendor/k8s.io/kubernetes/openshift-kube-apiserver/admission/customresourcevalidation/apiserver/validation_wrapper.go b/vendor/k8s.io/kubernetes/openshift-kube-apiserver/admission/customresourcevalidation/apiserver/validation_wrapper.go index c36afeba63d9..06e9e04c1320 100644 --- a/vendor/k8s.io/kubernetes/openshift-kube-apiserver/admission/customresourcevalidation/apiserver/validation_wrapper.go +++ b/vendor/k8s.io/kubernetes/openshift-kube-apiserver/admission/customresourcevalidation/apiserver/validation_wrapper.go @@ -25,7 +25,7 @@ func Register(plugins *admission.Plugins) { } type validateCustomResourceWithClient struct { - admission.Interface + admission.ValidationInterface infrastructureGetter configv1client.InfrastructuresGetter } @@ -43,7 +43,7 @@ func NewValidateAPIServer() (admission.Interface, error) { if err != nil { return nil, err } - ret.Interface = delegate + ret.ValidationInterface = delegate return ret, nil } @@ -68,7 +68,7 @@ func (a *validateCustomResourceWithClient) ValidateInitialization() error { return fmt.Errorf(PluginName + " needs an infrastructureGetter") } - if initializationValidator, ok := a.Interface.(admission.InitializationValidator); ok { + if initializationValidator, ok := a.ValidationInterface.(admission.InitializationValidator); ok { return initializationValidator.ValidateInitialization() } diff --git a/vendor/k8s.io/kubernetes/openshift-kube-apiserver/admission/customresourcevalidation/customresourcevalidator.go b/vendor/k8s.io/kubernetes/openshift-kube-apiserver/admission/customresourcevalidation/customresourcevalidator.go index 379cf28f7bbf..dc4c82db5959 100644 --- a/vendor/k8s.io/kubernetes/openshift-kube-apiserver/admission/customresourcevalidation/customresourcevalidator.go +++ b/vendor/k8s.io/kubernetes/openshift-kube-apiserver/admission/customresourcevalidation/customresourcevalidator.go @@ -25,7 +25,7 @@ type validateCustomResource struct { validators map[schema.GroupVersionKind]ObjectValidator } -func NewValidator(resources map[schema.GroupResource]bool, validators map[schema.GroupVersionKind]ObjectValidator) (admission.Interface, error) { +func NewValidator(resources map[schema.GroupResource]bool, validators map[schema.GroupVersionKind]ObjectValidator) (admission.ValidationInterface, error) { return &validateCustomResource{ Handler: admission.NewHandler(admission.Create, admission.Update), resources: resources, diff --git a/vendor/k8s.io/kubernetes/pkg/generated/openapi/zz_generated.openapi.go b/vendor/k8s.io/kubernetes/pkg/generated/openapi/zz_generated.openapi.go index 6db8f7cd4567..3ff5ff9eac2d 100644 --- a/vendor/k8s.io/kubernetes/pkg/generated/openapi/zz_generated.openapi.go +++ b/vendor/k8s.io/kubernetes/pkg/generated/openapi/zz_generated.openapi.go @@ -15296,7 +15296,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op }, }, SchemaProps: spec.SchemaProps{ - Description: "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses", + Description: "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See http://pr.k8s.io/79391 for an example.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status_test.go b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status_test.go index 02a9723ac37a..c478a3189680 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status_test.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_node_status_test.go @@ -2131,3 +2131,156 @@ func TestNodeStatusHasChanged(t *testing.T) { }) } } + +func TestUpdateNodeAddresses(t *testing.T) { + testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + defer testKubelet.Cleanup() + kubelet := testKubelet.kubelet + kubeClient := testKubelet.fakeKubeClient + + existingNode := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}} + kubeClient.ReactionChain = fake.NewSimpleClientset(&v1.NodeList{Items: []v1.Node{existingNode}}).ReactionChain + + tests := []struct { + Name string + Before []v1.NodeAddress + After []v1.NodeAddress + }{ + { + Name: "nil to populated", + Before: nil, + After: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + }, + { + Name: "empty to populated", + Before: []v1.NodeAddress{}, + After: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + }, + { + Name: "populated to nil", + Before: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + After: nil, + }, + { + Name: "populated to empty", + Before: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + After: []v1.NodeAddress{}, + }, + { + Name: "multiple addresses of same type, no change", + Before: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, + {Type: v1.NodeInternalIP, Address: "127.0.0.2"}, + {Type: v1.NodeInternalIP, Address: "127.0.0.3"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + After: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, + {Type: v1.NodeInternalIP, Address: "127.0.0.2"}, + {Type: v1.NodeInternalIP, Address: "127.0.0.3"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + }, + { + Name: "1 InternalIP to 2 InternalIP", + Before: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + After: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, + {Type: v1.NodeInternalIP, Address: "127.0.0.2"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + }, + { + Name: "2 InternalIP to 1 InternalIP", + Before: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, + {Type: v1.NodeInternalIP, Address: "127.0.0.2"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + After: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + }, + { + Name: "2 InternalIP to 2 different InternalIP", + Before: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, + {Type: v1.NodeInternalIP, Address: "127.0.0.2"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + After: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.3"}, + {Type: v1.NodeInternalIP, Address: "127.0.0.4"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + }, + { + Name: "2 InternalIP to reversed order", + Before: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, + {Type: v1.NodeInternalIP, Address: "127.0.0.2"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + After: []v1.NodeAddress{ + {Type: v1.NodeInternalIP, Address: "127.0.0.2"}, + {Type: v1.NodeInternalIP, Address: "127.0.0.1"}, + {Type: v1.NodeHostName, Address: testKubeletHostname}, + }, + }, + } + + for _, test := range tests { + t.Run(test.Name, func(t *testing.T) { + oldNode := &v1.Node{ + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, + Spec: v1.NodeSpec{}, + Status: v1.NodeStatus{ + Addresses: test.Before, + }, + } + expectedNode := &v1.Node{ + ObjectMeta: metav1.ObjectMeta{Name: testKubeletHostname}, + Spec: v1.NodeSpec{}, + Status: v1.NodeStatus{ + Addresses: test.After, + }, + } + + _, err := kubeClient.CoreV1().Nodes().Update(oldNode) + assert.NoError(t, err) + kubelet.setNodeStatusFuncs = []func(*v1.Node) error{ + func(node *v1.Node) error { + node.Status.Addresses = expectedNode.Status.Addresses + return nil + }, + } + assert.NoError(t, kubelet.updateNodeStatus()) + + actions := kubeClient.Actions() + lastAction := actions[len(actions)-1] + assert.IsType(t, core.PatchActionImpl{}, lastAction) + patchAction := lastAction.(core.PatchActionImpl) + + updatedNode, err := applyNodeStatusPatch(oldNode, patchAction.GetPatch()) + require.NoError(t, err) + + assert.True(t, apiequality.Semantic.DeepEqual(updatedNode, expectedNode), "%s", diff.ObjectDiff(expectedNode, updatedNode)) + }) + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/util/node/BUILD b/vendor/k8s.io/kubernetes/pkg/util/node/BUILD index 08692c148a7e..106bfa982b35 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/node/BUILD +++ b/vendor/k8s.io/kubernetes/pkg/util/node/BUILD @@ -12,6 +12,7 @@ go_library( importpath = "k8s.io/kubernetes/pkg/util/node", deps = [ "//staging/src/k8s.io/api/core/v1:go_default_library", + "//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/types:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/strategicpatch:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/util/node/node.go b/vendor/k8s.io/kubernetes/pkg/util/node/node.go index 087a0bc82dd9..5c43ca1f3efd 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/node/node.go +++ b/vendor/k8s.io/kubernetes/pkg/util/node/node.go @@ -27,6 +27,7 @@ import ( "k8s.io/klog" "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/strategicpatch" @@ -195,12 +196,21 @@ func preparePatchBytesforNodeStatus(nodeName types.NodeName, oldNode *v1.Node, n return nil, fmt.Errorf("failed to Marshal oldData for node %q: %v", nodeName, err) } + // NodeStatus.Addresses is incorrectly annotated as patchStrategy=merge, which + // will cause strategicpatch.CreateTwoWayMergePatch to create an incorrect patch + // if it changed. + manuallyPatchAddresses := (len(oldNode.Status.Addresses) > 0) && !equality.Semantic.DeepEqual(oldNode.Status.Addresses, newNode.Status.Addresses) + // Reset spec to make sure only patch for Status or ObjectMeta is generated. // Note that we don't reset ObjectMeta here, because: // 1. This aligns with Nodes().UpdateStatus(). // 2. Some component does use this to update node annotations. - newNode.Spec = oldNode.Spec - newData, err := json.Marshal(newNode) + diffNode := newNode.DeepCopy() + diffNode.Spec = oldNode.Spec + if manuallyPatchAddresses { + diffNode.Status.Addresses = oldNode.Status.Addresses + } + newData, err := json.Marshal(diffNode) if err != nil { return nil, fmt.Errorf("failed to Marshal newData for node %q: %v", nodeName, err) } @@ -209,5 +219,63 @@ func preparePatchBytesforNodeStatus(nodeName types.NodeName, oldNode *v1.Node, n if err != nil { return nil, fmt.Errorf("failed to CreateTwoWayMergePatch for node %q: %v", nodeName, err) } + if manuallyPatchAddresses { + patchBytes, err = fixupPatchForNodeStatusAddresses(patchBytes, newNode.Status.Addresses) + if err != nil { + return nil, fmt.Errorf("failed to fix up NodeAddresses in patch for node %q: %v", nodeName, err) + } + } + return patchBytes, nil } + +// fixupPatchForNodeStatusAddresses adds a replace-strategy patch for Status.Addresses to +// the existing patch +func fixupPatchForNodeStatusAddresses(patchBytes []byte, addresses []v1.NodeAddress) ([]byte, error) { + // Given patchBytes='{"status": {"conditions": [ ... ], "phase": ...}}' and + // addresses=[{"type": "InternalIP", "address": "10.0.0.1"}], we need to generate: + // + // { + // "status": { + // "conditions": [ ... ], + // "phase": ..., + // "addresses": [ + // { + // "type": "InternalIP", + // "address": "10.0.0.1" + // }, + // { + // "$patch": "replace" + // } + // ] + // } + // } + + var patchMap map[string]interface{} + if err := json.Unmarshal(patchBytes, &patchMap); err != nil { + return nil, err + } + + addrBytes, err := json.Marshal(addresses) + if err != nil { + return nil, err + } + var addrArray []interface{} + if err := json.Unmarshal(addrBytes, &addrArray); err != nil { + return nil, err + } + addrArray = append(addrArray, map[string]interface{}{"$patch": "replace"}) + + status := patchMap["status"] + if status == nil { + status = map[string]interface{}{} + patchMap["status"] = status + } + statusMap, ok := status.(map[string]interface{}) + if !ok { + return nil, fmt.Errorf("unexpected data in patch") + } + statusMap["addresses"] = addrArray + + return json.Marshal(patchMap) +} diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/api/core/v1/generated.proto b/vendor/k8s.io/kubernetes/staging/src/k8s.io/api/core/v1/generated.proto index b9d569f5f93f..4ea31646cc01 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/api/core/v1/generated.proto +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/api/core/v1/generated.proto @@ -2126,6 +2126,9 @@ message NodeStatus { // List of addresses reachable to the node. // Queried from cloud provider, if available. // More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses + // Note: This field is declared as mergeable, but the merge key is not sufficiently + // unique, which can cause data corruption when it is merged. Callers should instead + // use a full-replacement patch. See http://pr.k8s.io/79391 for an example. // +optional // +patchMergeKey=type // +patchStrategy=merge diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/api/core/v1/types.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/api/core/v1/types.go index 3af134400cb4..a390410b3812 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/api/core/v1/types.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/api/core/v1/types.go @@ -4041,6 +4041,9 @@ type NodeStatus struct { // List of addresses reachable to the node. // Queried from cloud provider, if available. // More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses + // Note: This field is declared as mergeable, but the merge key is not sufficiently + // unique, which can cause data corruption when it is merged. Callers should instead + // use a full-replacement patch. See http://pr.k8s.io/79391 for an example. // +optional // +patchMergeKey=type // +patchStrategy=merge diff --git a/vendor/k8s.io/kubernetes/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go b/vendor/k8s.io/kubernetes/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go index 2c5b04f29e39..abef2c7d06f2 100644 --- a/vendor/k8s.io/kubernetes/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/kubernetes/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -1128,7 +1128,7 @@ var map_NodeStatus = map[string]string{ "allocatable": "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.", "phase": "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.", "conditions": "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition", - "addresses": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses", + "addresses": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See http://pr.k8s.io/79391 for an example.", "daemonEndpoints": "Endpoints of daemons running on the Node.", "nodeInfo": "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info", "images": "List of container images on this node", diff --git a/vendor/k8s.io/kubernetes/test/e2e/storage/testsuites/provisioning.go b/vendor/k8s.io/kubernetes/test/e2e/storage/testsuites/provisioning.go index 486150af45cf..aa1a1a76fea5 100644 --- a/vendor/k8s.io/kubernetes/test/e2e/storage/testsuites/provisioning.go +++ b/vendor/k8s.io/kubernetes/test/e2e/storage/testsuites/provisioning.go @@ -452,13 +452,15 @@ func PVMultiNodeCheck(client clientset.Interface, claim *v1.PersistentVolumeClai if secondNode.Affinity.NodeAffinity == nil { secondNode.Affinity.NodeAffinity = &v1.NodeAffinity{} } - if secondNode.Affinity.NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution == nil { - secondNode.Affinity.NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution = &v1.NodeSelector{} - } - secondNode.Affinity.NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution.NodeSelectorTerms = append(secondNode.Affinity.NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution.NodeSelectorTerms, - v1.NodeSelectorTerm{ - MatchFields: []v1.NodeSelectorRequirement{ - {Key: "metadata.name", Operator: v1.NodeSelectorOpNotIn, Values: []string{actualNodeName}}, + // Set anti-affinity preference: in case there are no nodes in the same AZ it may happen the second pod gets + // scheduled on the same node as the first one. In such a case the test needs to be skipped. + secondNode.Affinity.NodeAffinity.PreferredDuringSchedulingIgnoredDuringExecution = append(secondNode.Affinity.NodeAffinity.PreferredDuringSchedulingIgnoredDuringExecution, + v1.PreferredSchedulingTerm{ + Weight: int32(100), + Preference: v1.NodeSelectorTerm{ + MatchFields: []v1.NodeSelectorRequirement{ + {Key: "metadata.name", Operator: v1.NodeSelectorOpNotIn, Values: []string{actualNodeName}}, + }, }, }) @@ -471,9 +473,13 @@ func PVMultiNodeCheck(client clientset.Interface, claim *v1.PersistentVolumeClai framework.ExpectNoError(framework.WaitForPodSuccessInNamespaceSlow(client, pod.Name, pod.Namespace)) runningPod, err = client.CoreV1().Pods(pod.Namespace).Get(pod.Name, metav1.GetOptions{}) Expect(err).NotTo(HaveOccurred(), "get pod") - Expect(runningPod.Spec.NodeName).NotTo(Equal(actualNodeName), "second pod should have run on a different node") StopPod(client, pod) pod = nil + // The second pod got scheduled on the same node as the first one: skip the test. + if runningPod.Spec.NodeName == actualNodeName { + framework.Logf("Warning: The reader pod got scheduled on the same node as the writer pod: skipping test") + framework.Skipf("No node available for the second pod found") + } } func (t StorageClassTest) TestBindingWaitForFirstConsumer(nodeSelector map[string]string, expectUnschedulable bool) (*v1.PersistentVolume, *v1.Node) { diff --git a/vendor/sigs.k8s.io/yaml/.travis.yml b/vendor/sigs.k8s.io/yaml/.travis.yml index a39b52af68e8..03ddc7318ae6 100644 --- a/vendor/sigs.k8s.io/yaml/.travis.yml +++ b/vendor/sigs.k8s.io/yaml/.travis.yml @@ -1,11 +1,14 @@ language: go dist: xenial go: - - 1.12.x + - 1.9.x + - 1.10.x + - 1.11.x script: - - diff -u <(echo -n) <(gofmt -d *.go) + - go get -t -v ./... + - diff -u <(echo -n) <(gofmt -d .) - diff -u <(echo -n) <(golint $(go list -e ./...) | grep -v YAMLToJSON) - - GO111MODULE=on go vet . - - GO111MODULE=on go test -v -race ./... + - go tool vet . + - go test -v -race ./... install: - go get golang.org/x/lint/golint diff --git a/vendor/sigs.k8s.io/yaml/OWNERS b/vendor/sigs.k8s.io/yaml/OWNERS index 325b40b0763f..11ad7ce1a40b 100644 --- a/vendor/sigs.k8s.io/yaml/OWNERS +++ b/vendor/sigs.k8s.io/yaml/OWNERS @@ -1,5 +1,3 @@ -# See the OWNERS docs at https://go.k8s.io/owners - approvers: - dims - lavalamp diff --git a/vendor/sigs.k8s.io/yaml/README.md b/vendor/sigs.k8s.io/yaml/README.md index 3735f25e30b3..0200f75b4d12 100644 --- a/vendor/sigs.k8s.io/yaml/README.md +++ b/vendor/sigs.k8s.io/yaml/README.md @@ -1,8 +1,6 @@ # YAML marshaling and unmarshaling support for Go -[![Build Status](https://travis-ci.org/kubernetes-sigs/yaml.svg)](https://travis-ci.org/kubernetes-sigs/yaml) - -kubernetes-sigs/yaml is a permanent fork of [ghodss/yaml](https://github.com/ghodss/yaml). +[![Build Status](https://travis-ci.org/ghodss/yaml.svg)](https://travis-ci.org/ghodss/yaml) ## Introduction @@ -34,13 +32,13 @@ GOOD: To install, run: ``` -$ go get sigs.k8s.io/yaml +$ go get github.com/ghodss/yaml ``` And import using: ``` -import "sigs.k8s.io/yaml" +import "github.com/ghodss/yaml" ``` Usage is very similar to the JSON library: @@ -51,7 +49,7 @@ package main import ( "fmt" - "sigs.k8s.io/yaml" + "github.com/ghodss/yaml" ) type Person struct { @@ -95,7 +93,7 @@ package main import ( "fmt" - "sigs.k8s.io/yaml" + "github.com/ghodss/yaml" ) func main() { diff --git a/vendor/sigs.k8s.io/yaml/go.mod b/vendor/sigs.k8s.io/yaml/go.mod deleted file mode 100644 index 9d60b89b8003..000000000000 --- a/vendor/sigs.k8s.io/yaml/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module github.com/kubernetes-sigs/yaml - -go 1.12 - -require gopkg.in/yaml.v2 v2.2.2 diff --git a/vendor/sigs.k8s.io/yaml/go.sum b/vendor/sigs.k8s.io/yaml/go.sum deleted file mode 100644 index bd555a333b28..000000000000 --- a/vendor/sigs.k8s.io/yaml/go.sum +++ /dev/null @@ -1,3 +0,0 @@ -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/sigs.k8s.io/yaml/yaml.go b/vendor/sigs.k8s.io/yaml/yaml.go index efbc535d416e..024596112ac5 100644 --- a/vendor/sigs.k8s.io/yaml/yaml.go +++ b/vendor/sigs.k8s.io/yaml/yaml.go @@ -317,64 +317,3 @@ func convertToJSONableObject(yamlObj interface{}, jsonTarget *reflect.Value) (in return yamlObj, nil } } - -// JSONObjectToYAMLObject converts an in-memory JSON object into a YAML in-memory MapSlice, -// without going through a byte representation. A nil or empty map[string]interface{} input is -// converted to an empty map, i.e. yaml.MapSlice(nil). -// -// interface{} slices stay interface{} slices. map[string]interface{} becomes yaml.MapSlice. -// -// int64 and float64 are down casted following the logic of github.com/go-yaml/yaml: -// - float64s are down-casted as far as possible without data-loss to int, int64, uint64. -// - int64s are down-casted to int if possible without data-loss. -// -// Big int/int64/uint64 do not lose precision as in the json-yaml roundtripping case. -// -// string, bool and any other types are unchanged. -func JSONObjectToYAMLObject(j map[string]interface{}) yaml.MapSlice { - if len(j) == 0 { - return nil - } - ret := make(yaml.MapSlice, 0, len(j)) - for k, v := range j { - ret = append(ret, yaml.MapItem{Key: k, Value: jsonToYAMLValue(v)}) - } - return ret -} - -func jsonToYAMLValue(j interface{}) interface{} { - switch j := j.(type) { - case map[string]interface{}: - if j == nil { - return interface{}(nil) - } - return JSONObjectToYAMLObject(j) - case []interface{}: - if j == nil { - return interface{}(nil) - } - ret := make([]interface{}, len(j)) - for i := range j { - ret[i] = jsonToYAMLValue(j[i]) - } - return ret - case float64: - // replicate the logic in https://github.com/go-yaml/yaml/blob/51d6538a90f86fe93ac480b35f37b2be17fef232/resolve.go#L151 - if i64 := int64(j); j == float64(i64) { - if i := int(i64); i64 == int64(i) { - return i - } - return i64 - } - if ui64 := uint64(j); j == float64(ui64) { - return ui64 - } - return j - case int64: - if i := int(j); j == int64(i) { - return i - } - return j - } - return j -} diff --git a/vendor/sigs.k8s.io/yaml/yaml_test.go b/vendor/sigs.k8s.io/yaml/yaml_test.go index a88cbf3b3100..42a23156790d 100644 --- a/vendor/sigs.k8s.io/yaml/yaml_test.go +++ b/vendor/sigs.k8s.io/yaml/yaml_test.go @@ -1,16 +1,11 @@ package yaml import ( - "encoding/json" "fmt" "math" "reflect" - "sort" "strconv" "testing" - - "github.com/davecgh/go-spew/spew" - yaml "gopkg.in/yaml.v2" ) type MarshalTest struct { @@ -426,120 +421,3 @@ foo: baz t.Error("expected YAMLtoJSONStrict to fail on duplicate field names") } } - -func TestJSONObjectToYAMLObject(t *testing.T) { - intOrInt64 := func(i64 int64) interface{} { - if i := int(i64); i64 == int64(i) { - return i - } - return i64 - } - - tests := []struct { - name string - input map[string]interface{} - expected yaml.MapSlice - }{ - {name: "nil", expected: yaml.MapSlice(nil)}, - {name: "empty", input: map[string]interface{}{}, expected: yaml.MapSlice(nil)}, - { - name: "values", - input: map[string]interface{}{ - "nil slice": []interface{}(nil), - "nil map": map[string]interface{}(nil), - "empty slice": []interface{}{}, - "empty map": map[string]interface{}{}, - "bool": true, - "float64": float64(42.1), - "fractionless": float64(42), - "int": int(42), - "int64": int64(42), - "int64 big": float64(math.Pow(2, 62)), - "negative int64 big": -float64(math.Pow(2, 62)), - "map": map[string]interface{}{"foo": "bar"}, - "slice": []interface{}{"foo", "bar"}, - "string": string("foo"), - "uint64 big": float64(math.Pow(2, 63)), - }, - expected: yaml.MapSlice{ - {Key: "nil slice"}, - {Key: "nil map"}, - {Key: "empty slice", Value: []interface{}{}}, - {Key: "empty map", Value: yaml.MapSlice(nil)}, - {Key: "bool", Value: true}, - {Key: "float64", Value: float64(42.1)}, - {Key: "fractionless", Value: int(42)}, - {Key: "int", Value: int(42)}, - {Key: "int64", Value: int(42)}, - {Key: "int64 big", Value: intOrInt64(int64(1) << 62)}, - {Key: "negative int64 big", Value: intOrInt64(-(1 << 62))}, - {Key: "map", Value: yaml.MapSlice{{Key: "foo", Value: "bar"}}}, - {Key: "slice", Value: []interface{}{"foo", "bar"}}, - {Key: "string", Value: string("foo")}, - {Key: "uint64 big", Value: uint64(1) << 63}, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := JSONObjectToYAMLObject(tt.input) - sortMapSlicesInPlace(tt.expected) - sortMapSlicesInPlace(got) - if !reflect.DeepEqual(got, tt.expected) { - t.Errorf("jsonToYAML() = %v, want %v", spew.Sdump(got), spew.Sdump(tt.expected)) - } - - jsonBytes, err := json.Marshal(tt.input) - if err != nil { - t.Fatalf("unexpected json.Marshal error: %v", err) - } - var gotByRoundtrip yaml.MapSlice - if err := yaml.Unmarshal(jsonBytes, &gotByRoundtrip); err != nil { - t.Fatalf("unexpected yaml.Unmarshal error: %v", err) - } - - // yaml.Unmarshal loses precision, it's rounding to the 4th last digit. - // Replicate this here in the test, but don't change the type. - for i := range got { - switch got[i].Key { - case "int64 big", "uint64 big", "negative int64 big": - switch v := got[i].Value.(type) { - case int64: - d := int64(500) - if v < 0 { - d = -500 - } - got[i].Value = int64((v+d)/1000) * 1000 - case uint64: - got[i].Value = uint64((v+500)/1000) * 1000 - case int: - d := int(500) - if v < 0 { - d = -500 - } - got[i].Value = int((v+d)/1000) * 1000 - default: - t.Fatalf("unexpected type for key %s: %v:%T", got[i].Key, v, v) - } - } - } - - if !reflect.DeepEqual(got, gotByRoundtrip) { - t.Errorf("yaml.Unmarshal(json.Marshal(tt.input)) = %v, want %v\njson: %s", spew.Sdump(gotByRoundtrip), spew.Sdump(got), string(jsonBytes)) - } - }) - } -} - -func sortMapSlicesInPlace(x interface{}) { - switch x := x.(type) { - case []interface{}: - for i := range x { - sortMapSlicesInPlace(x[i]) - } - case yaml.MapSlice: - sort.Slice(x, func(a, b int) bool { - return x[a].Key.(string) < x[b].Key.(string) - }) - } -} From bb026a45b038dbf0b3db2b05131ac30afc68d1e9 Mon Sep 17 00:00:00 2001 From: ravisantoshgudimetla Date: Mon, 15 Jul 2019 12:18:08 -0400 Subject: [PATCH 2/2] UPSTREAM: 0000: React to removing broken default serving cert --- .../apiserver/validate_apiserver.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/vendor/k8s.io/kubernetes/openshift-kube-apiserver/admission/customresourcevalidation/apiserver/validate_apiserver.go b/vendor/k8s.io/kubernetes/openshift-kube-apiserver/admission/customresourcevalidation/apiserver/validate_apiserver.go index 969bee9291ba..ccfd5f6b0b42 100644 --- a/vendor/k8s.io/kubernetes/openshift-kube-apiserver/admission/customresourcevalidation/apiserver/validate_apiserver.go +++ b/vendor/k8s.io/kubernetes/openshift-kube-apiserver/admission/customresourcevalidation/apiserver/validate_apiserver.go @@ -117,10 +117,7 @@ func (apiserverV1) ValidateStatusUpdate(uncastObj runtime.Object, uncastOldObj r func validateAPIServerSpecCreate(spec configv1.APIServerSpec) field.ErrorList { errs := field.ErrorList{} - // we rely on fall through for the service network - if len(spec.ServingCerts.DefaultServingCertificate.Name) > 0 { - errs = append(errs, field.Forbidden(field.NewPath("spec").Child("servingCerts").Child("defaultServingCertificate").Child("name"), "may not be set")) - } + //TODO: Add validation code, if needed return errs } @@ -128,10 +125,7 @@ func validateAPIServerSpecCreate(spec configv1.APIServerSpec) field.ErrorList { func validateAPIServerSpecUpdate(newSpec, oldSpec configv1.APIServerSpec) field.ErrorList { errs := field.ErrorList{} - // we rely on fall through for the service network - if len(newSpec.ServingCerts.DefaultServingCertificate.Name) > 0 { - errs = append(errs, field.Forbidden(field.NewPath("spec").Child("servingCerts").Child("defaultServingCertificate").Child("name"), "may not be set")) - } + // TODO: Add validation code, if needed return errs }